#1055084 raspi-firmware: Raspberry Pi 4 fails to boot 6.1.0-13-arm64 reliably (detects /dev/mmcblk0 instead of mmcblk1)

#1055084#5
Date:
2023-10-31 07:47:21 UTC
From:
To:
After upgrading my RPI4 to bookworm, it no longer boots reliably.
Sometimes the SD card gets detected as mmcblk0, sometimes as mmcblk1,
causing the initramfs to fail to find the root filesystem.

Going back to the bullseye kernel (5.10.0-26-arm64) makes it boot
reliably, detecting the SD card as mmcblk1.

#1055084#10
Date:
2023-10-31 09:44:33 UTC
From:
To:
Hi Lucas,

Lucas Nussbaum <lucas@debian.org> (2023-10-31):

Using label-based booting makes this issue go away:
https://salsa.debian.org/raspi-team/image-specs/-/commit/f89f71560d2ca1bd60d97dbb26b89782657d56ae

Before this commit, the first few boots would happen with a label-based
booting, but that would go away as soon as the raspi-firmware hook would
run, leaving you to get either mmcblk0 or mmcblk1 at boot-up.

I only observed that on the Pi 4 family (Pi 4 and Compute Module 4), and
I'm not sure this is directly linked to the Linux version. (I've had a
lot of back and forth due to heavy debugging so I don't recall coming to
a conclusion for that one except “use labels, always”.)


Cheers,

#1055084#15
Date:
2023-10-31 13:37:21 UTC
From:
To:
So, assuming there's a specific issue when upgrading from bullseye to
bookworm (which I believe but I'm not 100% sure), this would affect
upgrades but not new installs, since new installs now use partition
labels.

For reference, to fix this, I did:
# check that I use labels
lsblk -o name,mountpoint,label,size,uuid
# edit /etc/default/raspi-firmware
sed -i 's/^#ROOTPART=.*/ROOTPART=LABEL=RASPIROOT/' /etc/default/raspi-firmware
# apply changes to cmdline.txt
dpkg-reconfigure raspi-firmware
# check that cmdline.txt looks good
# reboot

Lucas