README to explain the raspi-firmware issue for Debian Live builds for x86 targets 20250915 GLF --------------------------------------------------------------------------------------------------- The live build configuration filesets for Debian 12 MATE erroneously set up a problem for later attempts at hard drive installation of the built image. For an unknown reason, since at least Debian 12 bookworm, both amd64 and 686 builds of Debian cause installation of the package "raspi-firmware", which is not applicable to those platforms. Somehow, including that inappropriate firmware allows the image to successfully build to live image, but if later installed to hard drive, that same set of packages cannot be uograded except by special means. The raspi-fiormware package sets up an impossible situation in a postinstall script, such that the initramfs kernel module cannot build. This problem was found to exist on both Debian 12 and the current Debian 13 trixie. GLF does not know where the dependency on raspi-firmware occurs in the long list of packages, especially in the metapackages. The problem may have been present for years across several releases of Debian. Investigation into possible resolution of this issue showed that others had run into the problem, and that a workaround on an installed system could repair the problem such that future upgrades would work. The following script was found to successfully patch a 686 system such that a kernel upgrade could succeed afterwards: # The dpkg-command removes all files associated with the package on-disk. # That eliminates the postinstall script which forces the failure. # The dist-upgrade command reruns any unfinished apt tasks. sudo dpkg -P raspi-firmware sudo apt-get dist-upgrade Because a purge of all files associated with raspi-firmware was seen to allow the upgrade to succeed, GLF reasoned that if raspi-firmware could be excluded from the build altogether, it might allow a future upgrade to succeed. After searching for a mechanism in live-build to allow for such exculksion, GLF found that including the following "preferences" file as config/apt/preferences would prevent such installation at build time for Debian 13 builds of AMD64 images: Package: raspi-firmware Pin: version * Pin-Priority: -1 This was tested to build correctly for SLICK928_AMD64. The build omitted raspi-firmware from the list of installed packages (it remains to be seen if the technique actually works to repair upgrades to an installed system). However, when testing the same method on a Debian 12 build of GLFPE828_686, the build failed due to not having the raspi-firmware package available to satisfy a dependency. A second experiment was conducted to try the same build with the original raspi-firmware dependency satisfied, but to include the necessary rebuild of the initramfs kernel in a hook script. This builds the initramfs twice, but since it worked after installation, it was worth trying before installation. The latter method appears to work upn initial examination in that the build succeeds, but when the installed base of packages is examined, raspi-firmware is listed but not installed. In order to confirm the test method succeeds, it will be necessary to await the next upgrade of the kernel modules, which might take a few days or even weeks. Until then, it remains unknown whether the metyhod will allow the next upgrade to succeed without further intervention. It is likely, however, that the repair script can be applied upon initial failure to build the next initramfs, so it might be prudent to copy the repair script into /usr/local/bin to deal with the problem long-term. Ideally, whatever package is listing raspi-firmware as a dependency for x86 platforms should be patched, but that is a job for the Debian maintainers.