5

I'm running a custom kernel since months, with no modules, no initramfs, no initrd.

I've byed a new webcam (lockdown...), and of course it doesn't work because i've haven't the correct module. I started building a new kernel from 5.7.9.

(...)copying an oldconfig from the original kernel from the distribution (linux mint) into the source rep(...)
make oldconfig
make
make modules_install

but the last step fails

make install

sh ./arch/x86/boot/install.sh 5.9.7 arch/x86/boot/bzImage
System.map "/boot" run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.9.7 /boot/vmlinuz-5.9.7 run-parts: executing /etc/kernel/postinst.d/dkms 5.9.7 /boot/vmlinuz-5.9.7

  • dkms: running auto installation service for kernel 5.9.7 [ OK ]

run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.9.7 /boot/vmlinuz-5.9.7 update-initramfs: Generating /boot/initrd.img-5.9.7 W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125b-2.fw for module r8169 I: The initramfs will attempt to resume from /dev/sda3 I: (UUID=8630d321-f53f-410f-a44a-8d6e91235129) I: Set the RESUME variable to override this. Error 24 : Write error : cannot write compressed block E: mkinitramfs failure cpio 141 lz4 -9 -l 24 update-initramfs: failed for /boot/initrd.img-5.9.7 with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 make[1]: *** [arch/x86/boot/Makefile:160 : install] Erreur 1 make: *** [arch/x86/Makefile:274 : install] Erreur 2

I've seen a lot of space problems on boot but seems doesn't my case.

For information :

more /etc/fstab                                       ✔  15m 55s  10:09:59 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda4 during installation
UUID=8b16e804-06d3-4291-a33f-227b961e9b8e /               ext4    errors=remount
-ro 0       1
# /boot was on /dev/sda2 during installation
UUID=6c6fe91d-c3df-4580-ba40-e19dd31710d4 /boot           ext4    defaults      
  0       2
# /boot/efi was on /dev/sda1 during installation
UUID=43E1-4AD4  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb3 during installation
UUID=c189cd20-50ff-4ec8-ae61-cbc870fb8926 /home           ext4    defaults      
  0       2
# swap was on /dev/sda3 during installation
UUID=8630d321-f53f-410f-a44a-8d6e91235129 none            swap    sw            
  0       0

and disk usage...

df -h                                                                                                 ✔  10s  10:21:15 
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
udev               3,9G       0  3,9G   0% /dev
tmpfs              790M    3,2M  787M   1% /run
/dev/sda4           91G     16G   70G  19% /
tmpfs              3,9G    114M  3,8G   3% /dev/shm
tmpfs              5,0M    4,0K  5,0M   1% /run/lock
tmpfs              3,9G       0  3,9G   0% /sys/fs/cgroup
/dev/sda2          923M    249M  611M  29% /boot
/dev/sda1          197M    7,8M  190M   4% /boot/efi
/dev/sdb3          484G    237G  223G  52% /home
tmpfs              790M     16K  790M   1% /run/user/1000

I've modified some Grub2 parameters too, I don't know if this can cause the problem...

Actually i can boot on any of my kernels (original kernels, with initramfs boot, my custom kernel...) but I just can't install this new one. Any idea ?

1 Answers1

7

The important feedback in the response from sudo apt upgrade is this:

Error 24 : Write error : cannot write compressed block

In other words there is probably insufficient space on /boot to write-out and complete the upgrade. To check, type:

df -h | grep boot

If you've used ~90% of the space and have only a few tens of megabytes free space this is clearly your problem. However, this will depend on the space needed by your custom kernel.

The fix is to remove unwanted kernel images. Type sudo apt list --installed | grep linux-image and you'll get something like this:

linux-image-5.4.0-54-generic/focal-updates,now 5.4.0-54.60 amd64 [installed,auto-removable]
linux-image-5.4.0-56-generic/now 5.4.0-56.62 amd64 [installed,local]
linux-image-5.4.0-58-generic/focal-updates,focal-security,now 5.4.0-58.64 amd64 [installed,automatic]
linux-image-5.4.0-59-generic/focal-updates,now 5.4.0-59.65 amd64 [installed,automatic]
linux-image-generic/focal-updates,now 5.4.0.59.62 amd64 [installed,automatic]

Remove unwanted images using:

sudo apt remove linux-headers-5.4.0-54 linux-headers-5.4.0-54-generic linux-image-5.4.0-54-generic linux-modules-5.4.0-54-generic

Substitute 5.4.0-54 for your kernel image. You'll not need to re-run sudo apt upgrade -y. However, if you do you will see something like this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-56 linux-headers-5.4.0-56-generic linux-image-5.4.0-56-generic linux-modules-5.4.0-56-generic
  linux-modules-extra-5.4.0-56-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So, execute sudo apt autoremove and in future read the output of apt upgrade and be sure to do your housekeeping!