How To Boot Jetson Nano From USB 3.0 (Natively) With Jetpack 4.5 - Rob Royce - Homepage
How To Boot Jetson Nano From USB 3.0 (Natively) With Jetpack 4.5 - Rob Royce - Homepage
Sharing my knowledge of Embedded Computing, AI/ML, Data Science, Software Engineering, and
more!
Quick Note: The original post overlooked a significant detail. In order for this process to work, you
must flash the Nano with Jetpack 4.5 on the microSD card before you attempt to boot from USB. This
is because the board will not allow boot from USB until the QSPI chip has been updated with new
instructions, but that can only happen if you update to Jetpack 4.5 or later. The easiest and quickest
way is to use Nvidia’s SDK Manager. You can follow this guide (https://docs.nvidia.com/sdk-
manager/install-with-sdkm-jetson/index.html) on Nvidia’s website to flash a microSD card with 4.5
using SDK Manager. The rest of this post depends on you having flashed a microSD with 4.5.
Requirements
I will assume you have the following components, all of which are necessary to complete the process:
A PC running Ubuntu 18.04 (16.xx and 20.xx were not tested, but they may still work)
A USB 3.0 flash drive (USB 2.0 is fine too, but you won’t be getting the best bang for your buck)
with at least 16GB of space, preferably larger (I will use a 128GB drive in this guide)
A Jetson Nano powered via barrel jack connector (this won’t work if you use the mini-USB port to
power the board, since we need to use the mini-USB for data transfer during the flashing process)
A jumper wire to put your Nano into recovery mode
You must flash a microSD card with Jetpack 4.5 or later and go through the system setup (user,
password, locality, etc) in order to update the QSPI chip which allows later booting from USB.
Note: this process has only been tested and verified on Nano’s with SD card slots and not on Nano’s
with built-in eMMC modules.
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 1/9
28/9/21 18:14 How to Boot Jetson Nano From USB 3.0 (Natively) with Jetpack 4.5 – Rob Royce – Homepage
1. Run the following command twice, once before inserting the USB and once after inserting the
USB. We run it twice to be 100% sure that we are wiping and writing to the correct device. In this
example, the device we want to use is /dev/sdc, but it may be different on your host machine.
2. Create environment variables to make the following snippets easier to copy/paste. Note that the
USB_SIZE variable below is not the full size of the disk. You can choose whatever size you want,
as long as it’s at least 16GB, but I left some space for an additional partition incase I need it later.
EXTREMELY IMPORTANT: make sure you change sdX to the correct value from above in the
following commands. YOU CAN DESTROY YOUR HOST SYSTEM IF YOU DO NOT DO
THIS CORRECTLY sdX must be changed to point to the USB drive you intend to install Jetpack
on. In the case above, we are using sdc and sdc1, but you may need to use sdb or something else
entirely.
1 export SDX=sdX
2 export SDX_PART=sdX1
3 export USB_SIZE=96GB
3. We’re going to wipe the USB drive with the following commands. First, we need to make sure
there are no existing partitions on the USB. If there are, we need to unmount them before
proceeding.
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 2/9
28/9/21 18:14 How to Boot Jetson Nano From USB 3.0 (Natively) with Jetpack 4.5 – Rob Royce – Homepage
Note that, in my case, there is an entry under sdc called sdc1, and it is mounted at location
/media/rob/0640288e.... We need to unmount that partition before continuing.
1 # --------------------------------------------------------
2 # Only required if you have a mounted partition from above
3 # --------------------------------------------------------
4
5 sudo umount <location>
6
7 # --------------------------------------------------------
8 # Where <location> in my case is equal to /media/rob/0640288e...
9 # --------------------------------------------------------
Verify that the partition was successfully unmounted by running sudo lsblk | grep sd again.
Once that is done, run the following command to wipe the USB Drive.
This command reads from a constant stream of zero’s located at /dev/zero and writes that to the
drive 1MB at a time. Note that we are only writing about 16GB of data to the drive. You can
choose a larger count, but it could take a very long time to complete. 16GB should be sufficient to
create a boot drive.
1 > Error: Partition(s) 1 on /dev/sdc have been written, but we have been unab
2 > As a result, the old partition(s) will remain in use. You should reboot n
3 Ignore/Cancel? cancel
Type cancel + Enter. This error means that the USB device is mounted and you must unmount it
before continuing. See steps above.
The USB Drive should now be ready for writing. Next, we prepare the the files that will be written
to USB.
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 3/9
28/9/21 18:14 How to Boot Jetson Nano From USB 3.0 (Natively) with Jetpack 4.5 – Rob Royce – Homepage
1 cd ~/
2 wget https://developer.nvidia.com/embedded/L4T/r32_Release_v5.0/T210/Tegra21
3 wget https://developer.nvidia.com/embedded/L4T/r32_Release_v5.0/T210/Tegra_L
1 export L4T_RELEASE_PACKAGE=Tegra210_Linux_R32.5.0_aarch64.tbz2
2 export SAMPLE_FS_PACKAGE=Tegra_Linux_Sample-Root-Filesystem_R32.5.0_aarch64.
3 export BOARD=jetson-nano-devkit
1 tar xf ${L4T_RELEASE_PACKAGE}
2 cd Linux_for_Tegra/rootfs/
3 sudo tar xpf ../../${SAMPLE_FS_PACKAGE}
4 cd ~/Linux_for_Tegra
5 sudo ./apply_binaries.sh
Note: The final line should say “Success!” is everything worked properly.
1 cd ~/Linux_for_Tegra/rootfs/usr/sbin
2 sudo rm l4t_payload_updater_t210
3 sudo wget https://developer.nvidia.com/l4t-payload-updater-t210 (https://dev
4 sudo chmod +x l4t_payload_updater_t210
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 4/9
28/9/21 18:14 How to Boot Jetson Nano From USB 3.0 (Natively) with Jetpack 4.5 – Rob Royce – Homepage
For revision A02, place a jumper wire across pins 3 and 4 of the button header (J40, near
camera header)
Correct configuration for revision B01 is shown in the image below.
3. Connect the mini-USB cable from the Nano to your host machine.
4. Apply power to turn the Nano on.
5. After 3 seconds, disconnect the jumper wires.
6. Verify that the Nano is in recovery mode by executing lsusb on your host. You should see
something like Bus 001 Device 011: ID 0955:7f21 NVidia Corp.
Note: We are not changing sda1 to ${SDX_PART} in the following code. You must keep it as sda1.
1 cd ~/Linux_for_Tegra
2 sudo BOOTDEV=sda1 ./flash.sh --no-flash ${BOARD} sda1
3 sudo mkdir tmp_system
4 sudo mount bootloader/system.img.raw ./tmp_system/
5 sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude=/proc ./tmp_syst
6 sudo umount /mnt
7 sudo umount ./tmp_system
1) Power down the Jetson Nano. Make sure the jumper wires for recovery mode are removed.
3) Remove the SD Card (if any) from the Jetson Nano. This is an important step since, if an SD Card is
present, the Nano will always boot from SD rather than USB.
4) Remove the mini-USB connection between your host machine and the Jetson Nano.
6) Ensure that any USB accessories (mouse, keyboard) and HDMI are plugged in before turning the
power back on.
After the SD Card has been removed and the USB + peripherals have been inserted, apply power
to the Jetson Nano. If everything worked correctly, you will briefly see some system dialog
followed by the typical system setup process. Complete this process and the device will reboot.
Next, we will want to install system libraries, SDK’s, and dependencies. I will be writing a guide
on how to easily install these components using Nvidia’s SDK Manager as soon as possible. Check
back soon!
1. Michael Newham
SAYS:
FEBRUARY 26, 2021 AT 12:22 AM
Hi Rob, thanks for your efforts..
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 6/9
28/9/21 18:14 How to Boot Jetson Nano From USB 3.0 (Natively) with Jetpack 4.5 – Rob Royce – Homepage
My go was successful and your commands have allowed me to use an SSD with at least a 5x speed
increase over the old SD card
Now the issue is ‘dpkg’ errors on the usual apt update / upgrade command. I’ve posted the error
output below. My install is on a Jetson Nano 2Gb – with the following firmware >
—
NVIDIA Jetson Nano (Developer Kit Version)
I’ll also post this on the Nvidia forums too – but you may have already encountered this. hence
my post here. Error output below…
Cheers, Michael.
_______
3448-300-0003–1–jetson-nano-devkit-sda1
3448-300-0003–1–jetson-nano-devkit-sda1
No apport report written because the error message indicates its a followup error from a previous
failure.
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 7/9
28/9/21 18:14 How to Boot Jetson Nano From USB 3.0 (Natively) with Jetpack 4.5 – Rob Royce – Homepage
nvidia-l4t-bootloader
nvidia-l4t-xusb-firmware
nvidia-l4t-initrd
Reply
1. Rob Royce
SAYS:
FEBRUARY 26, 2021 AT 1:07 AM
Hi Michael, happy to help! One thing I found with the Nano devices in general is that the
`sudo apt-get upgrade` command tends to break things, unfortunately.
I have indeed encountered this exact same issue and the only way I was able to fix it was by
purging `nvidia-l4t-bootloader`, `nvidia-l4t-xusb-firmware`, and `nvidia-l4t-initrd`. I didn’t
record my steps, unfortunately, but you should try `sudo apt-get purge nvidia-l4t-bootloader`,
and so on. After purging all three of the specified packages, do a `sudo apt-get autoremove`
and then reboot the device.
You will also find this issue discussed briefly on the Nvidia forum here:
https://forums.developer.nvidia.com/t/dist-uopgrade-fails-on-l4t-bootloader/121346, which
may or may not help you find a fix!
Reply
2. Yaroslav Stanko
SAYS:
MARCH 7, 2021 AT 8:15 PM
Hi Rob, thanx! I have a problem on my jetson nano 2gb. Exactly that
https://medium.com/@cpyang/quick-summary-on-using-usb-external-disk-for-jetson-nano-
301cc70616f1
Reply
3. DanDeng
SAYS:
MARCH 11, 2021 AT 4:23 PM
Thank you very much
Dan
Reply
4. Neil Young
SAYS:
MARCH 12, 2021 AT 8:17 PM
Thanks for this blog post. I can’t wait for part 2 (regarding step 10).
I have two questions: 1) Is this reversible? I mean, will I be able to return to SD as root device? 2)
The purpose of read only systems or overlay systems is to protect the SD from being damaged on
sudden power loss during write cycles. Is there anything known about whether or not such a USB
stick is not the same way problematic as an SD?
Reply
5. Ravishankar
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 8/9
28/9/21 18:14 How to Boot Jetson Nano From USB 3.0 (Natively) with Jetpack 4.5 – Rob Royce – Homepage
SAYS:
MARCH 25, 2021 AT 6:02 AM
Thanks for this tutorial. I have a a jetson-nano B01 with JP 4.5.1 latest. So QSPI firmware has been
updated to boot from USB.
I just want to know how I can do it without a host Ubuntu PC because I dont have access to one.
Reply
6. Pavel Rybar
SAYS:
APRIL 21, 2021 AT 4:33 PM
Hi, nice post. Is there any chance to use HDD bigger than 2TB. I’m trying this with 4TB and got
errors:
** Invalid partition 1 *
Reply
https://robroyce.dev/2021/02/11/how-to-boot-jetson-nano-from-usb-3-0-natively-with-jetpack-4-5/ 9/9