rootOnNVMe icon indicating copy to clipboard operation
rootOnNVMe copied to clipboard

jetpack 4.5 support boot from ssd

Open diamondbarcode opened this issue 3 years ago • 8 comments

Hi, do you plan to update code to support the new way to boot in jetpack 4.5?

diamondbarcode avatar Jan 22 '21 17:01 diamondbarcode

@diamondbarcode

I tried the setssdroot package on a new installation of L4T Jetpack 4.5 on NX. The scripts can rsync all the files and setup the service, and boot and mount the NVME after restart. Do you encounter any problems? Do you want to use it on a NX or AGX?

Best, Simon

smyeungx avatar Jan 25 '21 04:01 smyeungx

FYI.

image

smyeungx avatar Jan 25 '21 04:01 smyeungx

in jetpack 4.5 there is a permanent solution to this but I don't understand the instruction well. This hack may counter problems when there is an OTA update.

diamondbarcode avatar Jan 25 '21 14:01 diamondbarcode

Hi,

I have tried to install Jetpack 4.5 directly using sdkmanager to NVME. Seems it can flash directly to NMVE, but it got stuck during the TCP connection stage.

I have tried a reverse approach in the following order (with modified copy-rootfs-ssd.sh):

  • determine if NVME partition (nvme0n1p1) is mounted as rootfs
  • determine if micro-sd card is mounted. If not mounted, mount it. Then find it's mounted directory
  • then perform a rsync from NVME to micro-sd with the following (from original copy-rootfs-ssd.sh): $ sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found"} / /media/ros/dfbc4d0a-835f-443b-ace8-457ff281e9532 where /media/ros/dfbc4d0a-835f-443b-ace8-457ff281e9532 is the mounted location of the micro-sd card image

Seems it's working (experimental) in typical apt-get update/upgrade and copy all data back to micro-sd card. I didn't try with major OTA update.

Best, Simon

smyeungx avatar Feb 03 '21 07:02 smyeungx

how to flash directly to NVME form dsk manager? when I try mine I have no option where to flash

diamondbarcode avatar Feb 03 '21 15:02 diamondbarcode

I have inserted the NVME only without the micro-SD. The sdkmanager got stuck after upload the JetPack. I suspect whether the sdkmanager actually did the job. If you don't mind, let me finished my current project on NX in the coming week. Then I try to document it a bit and get back to you?

Generally, this package work pretty well and the NVME is much much faster than micro-SD especially if you need to buffer/stream massive amount of video data (in my case)

smyeungx avatar Feb 08 '21 03:02 smyeungx

@diamondbarcode

I have touched up the NVME->SD card sync (experimental) script (from original copy-rootfs-ssd.sh):

#!/bin/bash

# Check SD card and NVME mountpoint SD_MOUNTPOINT=$(findmnt /dev/mmcblk0p1 --output=target -n) NVME_MOUNTPOINT=$(findmnt /dev/nvme0n1p1 --output=target -n)

# If SD card is mounted as / and NVME is not mounted # sync SD card to NVME if [ "$SD_MOUNTPOINT" == "/" ] && [ -z "$NVME_MOUNTPOINT" ]; then echo "rsync SD card to NVME" # Mount the SSD as /mnt sudo mount /dev/nvme0n1p1 /mnt # Copy over the rootfs from the SD card to the SSD sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found"} / /mnt # We want to keep the SSD mounted for further operations # So we do not unmount the SSD fi

# If NVME is mounted as / and SD card mounted # sync NVME to SD card if [ "$NVME_MOUNTPOINT" == "/" ]; then echo "rsync NVME to SD card" # If SD card is not mounted, mount it if [ -z "$SD_MOUNTPOINT" ]; then SD_MOUNTPOINT="/mnt/sdcard" sudo mkdir "$SD_MOUNTPOINT" sudo mount /dev/mmcblk0p1 "$SD_MOUNTPOINT" fi sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found"} / "$SD_MOUNTPOINT" fi

smyeungx avatar Feb 09 '21 07:02 smyeungx

I just tested on a fresh JetPack 4.5 Flash Install on a Xavier NX, works like a charm :)

satyajitghana avatar May 07 '21 10:05 satyajitghana