Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Kola50011 committed Jan 20, 2022
1 parent 6a8c0a8 commit 8305e4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
26 changes: 7 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
# rootOnNVMe
Switch the rootfs to a NVMe SSD on the Jetson Xavier NX and Jetson AGX Xavier
Switch the rootfs to a SD-Card on the Jetson Xavier NX and Jetson AGX Xavier

These scripts install a service which runs at startup to point the rootfs to a SSD installed on /dev/nvme0 (the M.2 Key M slot).
These scripts install a service which runs at startup to point the rootfs to a SD-Card installed on /dev/mmcblk1

This is taken from the NVIDIA Jetson AGX Xavier forum https://forums.developer.nvidia.com/t/how-to-boot-from-nvme-ssd/65147/22, written by user crazy_yorik (https://forums.developer.nvidia.com/u/crazy_yorick). Thank you crazy_yorik!

This procedure should be done on a fresh install of the SD card using JetPack 4.3+. Install the SSD into the M.2 Key M slot of the Jetson, and format it gpt, ext4, and setup a partition (p1). The AGX Xavier uses eMMC, the Xavier NX uses a SD card in the boot sequence.
This procedure should be done on a fresh install of the SD card. Install the SD-Card into the slot of the Jetson, and format it gpt, ext4, and setup a partition (p1).

Next, copy the rootfs of the eMMC/SD card to the SSD
Next, copy the rootfs of the SD card to the SSD
```
$ ./copy-rootfs-ssd.sh
$ ./copy-rootfs-sd.sh
```

Then, setup the service. This will copy the .service file to the correct location, and install a startup script to set the rootfs to the SSD.
Then, setup the service. This will copy the .service file to the correct location, and install a startup script to set the rootfs to the SD.
```
$ ./setup-service.sh
```

After setting up the service, reboot for the changes to take effect.

### Boot Notes
These script changes the rootfs to the SSD after the kernel image is loaded from the eMMC/SD card. For the Xavier NX, you will still need to have the SD card installed for booting. As of this writing, the default configuration of the Jetson NX does not allow direct booting from the NVMe.

### Upgrading
Once this service is installed, the rootfs will be on the SSD. If you upgrade to a newer version of L4T using OTA updates (using the NVIDIA .deb repository), you will need to also apply those changes to the SD card that you are booting from.

Typically this involves copying the /boot* directory and /lib/modules/\<kernel name\>/ from the SSD to the SD card. If they are different, then modules load will be 'tainted', that is, the modules version will not match the kernel version.


## Notes
* Initial Release, May 2020
* JetPack 4.4 DP
* Tested on Jetson Xavier NX

These script changes the rootfs to the SD after the kernel image is loaded from the eMMC.
6 changes: 3 additions & 3 deletions copy-rootfs-ssd.sh → copy-rootfs-sd.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Mount the SSD as /mnt
# Mount the SD as /mnt
sudo mount /dev/mmcblk1p1 /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
# We want to keep the SD mounted for further operations
# So we do not unmount the SD

0 comments on commit 8305e4f

Please sign in to comment.