JP6.1 ROOTFS A/B packed failed

Hi nVIDIA team,

I want to try rootfs redundancy, so I enable it by ROOTFS_AB=1
Here is my command:

sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=3 FUSELEVEL=fuselevel_production BOARDID=3767 BOARDSKU=0000 FAB=300 BOARDREV=G.3 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --no-flash --network usb0 jetson-orin-nano-devkit internal

and

sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=3 FUSELEVEL=fuselevel_production BOARDID=3767 BOARDSKU=0000 FAB=300 BOARDREV=G.3 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 -S 50GiB -c ./tools/kernel_flash/flash_l4t_nvme_rootfs_ab.xml --external-only --append --network usb0 jetson-orin-nano-devkit nvme0n1p1

It shows these error messages in the end

Error: /workshop/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /workshop/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up...

log file:
log_20241128.txt (205.2 KB)

What is the correct way to use rootfs redundancy with JP6.1?

PS: I need to create internal and external separately, due to this issue:

hello chuka_chiu,

please see-also $OUT/Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt of [Workflow 5] for the steps.


[EDIT] please refer to below comment #5 for the steps.


besides, here’re demonstration steps to enable RootfsAB.
(1) $ sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" --no-flash --network usb0 jetson-orin-nano-devkit internal
(2) $ sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 --external-only --append --network usb0 jetson-orin-nano-devkit external
(3) $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --network usb0 --flash-only

Hi Jerry,

Thanks for your reply.
Yes, I already follow workflow 5 of “Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt”
You can find that I add ROOTFS_AB=1 to create internal and external, but it return error messages.

And I tried those commands you provided,
(1)sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" --no-flash --network usb0 jetson-orin-nano-devkit internal
There is no bootloader/t186ref/ folder
(2)sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 --external-only --append --network usb0 jetson-orin-nano-devkit external
Flashing external device requires -c option to specify device partition layout
(3)sudo ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --network usb0 --flash-only
I cannot try this because (1), (2) failed

hello chuka_chiu,

Let’s skip ROOTFS_RETRY_COUNT_MAX setting since it’s by default as 3-trials.
Since JP-6 public release, the board name has changed to… $OUT/Linux_for_Tegra/bootloader/generic/

So…
Please follow below again to enable ROOTFS_AB on Orin-Nano with NVMe.
(1) $ sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --no-flash --network usb0 jetson-orin-nano-devkit internal
(2) $ sudo ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_ab.xml --external-only --append --network usb0 jetson-orin-nano-devkit external
(3) $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --network usb0 --flash-only

Upon system boot up, you may running below to confirm Rootfs-A/B slots are available.
for instance,
$ sudo nvbootctrl -t rootfs dump-slots-info
$ df -h

Hi Jerry,

It works and I can use nvbootctrl to switch A/B slot, thank you.

I compared the difference between commands,
and found parameter “-S 50GiB” cause these error message:

Error: /workshop/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /workshop/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up...

But it has “-S” in workflow 5 of “Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt”
Do you know what happened here?

hello chuka_chiu,

you should add EXT_NUM_SECTORS to generate images for external storage device.
here’s an example,
If your NVMe SSD is 128GiB
Set EXT_NUM_SECTORS=240000000 (about 114GiB) → smaller than NVMe actual size.
Set -S = 100GiB → bigger than APP size.

please refer to Partitioning with Orin NX disk encryption is not working properly - #9 by carolyuu as see-also.