A/B scheme set up boot up partition during the programming phase

Hi all,
I am trying to program an encrypted+AB scheme on TX2/NX, and I want to set up the active partition during the programming phase.
For example, if I want unit to boot up to partition A all the time after programming.

I do now using below can setup the active A/B partition during the

sudo nvbootctrl set-active-boot-slot 1

But when I set it up, and re-programming my tx/nx2, it will boot up to partition _b.
It seems programming does not change/revirgin the active partition.
thanks

Hi jiangpen,

For slot A, it should be 0.
As a result, please run the following command to boot from chain A.

$ sudo nvbootctrl set-active-boot-slot 0
$ sudo reboot

@KevinFFF , yes, I understand this, it is run time. my question is how to change/set the active partition during the programming phase. That every unit re-program, has same active partition. thanks

They are configured through UEFI variable.
The default slot would be slot A.
May I know what’s your use case? you want to boot from slot B by default?

@KevinFFF ,the problem is when a unit is set to boot to B, even re-program, it still boot to B partition.
we want all units after re-program all of them boot to default A.
may I know how to program UEFI variable in during programming? thanks

As my understanding, it should boot from chain A after reflash.
How did you flash your board?

@KevinFFF , I used below command to program my device. thanks

ROOTFS_ENC=1 ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh  --external-device nvme0n1p1 -S 40GiB --showlogs -c ./tools/kernel_flash/flash_l4t_nvme_rootfs_enc_ab.xml --external-only jetson-xavier-nx-devkit-tx2-nx external

It seems you enabled the disk-encryption, could you add -i to specify the ebk.key?

yes, I have the encryption and A/B enabled same time, and it works fine now. I use the automatic generated key.
but I am not sure if I need program internal device in this case ? and may I know how to program the A/B active partition during the programming phase?

It seems you are using NVMe for both rootfs a/b and disk-encryption enabled.
You don’t need to care about the internal eMMC.

You can use --boot-chain-select A in flash.sh or -p "--boot-chain-select A" for initrd flash script.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.