You are not logged in.

#1 2023-11-04 21:07:50

virtualflyer
Member
Registered: 2017-01-08
Posts: 4

[SOLVED] Mkinicpio fails to run after update

Hello,
I am having an issue that seems to be almost perfectly described in this thread:
https://bbs.archlinux.org/viewtopic.php?id=280792
I have a machine that I use and update very sporadically (timeline is then a little fuzzy) and, with the last update yesterday, mkinicpio does not run correctly.
I did not notice until rebooting, so I am currently working from an arch live in chroot.

The error when doing pacman -Syu linux is:

(3/4) Updating linux initcpios...
call to execv failed (Permission denied)
error: command failed to execute correctly
(4/4) Signing Kernel for SecureBoot

Following the steps in that thread, I also had a spurious /etc/pacman.d/hooks/90-mkinitcpio-install.hook which I have moved out of the way (I have confirmed it is not running anymore).
The one difference is that I do not have a mkinitcpio-install in /usr/share/libalpm/scripts, but just mkinitcpio. Similarly, my hook (in /usr/share/libalpm/hooks) is:

Exec = /usr/share/libalpm/scripts/mkinitcpio install

Now if, following the debug steps in that thread, I change mkinitcpio to:

#!/bin/sh
echo GGRRRRRR | tee /tmp/grrrrr.grr

There is absolutely no difference in the output of 'pacman -S linux'. That makes no sense to me if the script should not be calling execv anymore. Alas, the path in the hook is absolute and I can't explain what could be going wrong. I also ran a "find / -name "90-mkinitcpio-install.hook" which returns only the one in /usr/share/libalpm/hooks and pacman.log shows that it indeed fails when running 90-mkinitcpio-install.hook.

I am really at a loss and I'd appreciate any help, TIA!

Last edited by virtualflyer (2023-11-04 22:12:01)

Offline

#2 2023-11-04 22:11:44

virtualflyer
Member
Registered: 2017-01-08
Posts: 4

Re: [SOLVED] Mkinicpio fails to run after update

Ok, it was falling back to another mkinitcpio because I had not set exec permission on the new one.
After that, injecting

exec > >(tee /tmp/grumblfxx.txt)
set -x

Actually, that was probably meaningless in this case, the spurious hook was the issue, but, after I removed it, I never thought of trying the original hook with the original script, as I was focusing on the "echo GRR".
Silly me.

Last edited by virtualflyer (2023-11-04 22:14:25)

Offline

Board footer

Powered by FluxBB