RootFs on external SD card not working / blank frozen Ubuntu screen after System Configuration

Hi guys,
I’m trying to install the rootfs on an external SD card. However, I’m facing some problems. I know, there are a lot of forum threads about rootfs on external devices, but I couldn’t find one which solved my problem or has the same error pattern.

Used Hardware:
I’m using an EverFocus eNVP-JNX-IV-V0008, which has a NVIDIA Jetson Xavier NX-Modul inside.
I’m using a 64 GB SD card plugged into the SD card slot of the device.

Executed Steps:
If I use the standard installation of JetPack (rootfs on the internal eMMC) the SD card appears as /dev/sda on the Jetson.

To install the rootfs on the external SD card I followed this guide: Jetson/L4T/Boot From External Device - eLinux.org

# Step 1
# Download L4T Driver Package (BSP) and Sample Root Filesystem
# L4T Driver Package (BSP): https://developer.nvidia.com/embedded/l4t/r32_release_v6.1/t186/jetson_linux_r32.6.1_aarch64.tbz2
# Sample Root Filesystem: https://developer.nvidia.com/embedded/l4t/r32_release_v6.1/t186/tegra_linux_sample-root-filesystem_r32.6.1_aarch64.tbz2

# Step 2
# Extract L4T Driver Package (BSP)
sudo tar xpf Tegra_Linux_Sample-Root-Filesystem_R32.6.1_aarch64.tbz2

# Step 3
# Extract Sample Root Filesystem
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R32.6.1_aarch64.tbz2

# Step 4
# Execute apply_binaries.sh
cd ..
sudo ./apply_binaries.sh

# Step 5
# Create GPT for SD card
sudo gdisk /dev/sdb
# "o"
# "n"
# "1"
# First sectors: "40M"
# Last sectors: Press enter
# Filesystem (default: Linux filsystem): Press enter
# "c"
# Partition's name: "PARTLABEL"
# "w"

# Step 6
# Create partition on SD card
sudo mkfs.ext4 /dev/sdb1

# Step 7
# Mount partiton of SD card
sudo mount /dev/sdb1 /mnt

# Step 8
# Copy rootfs to SD card
cd rootfs/
sudo tar -cpf - * | ( cd /mnt/ ; sudo tar -xpf - )

# Step 9
# Unmount SD card
sudo umount /mnt

# Step 10
# Put SD card into Jetson

# Step 11
# Flash Jetson with rootfs on external device sda1
cd ..
sudo ./flash.sh jetson-xavier-nx-devkit-emmc sda1

# Step 12
# Follow System Configuration instructions on Jetson

# PROBLEM
# Blank and frozen Ubuntu screen after System Configuration step "APP Partition Size"

Problem:
So after the selection of the “APP Partition Size” I get a blank and frozen Ubuntu screen. I let it run over night and nothing changed. After a hard power off and power on I get an error message with: mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error. If I try to mount the SD card on my host pc again, I get the same error message.

System Configuration of APP Partition Size:
Interesting, he detects the 64GB SD card.

Blank and frozen Ubuntu screen after selection of APP partition size:

Error messages after hard power off and reboot of the Jetson:

Can somebody help me please and tell me what I’m doing wrong?

Many thanks in advance,
Kilian

Hi,

Maybe we can go back to a basic one first.

First, boot into internal emmc.

Second, prepare your sdcard, which should include a NV rootfs inside a ext4 partition.

Last, if you plug this sdcard into your board which is booting from emmc, what will you see if you directly mount /dev/sda1?

Thanks for the fast response @WayneWWW.
Sorry, I wasn’t sure what you meant with “directly mount”.

So what I did now:

  • I prepared a new SD card with a rootfs on my host pc
  • started my Jetson (with boot from eMMC and a rootfs on eMMC)
  • pugged the SD card into the Jetson
  • mounted the SD card and listed the content
