Today I did a large update off my freedombox. It included security updates. After installation I got an notification that some kind of post-installation script for the linux kernel could not run. Since that moment, I also cannot install rrs-bridge or shaarli anymore due to some error. See information below. Help would be appriciated.
Steps to Reproduce
On a raspberry Pi 4b
- Login as admin
- Try to install rrs-bridge or shaarli
That it installed fine
I get an error as can be seen below.
Error installing app: Error running apt-get /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.10.0-18-arm64 cp: error writing ‘/boot/firmware/vmlinuz-5.10.0-18-arm64’: No space left on device run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return code 1 run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-5.10.0-18-arm64 (–configure): installed linux-image-5.10.0-18-arm64 package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of linux-image-arm64: linux-image-arm64 depends on linux-image-5.10.0-18-arm64 (= 5.10.140-1); however: Package linux-image-5.10.0-18-arm64 is not configured yet. dpkg: error processing package linux-image-arm64 (–configure): dependency problems - leaving unconfigured cp: error writing ‘/boot/firmware/vmlinuz-5.10.0-18-arm64’: No space left on device run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return code 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: linux-image-5.10.0-18-arm64 linux-image-arm64 initramfs-tools quota not working (qgroup not set) Config is in use. E: Sub-process /usr/bin/dpkg returned an error code (1) quota not working (qgroup not set) Config is in use. E: Sub-process /usr/bin/dpkg returned an error code (1)
FreedomBox version: FreedomBox versie 22.19.
Hardware: RaspberryPi 4b
How did you install FreedomBox?: I downloaded and installed it on an SD-card my self
The error log says
No space left on device, which means your storage is full.
You have to free up some space first and then run
sudo apt -f install to build the new kernel image.
unattended-upgrades in FreedomBox is configured to free up disk space by deleting old kernel files. Since this is a manual upgrade, you can delete them yourself or wait for unattended-upgrades to do its thing on the next automated upgrade.
Thanks for the response. I was not aware of that. Freedombox just had an update a few days back. I logged in in cockpit and saw those updates pending so I applied them. Suppose I will not do that anymore.
I will wait for the next update then. I don’t know how I can free-up space via the webinterface.
I think unattended-upgrades will not be able to fix this problem when there is a broken installation. The disk space must be freed up manually. You can use Cockpit’s terminal for this purpose.
I am not aware of the partitioning scheme in Raspberry Pi 4. Are those the only two partitions?
Files related to the kernel would generally be stored under /boot.
- Check the version of the kernel currently in use.
- Delete older versions of the kernel files from /boot or /boot/firmware if you find any.
apt -f install (and
dpkg --configure -a if necessary) to fix the broken package installation.
apt autoremove should be able to remove any additional unnecessary packages. Otherwise, run
apt remove linux-image-<version> packages to remove them manually.
Steps 3 and 4 won’t run without deleting some files in step 2.
Okay, I need some help here. I am able to find all partitions (ignore the sda, thats a backup usb).
Even after some searching I am not able to get on the boot partition via the terminal. Also, I don’t know for which files I need to look when I am. Can I manually remove all kernel files that are not in use? I am using kernel V 5.10.0-17-arm64 so I suppose I can remove all files before that version. Can you point me in the right direction here?
Did you switch to the root user before accessing the /boot directory?
sudo su -
Yes, you can. Just remove as many files as needed to get apt to fix its broken install of the latest kernel. Running the commands in step 4 of my previous reply will automatically remove the rest.
If this doesn’t work, there is another option - inserting the microSD card into your laptop/desktop, mounting the partitions and doing the required operations from there. This requires a Debian machine though. If you’re not running apt commands and only doing deletions, you can also do it from a GUI file manager. I wrote a wiki page with the commands required for Raspberry Pi 2 a few years ago.
Thanks for the help, I managed to free-up enough space. I can also install apps again.
I see that there are new updates available. So from now on, I should not install these but let the freedomboxOS manage it them self? Or should I manually start this one (via the freedombox settings, not via cockpit). Auto-update is enabled though I see.