Re: listing initrd content
On Tue, 3 Aug 2021 at 02:03, David wrote: > On Tue, 3 Aug 2021 at 01:45, David Wright wrote: > As the warning says, it and /usr/bin/cryptroot-unlock will go away > if you uninstall 'cryptsetup-initramfs', which is pulled in by 'cryptsetup', > which describes itself as a transitional dummy package that > can be removed. You probably only need 'cryptsetup-run' and > 'cryptsetup-bin'. I learned this by running > apt show 'cryptsetup*' > and tried it and it works fine where appropriate. The above applies to buster. Today I see that bullseye is different. In bullseye, the useful packages are cryptsetup, cryptsetup-bin, and cryptsetup-initramfs. And cryptsetup-run is a dummy package that can be removed.
Re: listing initrd content
On Tue 03 Aug 2021 at 02:03:57 (+1000), David wrote: > On Tue, 3 Aug 2021 at 01:45, David Wright wrote: > > > BTW I encrypt only /home and swap, and AFAICT my initrd.img doesn't > > contain crypt stuff except for /usr/bin/cryptroot-unlock (5686B). > > So I ignore a polite warning at every rebuild: > > > > update-initramfs: Generating /boot/initrd.img-4.19.0-17-amd64 > > cryptsetup: WARNING: The initramfs image may not contain cryptsetup > > binaries > > nor crypto modules. If that's on purpose, you may want to uninstall > > the > > 'cryptsetup-initramfs' package in order to disable the cryptsetup > > initramfs > > integration and avoid this warning. > > Log ended: 2021-07-20 10:07:25 > > As the warning says, it and /usr/bin/cryptroot-unlock will go away > if you uninstall 'cryptsetup-initramfs', which is pulled in by 'cryptsetup', > which describes itself as a transitional dummy package that > can be removed. You probably only need 'cryptsetup-run' and > 'cryptsetup-bin'. I learned this by running > apt show 'cryptsetup*' > and tried it and it works fine where appropriate. I was really just pointing out that having the encryption packages installed on the system doesn't mean that any extra functionality gets included in the initrd.img file. So I can't quite see the point of removing packages from the system in order to reduce the initrd.img's size. I don't know, without seeing a list of differences in the file content, whether dracut is doing its job (reducing the size), because, for example, is it reading the same configuration info on compression. That alone could account for a 6MB difference, I presume. (BTW I omitted to say that swap has a random key, so RESUME=none makes that a non-issue.) Cheers, David.
Re: listing initrd content
On Tue, 3 Aug 2021 at 01:45, David Wright wrote: > BTW I encrypt only /home and swap, and AFAICT my initrd.img doesn't > contain crypt stuff except for /usr/bin/cryptroot-unlock (5686B). > So I ignore a polite warning at every rebuild: > > update-initramfs: Generating /boot/initrd.img-4.19.0-17-amd64 > cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries > nor crypto modules. If that's on purpose, you may want to uninstall the > 'cryptsetup-initramfs' package in order to disable the cryptsetup > initramfs > integration and avoid this warning. > Log ended: 2021-07-20 10:07:25 As the warning says, it and /usr/bin/cryptroot-unlock will go away if you uninstall 'cryptsetup-initramfs', which is pulled in by 'cryptsetup', which describes itself as a transitional dummy package that can be removed. You probably only need 'cryptsetup-run' and 'cryptsetup-bin'. I learned this by running apt show 'cryptsetup*' and tried it and it works fine where appropriate.
Re: listing initrd content
On Mon, Aug 02, 2021 at 10:45:25AM -0500, David Wright wrote: > You posted here their precise sizes before you installed dracut. > What's the size of your new initrd.img—has dracut done its job? unicorn:~$ ls -l /boot/initrd* -rw-r--r-- 1 root root 30924690 Jan 29 2021 /boot/initrd.img-4.19.0-13-amd64 -rw-r--r-- 1 root root 34310935 Jul 21 07:30 /boot/initrd.img-5.10.0-7-amd64 -rw-r--r-- 1 root root 40636944 Aug 2 07:24 /boot/initrd.img-5.10.0-8-amd64 For some reason, it only updated the "current" one. It's 6 MB larger now than it was before.
Re: listing initrd content
On Mon 02 Aug 2021 at 07:51:55 (-0400), Greg Wooledge wrote: > On Mon, Aug 02, 2021 at 07:41:03AM -0400, The Wanderer wrote: > > On 2021-08-02 at 07:25, Greg Wooledge wrote: > > > > > unicorn:~$ lsinitrd /boot/initrd.img-5.10.0-8-amd64 | wc -l > > > 1646 > > > unicorn:~$ lsinitramfs /boot/initrd.img-5.10.0-8-amd64 | wc -l > > > 1635 > > > > > > Curious. > > > > Try a diff between the lsinit* outputs? I don't have dracut-core > > installed, or I'd run the test myself just out of curiosity. > > I didn't have it either; I installed it specifically to test this thing. > Unfortunately, installing it also brought in "cryptsetup" and related > packages, which modified the initrd images. Because of that, I don't > recommend this test for anyone else. > > unicorn:~$ lsinitramfs -l /boot/initrd.img-5.10.0-8-amd64 | head > [ … ] > unicorn:~$ lsinitrd /boot/initrd.img-5.10.0-8-amd64 | head > [ … ] > > At first glance, it looks like the difference in line count might be > due to these headers and footers around each archive. > > But if I actually do > > diff -u <(lsinitramfs -l /boot/initrd.img-5.10.0-8-amd64) <(lsinitrd > /boot/initrd.img-5.10.0-8-amd64) | less > > there are a whole bunch of other differences. Some archive member files > are moved around, which I cannot understand (the biggest offenders are > the 0-length hard link indicators such as usr/bin/umount). I'm not sure > if those are the *only* differences, because there's so much noise due > to that. You posted here their precise sizes before you installed dracut. What's the size of your new initrd.img—has dracut done its job? Package: dracut-core Description-md5: 5df7edfd996e6db7e65cd0435ed243c3 Description-en: dracut is an event driven initramfs infrastructure (core tools) Unlike existing initramfs's, this is an attempt at having as little as possible hard-coded into the initramfs as possible. The initramfs has (basically) one purpose in life -- getting the rootfs mounted so that we can transition to the real rootfs. This is all driven off of device availability. Therefore, instead of scripts hard-coded to do various things, we depend on udev to create device nodes for us and then when we have the rootfs's device node, we mount and carry on. Having the root on MD, LVM2, LUKS is supported as well as NFS, iSCSI, NBD and FCOE with dracut-network. BTW I encrypt only /home and swap, and AFAICT my initrd.img doesn't contain crypt stuff except for /usr/bin/cryptroot-unlock (5686B). So I ignore a polite warning at every rebuild: update-initramfs: Generating /boot/initrd.img-4.19.0-17-amd64 cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries nor crypto modules. If that's on purpose, you may want to uninstall the 'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs integration and avoid this warning. Log ended: 2021-07-20 10:07:25 Cheers, David.
Re: listing initrd content
On 2021-08-02 at 07:51, Greg Wooledge wrote: > On Mon, Aug 02, 2021 at 07:41:03AM -0400, The Wanderer wrote: > >> On 2021-08-02 at 07:25, Greg Wooledge wrote: >> >> > unicorn:~$ lsinitrd /boot/initrd.img-5.10.0-8-amd64 | wc -l >> > 1646 >> > unicorn:~$ lsinitramfs /boot/initrd.img-5.10.0-8-amd64 | wc -l >> > 1635 >> > >> > Curious. >> >> Try a diff between the lsinit* outputs? I don't have dracut-core >> installed, or I'd run the test myself just out of curiosity. > > I didn't have it either; I installed it specifically to test this thing. > Unfortunately, installing it also brought in "cryptsetup" and related > packages, which modified the initrd images. Because of that, I don't > recommend this test for anyone else. dracut-core has cryptsetup in Recommends:, so that could be avoided with --no-install-recommends. Maybe try removing dracut-core, 'apt-get autoremove' / 'apt-get remove $(deborphan)' etc. till nothing new is removed, then install dracut-core again without Recommends and see if that improves things any? That's a bigger and more drastic operation than it sounded like when I started writing out the steps, though, so maybe not worth bothering with. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw signature.asc Description: OpenPGP digital signature
Re: listing initrd content
On Mon, Aug 02, 2021 at 07:41:03AM -0400, The Wanderer wrote: > On 2021-08-02 at 07:25, Greg Wooledge wrote: > > > unicorn:~$ lsinitrd /boot/initrd.img-5.10.0-8-amd64 | wc -l > > 1646 > > unicorn:~$ lsinitramfs /boot/initrd.img-5.10.0-8-amd64 | wc -l > > 1635 > > > > Curious. > > Try a diff between the lsinit* outputs? I don't have dracut-core > installed, or I'd run the test myself just out of curiosity. I didn't have it either; I installed it specifically to test this thing. Unfortunately, installing it also brought in "cryptsetup" and related packages, which modified the initrd images. Because of that, I don't recommend this test for anyone else. unicorn:~$ lsinitramfs -l /boot/initrd.img-5.10.0-8-amd64 | head drwxr-xr-x 2 root root0 Apr 25 08:00 kernel drwxr-xr-x 2 root root0 Apr 25 08:00 kernel/x86 drwxr-xr-x 2 root root0 Apr 25 08:00 kernel/x86/microcode drwxr-xr-x 2 root root0 Apr 25 08:00 kernel/x86/microcode/.enuineIntel.align.0123456789abc -rw-r--r-- 1 root root 4609024 Apr 25 08:00 kernel/x86/microcode/GenuineIntel.bin drwxr-xr-x 8 root root0 Aug 2 07:24 . lrwxrwxrwx 1 root root7 Aug 2 07:24 bin -> usr/bin drwxr-xr-x 3 root root0 Aug 2 07:24 conf -rw-r--r-- 1 root root 16 Aug 2 07:24 conf/arch.conf drwxr-xr-x 2 root root0 Aug 2 07:24 conf/conf.d unicorn:~$ lsinitrd /boot/initrd.img-5.10.0-8-amd64 | head Image: /boot/initrd.img-5.10.0-8-amd64: 39M Early CPIO image drwxr-xr-x 2 root root0 Apr 25 08:00 kernel drwxr-xr-x 2 root root0 Apr 25 08:00 kernel/x86 drwxr-xr-x 2 root root0 Apr 25 08:00 kernel/x86/microcode drwxr-xr-x 2 root root0 Apr 25 08:00 kernel/x86/microcode/.enuineIntel.align.0123456789abc -rw-r--r-- 1 root root 4609024 Apr 25 08:00 kernel/x86/microcode/GenuineIntel.bin At first glance, it looks like the difference in line count might be due to these headers and footers around each archive. But if I actually do diff -u <(lsinitramfs -l /boot/initrd.img-5.10.0-8-amd64) <(lsinitrd /boot/initrd.img-5.10.0-8-amd64) | less there are a whole bunch of other differences. Some archive member files are moved around, which I cannot understand (the biggest offenders are the 0-length hard link indicators such as usr/bin/umount). I'm not sure if those are the *only* differences, because there's so much noise due to that.
Re: listing initrd content
On 2021-08-02 at 07:25, Greg Wooledge wrote: > unicorn:~$ lsinitrd /boot/initrd.img-5.10.0-8-amd64 | wc -l > 1646 > unicorn:~$ lsinitramfs /boot/initrd.img-5.10.0-8-amd64 | wc -l > 1635 > > Curious. Try a diff between the lsinit* outputs? I don't have dracut-core installed, or I'd run the test myself just out of curiosity. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw signature.asc Description: OpenPGP digital signature
Re: listing initrd content (was: Updating kernels impossible...)
On Mon, Aug 02, 2021 at 01:20:13AM -0400, Felix Miata wrote: > David Christensen composed on 2021-08-01 15:29 (UTC-0700): > > > 2021-08-01 14:10:24 root@dipsy /tmp/initrd.img-4.19.0-17-amd64 > > # gunzip -c /boot/initrd.img-4.19.0-17-amd64 | cpio -i -d -H newc > > --no-absolute-filenames > > 246741 blocks > > > If only searching whether a string is contained therein, or wanting a list, > it can be simpler: > > # uname -v > #1 SMP Debian 5.10.46-3 (2021-07-28) > # which lsinitrd > /usr/bin/lsinitrd > # apt-file search /usr/bin/lsinitrd > dracut-core: /usr/bin/lsinitrd > # lsinitrd /initrd.img | wc -l > 455 unicorn:~$ lsinitrd /boot/initrd.img-5.10.0-8-amd64 | wc -l 1646 unicorn:~$ lsinitramfs /boot/initrd.img-5.10.0-8-amd64 | wc -l 1635 Curious.
Re: listing initrd content (was: Updating kernels impossible...)
David Christensen composed on 2021-08-01 15:29 (UTC-0700): > 2021-08-01 14:10:24 root@dipsy /tmp/initrd.img-4.19.0-17-amd64 > # gunzip -c /boot/initrd.img-4.19.0-17-amd64 | cpio -i -d -H newc > --no-absolute-filenames > 246741 blocks If only searching whether a string is contained therein, or wanting a list, it can be simpler: # uname -v #1 SMP Debian 5.10.46-3 (2021-07-28) # which lsinitrd /usr/bin/lsinitrd # apt-file search /usr/bin/lsinitrd dracut-core: /usr/bin/lsinitrd # lsinitrd /initrd.img | wc -l 455 -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata