[arch-general] [arch-announce] New kernel packages and mkinitcpio hooks

Giancarlo Razzolini grazzolini at archlinux.org
Wed Nov 13 17:52:56 UTC 2019

Em novembro 13, 2019 14:30 Amish via arch-general escreveu:
> I would like to report an issue I faced due to this. Not an issue for 
> everyone but can be an issue in a certain special cases.

Even so, I would prefer if you made this bug report on bugs.archlinux.org.

>  1. mkinitcpio hook first removed vmlinuz-linux, vmlinuz-linux-lts and
>     initrd files from /boot
>  2. My package got updated along with new versions of linux and linux-lts
>  3. My package's post install script ran grub-mkconfig but new vmlinuz
>     files did not exist yet in /boot. So grub entries were not created
>     for them.
>  4. mkinitcpio-install post transaction hook runs and copies kernel to
>     /boot (but its too late for my post install scripts)
> So effectively this created an un-bootable system requiring manual booting.
> This is going to happen every time my package plus linux / linux-lts 
> package get upgraded in the same pacman run. (i.e. this will not happen 
> always but only in certain conditions)
> I know my issue is not common and I will also change my script to post 
> transaction hook.
> But this is to warn anyone who has a custom package with post install 
> script which looks for / expects kernel files in /boot. (like 
> grub-mkconfig). Those scripts are going to break with the recent changes 
> to kernel package and it would be advisable to put them in post 
> transaction hook and that too after mkinitcpio-install scripts run.

I've purposefully made the mkinitcpio hook to have the same precedence number
as the old hook had: 90-mkinitcpio-install.hook. Specifically so people relying
on things ran after the kernel was installed could do so.

Instead of relying on a install script to call grub, if you used a hook and put
it after the previous linux hook/current mkinitcpio hook, it would have worked
just fine.

Bottom line is, this change shouldn't affect most Arch Linux installs (otherwise
we'd be swamped with bug reports by now). And, as always, people doing customized
things to their boot process, should always make sure it is working and, I hope, be
able to fix it when it breaks.

Giancarlo Razzolini
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20191113/b0c9c9f2/attachment.sig>

More information about the arch-general mailing list