my raspi has this fstab:
UUID=7d298733-8450-4adb-b654-6de49954db5c / btrfs defaults 0 0 UUID=AD5E-0725 /boot/firmware vfat defaults 0 1
Then the disc UUID=AD5E-0725 /boot/firmware got corrupt and i restored the contents of it from a backup about a year old. The system booted up normally.
But as soon as the first kernel update was made it did not boot. Took me a while to figure out why, but this is the problem.
r@r-pi:~$ sudo dpkg -C [sudo] password for rodney: The following packages have been unpacked but not yet configured. They must be configured using dpkg --configure or the configure menu option in dselect for them to work: linux-image-raspi Raspberry Pi Linux kernel image linux-raspi Complete Raspberry Pi Linux kernel and headers The following packages are only half configured, probably due to problems configuring them the first time. The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect: linux-firmware Firmware for Linux kernel drivers r@r-pi:~$ sudo apt install --reinstall linux-firmware Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for linux-firmware:armhf
So the problem is that apt-get has somewhere in its database that the last versions of these packages were around kernel version 4.x.y-zzzz-raspi. I manually copied /boot and /boot/firmware folder so the device boots with kernel 5.4.0-1015-raspi, but as soon as it tries to update to 5.4.0-1030-raspi the following errors occurs:
flash-kernel: deferring update (trigger activated) update-initramfs: Generating /boot/initrd.img-5.4.0-1015-raspi cat: /var/tmp/mkinitramfs_QvTD7G/lib/modules/5.4.0-1015-raspi/modules.builtin: No such file or directory find: ‘/var/tmp/mkinitramfs_QvTD7G/lib/modules/5.4.0-1015-raspi/kernel’: No such file or directory depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_QvTD7G/lib/modules/5.4.0-1015-raspi: No such file or directory depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_QvTD7G/lib/modules/5.4.0-1015-raspi: No such file or directory Using DTB: bcm2709-rpi-2-b.dtb Couldn't find DTB bcm2709-rpi-2-b.dtb on the following paths: /etc/flash-kernel/dtbs /usr/lib/linux-image-5.4.0-1015-raspi /lib/firmware/5.4.0-1015-raspi/device-tree/ Installing into /boot/dtbs/5.4.0-1015-raspi/./bcm2709-rpi-2-b.dtb cp: cannot stat '': No such file or directory run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1 dpkg: error processing package linux-firmware (--configure): installed linux-firmware package post-installation script subprocess returned error exit status 1 Setting up udev (245.4-4ubuntu3.5) ... update-initramfs: deferring update (trigger activated) dpkg: dependency problems prevent configuration of linux-image-raspi: linux-image-raspi depends on linux-firmware; however: Package linux-firmware is not configured yet. dpkg: error processing package linux-image-raspi (--configure): dependency problems - leaving unconfigured Setting up initramfs-tools-bin (0.136ubuntu6.4) ...No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of linux-raspi: linux-raspi depends on linux-image-raspi (= 126.96.36.1990.65); however: Package linux-image-raspi is not configured yet. dpkg: error processing package linux-raspi (--configure): dependency problems - leaving unconfigured Setting up initramfs-tools-core (0.136ubuntu6.4) ... No apport report written because the error message indicates its a followup error from a previous failure.
Any ideas how to fix this, so that i can once more do regular updates?
btw this is the list of commands i tried to fix this:
966 sudo apt install --reinstall linux-firmware 967 sudo apt install linux-firmware 999 sudo apt-get full-upgrade 1001 sudo apt remove linux-firmware linux-image-raspi linux-raspi 1002 sudo apt-get install linux-firmware linux-image-raspi linux-raspi