Re: Re: Updating kernels impossible when /boot is getting full

2021-08-20 Thread Ilkka Huotari
> Large unneeded files can be deleted with "rm".

This is what I ended up doing. The version 25 was in currently use and I
rm'ed all the old version files.

That worked, but I needed to do the same when version 31 appeared.
Fortunately the new version will get into use so rm will work.

Maybe apt-get upgrade could use some magic to get around the space
limitation issue. Or maybe something else could be done.

At install time it would be good to suggest some good size for the boot
partition. I did search a bit but ended up creating a too small partition,
maybe the info was too old.

Thanks all!

Ilkka


Re: Re: Updating kernels impossible when /boot is getting full

2021-08-01 Thread Ilkka Huotari
Hi Paul,

Thanks. I should have said, that also apt-get autoremove fails:

$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.139ubuntu3) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.139ubuntu3) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-25-generic
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.11.0-25-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess
returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Maybe this is a bug in the dpkg?

This sounds like some disk (it's a few years old SSD) error, but I don't
know:
"Error 24 : Write error : cannot write compressed block"

Contents of the /boot:

total 343M
-rw-r--r--  1 root root 248K kesä   17 01:38 config-5.11.0-22-generic
-rw-r--r--  1 root root 248K heinä   9 20:42 config-5.11.0-25-generic
drwx--  6 root root 4,0K tammi   1  1970 efi
drwxr-xr-x  4 root root 4,0K heinä  23 13:13 grub
-rw-r--r--  1 root root 153M heinä  10 14:22 initrd.img-5.11.0-22-generic
-rw-r--r--  1 root root 151M heinä  23 13:13 initrd.img-5.11.0-25-generic
lrwxrwxrwx  1 root root   28 heinä  23 06:04 initrd.img.old ->
initrd.img-5.11.0-22-generic
drwx--  2 root root  16K heinä   6 08:52 lost+found
-rw-r--r--  1 root root 179K elo18  2020 memtest86+.bin
-rw-r--r--  1 root root 181K elo18  2020 memtest86+.elf
-rw-r--r--  1 root root 181K elo18  2020 memtest86+_multiboot.bin
-rw---  1 root root 5,7M kesä   17 01:38 System.map-5.11.0-22-generic
-rw---  1 root root 5,7M heinä   9 20:42 System.map-5.11.0-25-generic
lrwxrwxrwx  1 root root   25 heinä  23 06:04 vmlinuz ->
vmlinuz-5.11.0-25-generic
-rw---  1 root root  15M kesä   17 01:55 vmlinuz-5.11.0-22-generic
-rw---  1 root root  15M heinä   9 21:04 vmlinuz-5.11.0-25-generic
lrwxrwxrwx  1 root root   25 heinä  23 06:04 vmlinuz.old ->
vmlinuz-5.11.0-22-generic

Ilkka


Updating kernels impossible when /boot is getting full

2021-07-31 Thread Ilkka Huotari
Hi,

I'm using Ubuntu 21. My /boot partition size is 500M and it's getting full:

/dev/sda1   446M  352M   61M  86% /boot

What's taking space are mainly these:

-rw-r--r--  1 root root 153M heinä  10 14:22 initrd.img-5.11.0-22-generic
-rw-r--r--  1 root root 151M heinä  23 13:13 initrd.img-5.11.0-25-generic

apt-get upgrade fails:

update-initramfs: Generating /boot/initrd.img-5.11.0-25-generic
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.11.0-25-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess
returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Resizing the partitions is very complicated because I'm using an encrypted
partition ( https://help.ubuntu.com/community/ResizeEncryptedPartitions ).
So that's really not an option for me.

How to fix this:

I suggest that apt-get/dpkg handles upgrading outside /boot. Two kernels
seem to fit there if the updating is done cleverly. Or if only one kernel
fits, then keep only on kernel in /boot.

Thanks,
Ilkka