You are not logged in.
Can someone point me to the pacman hook that triggers mkinitcpio when systemd is updated? I read through the hook files installed by the systemd package but I can't find an obvious one that is triggering the rebuild of the kernel image.
...
( 9/11) Updating linux-lts initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
-> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts.img
==> Starting build: 4.19.71-1-lts
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-lts.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
-> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: 4.19.71-1-lts
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: aic94xx
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-lts-fallback.img
==> Image generation successful
...Last edited by graysky (2019-09-10 10:56:13)
Offline
usr/share/libalpm/hooks/90-linux-lts.hook contains
Target = usr/lib/initcpio/*the systemd packages contains
usr/lib/initcpio/hooks/
usr/lib/initcpio/hooks/udev
usr/lib/initcpio/install/
usr/lib/initcpio/install/systemd
usr/lib/initcpio/install/udevOffline
Thanks loqs. It would seem that 90-linux-lts.hook is calling the rebuild. Modifying that hook to remove the 'use/lib/initcpio/*' Target is probably a bad idea.... I am unsure if the systemd package placing files to those locations actually require a rebuild. I recall the systemd version being advertised briefly on boot, so keeping parity between the package on the filesystem and the splash message wouldn't halt a boot (ie it is just cosmetic). I do not know enough about the consequences of NOT rebuilding if any other file from systemd's package got updated within those locations. Plus and perhaps more importantly, other packages might actually require a rebuild... I will just forget about this idea.
Offline
If you do use systemd in your initramfs you should keep it in sync with the package version.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Historically (pre-alpm hooks), the initrd wasn't rebuilt following systemd upgrades, and it rarely (if ever) caused problems -- an image that has successfully mounted the root filesystem and exec'd the init process on the installed system won't stop working just because the aforementioned init has changed since the image was created; but unless you have a good reason to avoid it, updating the initrd with the "latest and greatest" as and when they become available seems like a good idea.
A systemd-based initrd handles things differently, and passes control and state over through `systemctl switch-root`. I'm not sure how the on-disk systemd handles getting control passed from an older version of systemd, but I imagine it has some process to handle it.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline