Jetson TX2 NX mounts NVME as rootfs despite extlinux.conf setting

Hi, I am a newbie in Jetson development. I just got a wheeled robot with a Jetson TX2 NX card (4GB) with an NVME SSD.

After boot, the Jetson mounts the NVME SSD as rootfs, despite the fact that the /boot/extlinux/extlinux.conf configuration file specifies the eMMC as rootfs:

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

In order to repair the NVME file system with fsck, I need to mount another rootfs (for example the eMMC), but I don’t seem to be able to do that just with the extlinux.conf setting. (This would be also useful for making a clone of the NVME file system, after unmounting it).

Normally, I would physically remove the NVME SSD card, but this is difficult, since it would require dismantling the robot.

I made a log of the boot sequence using an UART console (attached in full) – it seems that the eMMC is initially correctly mounted as rootfs (as instructed in extlinux.conf – lines 1258-1266), but later on, it is remounted to /media/jetson/EMMC6 and the NVME is mounted as rootfs.

Line 1258:[ 6.123422] Root device found: mmcblk0p1

Line 1264:[ 6.168728] Found dev node: /dev/mmcblk0p1

Line 1265:[ 6.193567] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)

Line 1266:[ 6.205320] Rootfs mounted over mmcblk0p1

Line 1298:[ 6.874000] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)

Line 1299:[ 7.065043] EXT4-fs (nvme0n1p1): warning: maximal mount count reached, running e2fsck is recommended

Line 1583:* /dev/nvme0n1p1 will be checked for errors at next reboot *****

Line 1621:/dev/nvme0n1p1 on / type ext4 (rw,relatime,discard,errors=remount-ro,stripe=8191,data=ordered)

Line 1626:/dev/mmcblk0p1 on /media/jetson/EMMC6 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)

What can I do to prevent the NVME to be mounted as rootfs? Who does that? (I would like to avoid flashing the eMMC, because after booting from the eMMC and repairing the NVME filesystem, I would like to revert to the NVME rootfs.)

Since the card uses U-boot, would booting from an USB drive work?

(I also attach a log of the U-boot environment – using printenv at the U-boot prompt.)

Thank you in advance!
nvidia_developer_forum LOG.txt (108.8 KB)

Hi bogdan2435,

Are you using the custom board with Jetson TX2 module?
What’s the Jetpack version in use?

You could refer to the following instruction to change boot order in u-boot.
Flashing and Booting the Target Device - Changing Boot Order with U-Boot

# setenv boot_targets usb0 mmc0 mmc1 nvme0 pxe dhcp
# saveenv
# boot

Hi Kevin,

Thank you very much for your help.

The board is a Yahboom Jetson TX2 NX Developer kit with Jetpack 4.6 (L4T 32.6.1 Ubuntu 18.04).

I prepared a USB drive with the rootfs and kernel and then booted the TX2-NX with the USB drive in a corresponding USB slot, stopping the booting process at the U-boot prompt.
Unfortunately, it seems that U-boot on the TX2-NX is not capable of recognizing USB devices. The ‘boot’ command produces the following error messages:

489 Tegra186 (P3636-0001) # setenv boot_targets usb0
490 Tegra186 (P3636-0001) # boot
491 maximum number of regions parsed, aborting
492 starting USB…
493 No working controllers found
494 USB is stopped. Please issue ‘usb start’ first.
495 Tegra186 (P3636-0001) # usb start
496 starting USB…
497 No working controllers found

Since USB boot seems impossible on TX2-NX, maybe there might be a way to prevent the unmounting of the eMMC as root and mounting of the NVME as root during the boot process:

[ 6.123422] Root device found: mmcblk0p1
[ 6.168728] Found dev node: /dev/mmcblk0p1
[ 6.193567] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 6.205320] Rootfs mounted over mmcblk0p1

[ 6.874000] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[ 7.065043] EXT4-fs (nvme0n1p1): warning: maximal mount count reached, running e2fsck is recommended
*** /dev/nvme0n1p1 will be checked for errors at next reboot ***
/dev/nvme0n1p1 on / type ext4 (rw,relatime,discard,errors=remount-ro,stripe=8191,data=ordered)
/dev/mmcblk0p1 on /media/jetson/EMMC6 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)

What can I do to prevent the NVME to be mounted as rootfs? Who does that? Is there maybe a log-file that would give an insight on who is doing the remounting above?


Regarding USB boot, the U-boot menu has also a ‘usb’ command which shows the state of the USB system, but it also fails in the same way:
483 Tegra186 (P3636-0001) # usb start
484 starting USB…
485 No working controllers found

Here is an excerpt of the UART console boot log (the full log is in the attached file):

360 U-Boot 2020.04-g46e4604c78 (Jul 26 2021 - 12:10:58 -0700)
361
362 SoC: tegra186
363 Model: NVIDIA P3636-0001
364 Board: NVIDIA P3636-0001
365 DRAM: 3.8 GiB
366 MMC: sdhci@3400000: 1, sdhci@3460000: 0
367 Loading Environment from MMC… OK
368 In: serial
369 Out: serial
370 Err: serial
371 Net: eth0: ethernet@2490000
372 Hit any key to stop autoboot: 0

373 Tegra186 (P3636-0001) # help
378 boot - boot default, i.e., run ‘bootcmd’
461 usb - USB sub-system

464 Tegra186 (P3636-0001) # usb
465 usb - USB sub-system
466
467 Usage:
468 usb start - start (scan) USB controller
469 usb reset - reset (rescan) USB controller
470 usb stop [f] - stop USB [f]=force stop
471 usb tree - show USB device tree
472 usb info [dev] - show available USB devices
473 usb test [dev] [port] [mode] - set USB 2.0 test mode
474 (specify port 0 to indicate the device’s upstream port)
475 Available modes: J, K, S[E0_NAK], P[acket], F[orce_Enable]
476 usb storage - show details of USB storage devices
477 usb dev [dev] - show or set current USB storage device
478 usb part [dev] - print partition table of one or all USB storage devices
479 usb read addr blk# cnt - read cnt' blocks starting at block blk#’
480 to memory address addr' 481 usb write addr blk# cnt - write cnt’ blocks starting at block blk#' 482 from memory address addr’

483 Tegra186 (P3636-0001) # usb start
484 starting USB…
485 No working controllers found
486 Tegra186 (P3636-0001) # usb reset
487 resetting USB…
488 No working controllers found

489 Tegra186 (P3636-0001) # setenv boot_targets usb0
490 Tegra186 (P3636-0001) # boot
491 maximum number of regions parsed, aborting
492 starting USB…
493 No working controllers found
494 USB is stopped. Please issue ‘usb start’ first.
495 Tegra186 (P3636-0001) # usb start
496 starting USB…
497 No working controllers found

498 Tegra186 (P3636-0001) # printenv

515 boot_targets=usb0
526 bootcmd_usb0=devnum=0; run usb_boot

601 Tegra186 (P3636-0001) # run bootcmd_usb0
602 starting USB…
603 No working controllers found
604 USB is stopped. Please issue ‘usb start’ first.

Thanks again!
usb boot not working NUMBERED.txt (34.9 KB)

This is the custom board from Yahboom.

Please also and other boot device in order.

Your serial console log has already showed this information.
[ 6.123422] Root device found: mmcblk0p1

Do you format your USB drive as boot device before use it?

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