Nvbootctrl, booting from emmc and SSD

Previously with JP 4 we had two rootfs systems each for a different purpose, one was on SSD which was the main one (slot 0, nvme01) and the other was on emmc (slot 1) , we used to switch between the two by using nvbootctrl 0 or nvbootctrl 1. Now with the JP5.1.2 and new bootloader this does not work anymore. We would like to know how we can implement this solution. Is this still possible?

1- previously in JP4 we did not flash with ROOTFS_AB=1, is this still required? Note that we aren’t interested in redundancy, we just want to boot from different devices (update the boot device).
2- when switching using nvbootctrl do we need to use the “-t rootfs” option now (ex: nvbootctrl -t rootfs set-active-boot-slot .)

If you can point us to any documentation on how to do this (with or without nvbootctrl) that would be great.
Thank you

Hi,

You should just use the UEFI boot menu for switching between storage devices for booting.

Thank you DaveYYY, Can this be done programmatically via calling a command line utility (not UI). At this point our device has booted from EMMC and it is inside initrd.

Hi,

I’m afraid that’s not possible.
You need to enter the UEFI menu by pressing down ESC during booting.

Thanks so I assume there is no efibootmgr command line
Can we change the boot device by calling
/bin/systemctl --no-block switch-root [new boot device]
will this work?

I think that’s used for switching from the initrd to the real rootfs, but not something like from the eMMC to the NVMe drive.

Thank you again DaveYYY, what about using setenv as described in this post. Would this work for NX?

That only works for U-Boot but not UEFI.

Thank you again Dave,

Can we update and overwrite the L4TConfiguration.dtbo file every time we do this. We change the data = “usb,nvme,emmc,sd,ufs”
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Bootloader/UEFI.html

YES.
You can only do it from the UEFI menu, but if you don’t need to change the boot order very frequently, then I think accessing the UEFI menu should not be difficult.

Of course you can, but as it requires re-flashing, I won’t call it a solution for your use case.

Hi DaveYYY,
I have one more question, is it possible to get the device boot from EMMC first (this is what is happening now) and then inside extlinux.conf use a root (root=UUID= …) that points to another device (SSD)? In that case does it pick up the dtb and everything else from the SSD?

Hi,

YES.
Of course you can do it. In that case, only the kernel image and the device tree will be loaded from the eMMC, and the entire rootfs will be mounted on the NVMe drive.

Thank you Dave

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