hamishm wrote: ↑2022-08-22 01:59
Why are your kernels so big? I have 3 and my /boot is under 200Mb including EFI, and that's including AMDGPU firmware.
Have you configured your initramfs generator to include more than needed?
I have switched to dracut rather than the default generator, which might help (though that isn't the reason I switched).
hamishm, I'm not going out of my way to bloat my kernels, just using the default linux-image-amd64 meta-package. Here is the machine I am on now:
Code: Select all
ls -lh /boot ; df -h | grep boot
total 166M
-rw-r--r-- 1 root root 231K Jul 23 15:32 config-5.10.0-16-amd64
-rw-r--r-- 1 root root 231K Aug 13 06:25 config-5.10.0-17-amd64
drwxr-xr-x 5 root root 1.0K Aug 31 13:13 grub/
-rw-r--r-- 1 root root 76M Aug 31 13:12 initrd.img-5.10.0-16-amd64
-rw-r--r-- 1 root root 77M Aug 31 13:13 initrd.img-5.10.0-17-amd64
drwx------ 2 root root 12K Oct 31 2015 lost+found/
-rw-r--r-- 1 root root 83 Jul 23 15:32 System.map-5.10.0-16-amd64
-rw-r--r-- 1 root root 83 Aug 13 06:25 System.map-5.10.0-17-amd64
-rw-r--r-- 1 root root 6.6M Jul 23 15:32 vmlinuz-5.10.0-16-amd64
-rw-r--r-- 1 root root 6.7M Aug 13 06:25 vmlinuz-5.10.0-17-amd64
/dev/sda1 ext2 234M 177M 45M 80% /boot
On this install I can fit two kernels, but not three. For some reason on other installs I can't even properly completely fit 2 kernels. It is kind of odd since my Debian installs are all cloned from the same source installer, and I haven't treated them differently,
DI-b2 _Jessie_ - Official Snapshot amd64 kde-CD Binary-1 20141883-18:31.
I hadn't tried to configure my initramfs, thank you for the suggestion of dracut, that made a huge difference.
Code: Select all
ls -lh /boot ; df -h | grep boot
total 82M
-rw-r--r-- 1 root root 231K Jul 23 15:32 config-5.10.0-16-amd64
-rw-r--r-- 1 root root 231K Aug 13 06:25 config-5.10.0-17-amd64
drwxr-xr-x 5 root root 1.0K Aug 31 13:13 grub/
-rw-r--r-- 1 root root 34M Aug 31 13:23 initrd.img-5.10.0-16-amd64
-rw-r--r-- 1 root root 34M Aug 31 13:23 initrd.img-5.10.0-17-amd64
drwx------ 2 root root 12K Oct 31 2015 lost+found/
-rw-r--r-- 1 root root 83 Jul 23 15:32 System.map-5.10.0-16-amd64
-rw-r--r-- 1 root root 83 Aug 13 06:25 System.map-5.10.0-17-amd64
-rw-r--r-- 1 root root 6.6M Jul 23 15:32 vmlinuz-5.10.0-16-amd64
-rw-r--r-- 1 root root 6.7M Aug 13 06:25 vmlinuz-5.10.0-17-amd64
/dev/sda1 ext2 234M 93M 130M 42% /boot
So if I install new hardware will it be recognized by the new dracut-pared kernel? I wasn't able to tell for sure from the Wikipedia page though it seems like I might be able to recognize new hardware. "Dracut's initramfs depends on the Linux device manager (udev) to create symbolic links to device nodes."
p.H., yes, seriously, I rebooted without sorting out the initrd stuff because in every single previous case when I got the "
Errors were encountered while processing: initramfs-tools" message I successfully booted in to the new kernel & was able to then remove the old kernel. I figured in the worst case I would be able to boot into the old focal kernel, and was surprised I wasn't able to do so.
Speaking of Ubuntu's tendency to accumulate kernels a weird thing is that when I manually remove an old kernel the default behavior is to then install the unsigned version of the same kernel, which kind of defeats the purpose.
Code: Select all
apt-get purge linux-image-5.13.0-51-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
linux-image-unsigned-5.13.0-51-generic
Suggested packages:
fdutils linux-doc | linux-hwe-5.13-source-5.13.0 linux-hwe-5.13-tools linux-modules-extra-5.13.0-51-generic
The following packages will be REMOVED:
linux-image-5.13.0-51-generic* linux-modules-extra-5.13.0-51-generic*
The following NEW packages will be installed:
linux-image-unsigned-5.13.0-51-generic
0 upgraded, 1 newly installed, 2 to remove and 1 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 296 MB disk space will be freed.
Do you want to continue? [Y/n]
I did a quick search to change this behavior but didn't immediately see anything, but it isn't hard to 'Ctrl+C" the action and add the unsigned version to the remove command.
BTW, I was able to use a USB drive as the /boot partition on my bedroom TV computer, I did install grub both to the SSD & the USB drive, but I didn't configure the BIOS on the first box I tried to use a USB /boot partition on to boot by default from the USB drive, if I recall correctly, maybe I would have been able to do that and it would have worked. In any case, now that I have been introduced to dracut that shouldn't be necessary.
p.H., I tried to manually partition a LUKS encrypted system with the current bullseye installer, but I wasn't able to figure it out, I was able to make a big /boot ext2 partition and then make a LUKS encrypted main partition, but the installer wouldn't let me open that partition and continue the install. Maybe I could have opened a TTY and did the necessary steps by hand, but I just got frustrated and looked around for an alternative installer and ran into Spirallinux.
Edit: my system rebooted normally after dracut and a USB wifi dongle that I didn't have plugged in when I ran dracut (and as I recall I had to compile stuff to get to work) was still recognized, allaying my fears that the slimmed down boot image would not recognize strange hardware.