$ sudo mount /dev/sda1 /mnt/
$ cd /mnt/
$ ls -al
total 112
drwxr-xr-x  22 root root  4096 Mär 16 13:09 .
drwxr-xr-x  26 root root  4096 Jan 28 12:51 ..
drwxr-xr-x   2 root root  4096 Jul 22  2021 bin
drwxr-xr-x   3 root root  4096 Mär 16 13:07 boot
drwxr-xr-x   2 root root  4096 Mär 16 13:07 dev
drwxr-xr-x 145 root root 12288 Mär 16 13:07 etc
drwxr-xr-x   2 root root  4096 Apr 24  2018 home
drwxr-xr-x  21 root root  4096 Mär 16 13:07 lib
drwx------   2 root root 16384 Mär 16 13:08 lost+found
drwxr-xr-x   2 root root  4096 Aug  6  2018 media
drwxr-xr-x   2 root root  4096 Apr 26  2018 mnt
drwxr-xr-x   4 root root  4096 Mär 16 13:07 opt
drwxr-xr-x   2 root root  4096 Apr 24  2018 proc
-rw-rw-rw-   1 root root    62 Jul 26  2021 README.txt
drwx------   2 root root  4096 Apr 26  2018 root
drwxr-xr-x  17 root root  4096 Dez  1  2020 run
drwxr-xr-x   2 root root  4096 Jul  7  2021 sbin
drwxr-xr-x   2 root root  4096 Mai 11  2018 snap
drwxr-xr-x   2 root root  4096 Apr 26  2018 srv
drwxr-xr-x   2 root root  4096 Apr 24  2018 sys
drwxrwxrwt   2 root root  4096 Mär 16 13:07 tmp
drwxr-xr-x  11 root root  4096 Mai 21  2018 usr
drwxr-xr-x  15 root root  4096 Mär 16 13:07 var

Could you share the full bootloader log when that error happened?

Yes I will do, but first I need to contact EverFocus how to access the debug UART.
I will post the results of the bootloader as soon as I got them.

Also, actually your case can just follow the “Flashing to a USB Drive” section here. I think the vendor has a usb to sdcard adapter on jetson’s usb port. That is why the default device node is “sdx” instead of “mmcblk1xxx”. Jetson may actually treat your card as a usb device.

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

1 Like

Yes I think so too. I’m pretty sure they use a USB to SD card adapter which is connected to the USB bus on the Jetson.
Nevertheless, is there any difference in the procedure I described and the one for “Flashing to a USB Drive”?

I guess the previous method you are using is by the UUID. And somehow the system is not able to find your UUID.

It is probably true because I guess you read the UUID on your host but not on jetson. So the UUID is different.

Flashing to a USB drive is not using UUID to tell the node. Also, the method from document will boot from USB but not only mount rootfs on usb.

I tried both methods already, UUID and device name, e.g. sudo ./flash.sh jetson-xavier-nx-devkit-emmc sda1. Both times I had the same problem. But I can try to directly boot from USB. I think I have to change the boot order and/or clear the eMMC right? How can I do that?

If you want to know the exact status, then you need the uart console.

But I remember that usb boot priority is higher than emmc. So you can also try a blind test and see if it reads from your device.

One question regarding direct boot from USB. If I follow these instructions (https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0BO0HA) do i have to execute sudo ./apply_binaries.sh after extracting the rootfs and before sudo BOOTDEV=sda1 ./flash.sh --no-flash <board> sda1?

Right now, I’m not sure what apply_binaries.sh is actually doing.

apply_binaries will install some NVIDIA libs to the rootfs.

I got it working!
Finally, I was able to boot from internal eMMC with an external rootFS on a SD card connected via USB to the Jetson XAVIER NX.

Following the instructions you posted worked for me: https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0HO0HA

However, I’m still wondering why these instructions didn’t work: Jetson/L4T/Boot From External Device - eLinux.org

Thank you very much @WayneWWW

1 Like

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