You are not logged in.

#1 2016-08-01 03:03:44

asdkant
Member
Registered: 2013-10-11
Posts: 2

timing of mkinitcpio during kernel updates (not sure if a bug)

Hi All,

I've recently had an issue where an update on packages related to the kernel (nvidia drivers for example) left my Arch installation unbootable. I tried going back to my old linux installation (which I still had intact in another drive and used to install my current Arch installation), chroot into the current Arch installation, and reinstall the linux package.

It worked like a charm. This happened again, and I used the same solution. After that, I took the precaution of reinstalling the kernel's package every time something related was installed, after installing the other stuff.

Of course he significant thing that reinstalling the kernel's package does is to run mkinitcpio. I just reinstalled the kernel's package as a precaution, and noticed that mkinitcpio is ran on the main package installation, not as a post-transaction hook.


Would having it run in the "post-transaction hooks" part solve the issue here? I decided to consult here before opening a bug in the bugtracker, because this behaviour may be by design and I'm not sure.

Offline

#2 2016-08-01 03:30:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: timing of mkinitcpio during kernel updates (not sure if a bug)

It is by design. If you need to rebuild the initramfs after an update, make your own hook.

Offline

#3 2016-08-05 18:21:05

Potomac
Member
Registered: 2011-12-25
Posts: 528

Re: timing of mkinitcpio during kernel updates (not sure if a bug)

example of a pacman hook for mkinitcpio, it will run after every update of systemd, you can replace it by another name package ( Target section ) :

[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = systemd

[Action]
Description = Updating ramdisk with mkinitcpio...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p linux

Last edited by Potomac (2016-08-05 18:21:44)

Offline

Board footer

Powered by FluxBB