Package: raspi-firmware Version: 1.20210303+ds-2 Severity: important Hi,
Building bullseye images using raspi-team/image-specs[1] for the Pi 4 B or PI CM4 devices (`make raspi_4_bullseye.img`), I've been getting weird things… 1. https://salsa.debian.org/raspi-team/image-specs Sometimes the boot would stop after a few seconds (last kernel log with a timestamp around 6 seconds shown on HDMI), sometimes one would get a prompt about a missing root filesystem, and be dropped inside an initramfs prompt. (I've no certain answer at this point, but it seems that the order of console= parameters in cmdline.txt might explain that the prompt goes to the screen or the serial console; namely going to the serial console during the first boot, and on screen for further boots, due to the switched order after initial reconfiguration…) Anyway, let's focus on the raspi-firmware issue: - image-specs generates a label-based booting, using this cmdline parameter: root=LABEL=RASPIROOT (similar to root=UUID=…). - The first boot ensures the raspi-firmware hook is called: /etc/kernel/postinst.d/z50-raspi-firmware - Running this hook results in the root= parameter's being replaced with the /dev/mmcblkNp2 du jour (it might be /dev/mmcblk0p2, it might be /dev/mmcblk1p2). - Further boots might see the same device come up with a different ID, leading to the root= vs. actual /dev/mmcblkNp2 mismatch that prevents booting. In passing, the workaround in such cases is quite simple (when the actual error messages are accessible, and one has access to a keyboard or a serial console depending on cases): - symlink /dev/mmcblkXp2 to /dev/mmcblkYp2 - exit the initramfs shell and booting continues. I think I'd prefer it if raspi-firmware wouldn't touch an existing root= parameter. This would probably fix the very similar #984691 (about btrfs booting). Cheers, -- Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/