Hello,
I have been struggling to get the tryboot functionality to fully work and could use some help.
I've started going in circles at this point.
system details:
CM4 + carrier board.
I'm using the raspberry OS lite image. (2025-05-13-raspios-bookworm-arm64-lite.img)
I updated the EEPROM firmware of the CM4 to the latest available.
While I was able to get my system to boot to A & B slots, I keep ending up in a scenario where the B slot will not load modules on boot (which means I lose USB and my keyboard..)
My overall goal is to have A/B image for redundancy on an embedded device. I plan to use RAUC to manage the updates, but I haven't gotten past this issue with tryboot and problems with my images.
Can anyone point me to tutorials or official PI documentation that shows how this feature works and how to use it?
I asked chatGPT for setup instructions, as I did not find much documentation on the requirements for these features.
I can't tell if the steps I've taken are valid, and I've gone in quite a few circles trying to get the system setup correctly.
Assuming there's no solid documentation on these features, here's what I have in case anyone has a clue as to what I might need to consider differently.
CM4
my partition layout of the eMMC
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTSNote
mmcblk0 179:0 0 29.1G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part /boot/firmware"bootA - fat32"
├─mmcblk0p2 179:2 0 3G 0 part /"rootfsA - ext4"
├─mmcblk0p3 179:3 0 512M 0 part"bootB - fat32"
├─mmcblk0p4 179:4 0 1K 0 part"extended partition"
├─mmcblk0p5 179:5 0 3G 0 part"rootfsB - ext4"
└─mmcblk0p6 179:6 0 22.1G 0 part"data - ext4"
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk
Image I have used for both A and B: 2025-05-13-raspios-bookworm-arm64-lite.img
I load the image file to bootA and rootfsA, using losetup to put the image on a /dev/loop and mounting to /mnt/img-root and /mnt/img-boot
then
sudo rsync -aHAX /mnt/img-boot/ /mnt/bootA/
sudo rsync -aHAX /mnt/img-boot/ /mnt/bootB/
sudo rsync -aHAX /mnt/img-root/ /mnt/rootfsA/
sudo rsync -aHAX /mnt/img-root/ /mnt/rootfsB/
I then modifiy /etc/fstab for both and update the LABELs needed.
then edit cmdline.txt and update the LABEL
then edit config.txt to enable tryboot_a_b
add autoboot.txt for both.
I use sudo reboot "0 tryboot" to initiate booting to slot B. which is working.
however, I had to modify cmdline.txt to use the /dev/mmcblk0p5 instead of the LABEL for some unknown reason.
and then I lose USB functionality too, I think it's tied to something with the initramfs.
When it worked at one point, I had rebuilt the initramfs while running Slot A, and the slot B stopped loading the USB module right after.
thanks for any suggestions!
Matt
I have been struggling to get the tryboot functionality to fully work and could use some help.
I've started going in circles at this point.
system details:
CM4 + carrier board.
I'm using the raspberry OS lite image. (2025-05-13-raspios-bookworm-arm64-lite.img)
I updated the EEPROM firmware of the CM4 to the latest available.
While I was able to get my system to boot to A & B slots, I keep ending up in a scenario where the B slot will not load modules on boot (which means I lose USB and my keyboard..)
My overall goal is to have A/B image for redundancy on an embedded device. I plan to use RAUC to manage the updates, but I haven't gotten past this issue with tryboot and problems with my images.
Can anyone point me to tutorials or official PI documentation that shows how this feature works and how to use it?
I asked chatGPT for setup instructions, as I did not find much documentation on the requirements for these features.
I can't tell if the steps I've taken are valid, and I've gone in quite a few circles trying to get the system setup correctly.
Assuming there's no solid documentation on these features, here's what I have in case anyone has a clue as to what I might need to consider differently.
CM4
my partition layout of the eMMC
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTSNote
mmcblk0 179:0 0 29.1G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part /boot/firmware"bootA - fat32"
├─mmcblk0p2 179:2 0 3G 0 part /"rootfsA - ext4"
├─mmcblk0p3 179:3 0 512M 0 part"bootB - fat32"
├─mmcblk0p4 179:4 0 1K 0 part"extended partition"
├─mmcblk0p5 179:5 0 3G 0 part"rootfsB - ext4"
└─mmcblk0p6 179:6 0 22.1G 0 part"data - ext4"
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk
Image I have used for both A and B: 2025-05-13-raspios-bookworm-arm64-lite.img
I load the image file to bootA and rootfsA, using losetup to put the image on a /dev/loop and mounting to /mnt/img-root and /mnt/img-boot
then
sudo rsync -aHAX /mnt/img-boot/ /mnt/bootA/
sudo rsync -aHAX /mnt/img-boot/ /mnt/bootB/
sudo rsync -aHAX /mnt/img-root/ /mnt/rootfsA/
sudo rsync -aHAX /mnt/img-root/ /mnt/rootfsB/
I then modifiy /etc/fstab for both and update the LABELs needed.
then edit cmdline.txt and update the LABEL
then edit config.txt to enable tryboot_a_b
add autoboot.txt for both.
I use sudo reboot "0 tryboot" to initiate booting to slot B. which is working.
however, I had to modify cmdline.txt to use the /dev/mmcblk0p5 instead of the LABEL for some unknown reason.
and then I lose USB functionality too, I think it's tied to something with the initramfs.
When it worked at one point, I had rebuilt the initramfs while running Slot A, and the slot B stopped loading the USB module right after.
thanks for any suggestions!
Matt
Statistics: Posted by mb2025 — Thu Sep 18, 2025 9:31 pm