Unable to boot from eMMC when not using the SD card on Jetpack 4.6

I am trying to boot from the SD on my AGX-Xavier board. I followed the blog by jetsonhacks.

However I couldn’t get this running on my jetson as it was running on the latest Jetpack, i.e JP4.6 and this blog supports only versions before this.

So I had to modify the /boot/extlinux/extlinux.conf on my eMMC to the below

**************************************************************************************************************************************
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet root=/dev/mmcblk1p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

LABEL backup
      MENU LABEL backup kernel
      LINUX /boot/Image.backup
      INITRD /boot/initrd
      APPEND ${cbootargs}


**************************************************************************************************************************************

Please note this line

APPEND ${cbootargs} quiet root=/dev/mmcblk1p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4

Here I changed from root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1 to enable it to boot from the SD. This settings work, however, when I remove the SD card, it wouldn’t boot from the eMMC.

I understand that there is a LABEL backup, however this didn’t work.

Can you please help, as my data on the SD card is at stake here. Sometimes the SD card fails to boot and I have to remove and insert again by turning the device off. This is costing me so much time and if it fails to boot at all, then I have to flash the whole Jetson board using the SDKmanager to restore it to the default settings. This costs be minimum 2 hours to flash a Jetson board and if I don’t have a backup all my data is gone.

You are not booting from sdcard. You just mount the file system on the sdcard.

When the sdcard is removed, bootloader still follows the extlinux to load from /dev/mmcblk1p1 and it cannot find it.

That’s all.

Thanks for the reply @WayneWWW ! Could you please suggest what to do to solve this?

You can first set up the uart and read the log. This will help you understand the situation.

After you can check the cboot log, you can follow the document.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html

→ Flashing to an External Storage Device

and change the boot order with sd prior to emmc.

Thanks @WayneWWW !

$ setvar boot-order sd emmc
$ printvar boot-order

But after booting, the changes are not saved and reverted to the original.

Is there anything that I can set in the extlinux.conf file, so that it can fallback to the emmc incase the SD card fails to boot.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/getting_started.html
->Choosing a Boot Device for Jetson AGX Xavier Series Platforms

Thanks @WayneWWW !

So this is what I am planning to execute.

  1. Reset the extlinux.conf file on the emmc back to the original state, so that it now boots from the emmc.
**************************************************************************************************************************************
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

LABEL backup
      MENU LABEL backup kernel
      LINUX /boot/Image.backup
      INITRD /boot/initrd
      APPEND ${cbootargs}


**************************************************************************************************************************************

Note : i have now changed this to root=/dev/mmcblk0p1, i.e to emmc

  1. Now as suggested above I will configure the boot-configuration and flash it to the emmc using a host PC.
  2. Assuming that I have my SD card still in the Jetson AGX, it should boot up from my SD card.

Is my understanding right?

I have a doubt in the last step. Maybe this is a silly question. Apologies.

When I execute this → sudo ./flash.sh jetson-xavier mmcblk0p1, will any of the data on the jetson be lost.

sudo ./flash.sh jetson-xavier mmcblk0p1

Yes, after this step, your emmc data will be erased.

My purpose of sharing that document was you can try to put sdcard before emmc… and if sdcard is gone, it will read fallback to emmc…

Really really try to learn how to read the bootloader log… it will be more easier for yourself to learn how this things work by reading that log.

Appreciate it @WayneWWW !

Will go through the bootloader log again before flashing the Jetson.

I tried changing the boot-order and flashed the jetson. But no luck.

Current situation

  1. I have mounted the SD card by mentioning the same configuration root=/dev/mmcblk1p1 in the extlinux.conf file. Everything works fine and boots from the SD card.
  2. I removed the SD card and booted the Jetson, but then it wouldn’t boot from the emmc. I get the below error message and it wouldn’t boot any further.

I already said. Dump the log.from uart.

It feels like you didn’t change anything so far… Your board is always booting from your emmc but you just didn’t understand…

If you have no idea about what uart log is.
Please follow this page.

And read the post here.

You need to read point 2 from above post because obviously you didn’t understand it well.

. You have to know the difference between “boot kernel from external drive” and “mount rootfs from external drive”

Thanks for all the documentation! That’s the dump. Anyways, I will give this an another shot another time.

It feels like you didn’t change anything so far…
→ You can see the boot-order that has changed.

minicom-dump.txt (23.2 KB)

I just checked the log. Unfortunately, AGX is just same as NX, the default cboot software is not able to boot from external sdcard slot.

Thus, what you want to do does not support. If you want to make it work, you need to modify the cboot software by yourself.

ok.

If you want to make it work, you need to modify the cboot software by yourself.

Is there a different documentation for this or have you mentioned about this already? Please let me know.

Unfortunately there is no document for this part. Need to read the code directly.

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