Bug#1020396: systemd-boot: kernel installation/initrd update hooks double the initrd like #970213 since #826045
наб
nabijaczleweli at nabijaczleweli.xyz
Wed Sep 21 03:24:40 BST 2022
Hi!
Wrong MR; actually 170:
https://salsa.debian.org/systemd-team/systemd/-/merge_requests/170
And I forgot the patches. Thankfully, I came up with a much better way
of fixing this: since systemd v251 we can just copy the initrd.img-$KVER
to $KERNEL_INSTALL_STAGING_AREA, and 90-loaderentry will install and
verison it properly ‒ we never have to generate a bare "initrd" in the
first place!
Actually attached them this time :)
Transcript of installation with patched system follows.
Best,
наб
-- >8 --
nabijaczleweli at szarotka:/tmp$ kernel-install -v add $(uname -r) /boot/vmlinuz-$(uname -r)
Reading /usr/lib/kernel/install.conf…
BOOT_ROOT=/tmp/br set via environment or install.conf
machine-id adc518602b20465e982dd9c8266a32e3 acquired from /etc/machine-id
Entry-token candidates: adc518602b20465e982dd9c8266a32e3 debian Default
/tmp/br/adc518602b20465e982dd9c8266a32e3 not found…
/tmp/br/loader/entries not found…
/tmp/br/debian exists, using BOOT_ROOT=/tmp/br, ENTRY_TOKEN=debian
/tmp/br/debian exists, using layout=bls
Using ENTRY_DIR_ABS=/tmp/br/debian/5.19.0-1-amd64
Plugin files:
/usr/lib/kernel/install.d/50-depmod.install
/usr/lib/kernel/install.d/85-initrd.install
/usr/lib/kernel/install.d/90-loaderentry.install
+mkdir -v -p /tmp/br/debian/5.19.0-1-amd64
mkdir: created directory '/tmp/br/debian/5.19.0-1-amd64'
+/usr/lib/kernel/install.d/50-depmod.install add 5.19.0-1-amd64 /tmp/br/debian/5.19.0-1-amd64 /boot/vmlinuz-5.19.0-1-amd64
+depmod -a 5.19.0-1-amd64
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.dep.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.dep.bin.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.alias.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.alias.bin.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.softdep.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.symbols.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.symbols.bin.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.builtin.bin.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.builtin.alias.bin.8634.949744.1663726104, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/5.19.0-1-amd64, modules.devname.8634.949744.1663726104, 301, 644): Permission denied
+/usr/lib/kernel/install.d/85-initrd.install add 5.19.0-1-amd64 /tmp/br/debian/5.19.0-1-amd64 /boot/vmlinuz-5.19.0-1-amd64
Installing '/boot/initrd.img-5.19.0-1-amd64'
+/usr/lib/kernel/install.d/90-loaderentry.install add 5.19.0-1-amd64 /tmp/br/debian/5.19.0-1-amd64 /boot/vmlinuz-5.19.0-1-amd64
chown: changing ownership of '/tmp/br/debian/5.19.0-1-amd64/linux': Operation not permitted
Installing /tmp/br/debian/5.19.0-1-amd64/initrd.img-5.19.0-1-amd64
chown: changing ownership of '/tmp/br/debian/5.19.0-1-amd64/initrd.img-5.19.0-1-amd64': Operation not permitted
Creating /tmp/br/loader/entries/debian-5.19.0-1-amd64.conf
nabijaczleweli at szarotka:/tmp$ find br
br
br/loader
br/loader/entries
br/loader/entries/debian-5.19.0-1-amd64.conf
br/debian
br/debian/5.19.0-1-amd64
br/debian/5.19.0-1-amd64/initrd.img-5.19.0-1-amd64
br/debian/5.19.0-1-amd64/linux
nabijaczleweli at szarotka:/tmp$ cat br/loader/entries/debian-5.19.0-1-amd64.conf
title Debian GNU/Linux bookworm/sid
version 5.19.0-1-amd64
sort-key debian
options root=UUID=d9e8441a-1a97-47af-b002-d764ac46121b ro syscall.x32=y zfs.zfs_arc_max=2684354560 resume=PARTLABEL=szarotka-root-ng resume_offset=481280
linux /br/debian/5.19.0-1-amd64/linux
initrd /br/debian/5.19.0-1-amd64/initrd.img-5.19.0-1-amd64
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-extra-kernel-postinst.d-systemd-boot-prefix-w.patch
Type: text/x-diff
Size: 940 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220921/788ea453/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-debian-extra-kernel-install.d-85-initrd.install-inst.patch
Type: text/x-diff
Size: 1896 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220921/788ea453/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220921/788ea453/attachment-0001.sig>
More information about the Pkg-systemd-maintainers
mailing list