This project provides tools to add boot entry to extlinux.conf
for a partition with JetPack installed. This allows multi-booting via the serial console.
/dev/mmcblk0p1 (internal EMMC): Bufferd reads = 292 MB/s
/dev/mmcblk1p1 (Sandisk Ultra U1 SD card): Bufferd reads = 81 MB/s
/dev/nvme0n1p1 (Kingston NVME M.2): Bufferd reads = 1316 MB/s
/dev/nvme0n1p1 (970 EVO Plus M.2): Bufferd reads = 1670 MB/s
JetPack 4.4
on /dev/nvme0n1p1
, JetPack 4.3
on /dev/nvme0n1p2
)jp44_human_pose
on /dev/nvme0n1p1
, jp44_jetbot
on /dev/nvme0n1p2
)john_jetpack_44
on /dev/nvme0n1p1
, jane_jetpack_45
on /dev/nvme0n1p1
)The project has been tested with the following JetPack versions:
This section will help you to prepare the bootable partition(s) with desired JetPack version. We assume that you know how to format disk with GPT partitioning scheme and create/delete partition(s) using GNOME Disk Utility
This method is more precise but only available when Jetson OS image has been created before (The path varies from version to version. By default it should be under user's home folder). For example, to flash JetPack 4.4.1
:
$ cd ~/nvidia/nvidia_sdk/
$ cd JetPack_4.4.1_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra
$ sudo ./flash.sh jetson-xavier mmcblk0p1
After flashing, complete the Ubuntu system configuration.
My method here is simple but not a beautiful/clean cloning. You could find other way from Internet or use it as-is. Now, Jetson Xavier should be booted with JetPack version installed in previous step from eMMC. If we would like to clone rootfs to /dev/nvme0n1p1
, please follow the steps below:
$ mkdir /tmp/rootfs
$ sudo mount /dev/nvme0n1p1 /tmp/rootfs
$ cd /
$ sudo cp -ax ./ /tmp/rootfs
This allow you to boot Jetson Xavier even there is no SSD installed (or something wrong with the SSD, point to wrong partition or incorrect boot entry). We should install the latest JetPack version (to support booting older version). Follows section How to Flash to flash JetPack 4.5.1
After that, JetPack 4.5.1
should be installed on eMMC and JetPack 4.4.1
on /dev/nvme0n1p1
.
To continue the previous example, to enable multi-booting (JetPack 4.5.1
on eMMC and JetPack 4.4.1
on /dev/nvme0n1p1
), we could run the following steps:
$ sudo -i
# /path/to/multi-booting-xavier/add_jetpack.sh /dev/nvme0n1p1 human_pose
Once completed successfully and reboot, you could find something like the following via the serial console:
[0005.815] I> L4T boot options
[0005.815] I> [1]: "primary kernel"
[0005.815] I> [2]: "JetPack 4.4 human_pose"
[0005.816] I> Enter choice:
At that point, you can choose the kernel before expiration of the TIMEOUT
period (3 seconds).
Let's say the NVMe SSD has four partitions and are assigned as the following (You can check the final multi-booting configuration):
Partition | JetPack Version | Project |
---|---|---|
/dev/nvme0n1p1 | JetPack 4.5.1 | human_pose |
/dev/nvme0n1p2 | JetPack 4.4.1 | jp44_jetbot |
/dev/nvme0n1p3 | JetPack 4.3 | DeepSpeech |
/dev/nvme0n1p4 | JetPack 4.2.3 | smart_detector |
To enable multi-booting with different JetPack versions like that. Just follow the steps below:
JetPack 4.2.3
to eMMC/dev/nvme0n1p4
JetPack 4.3
to eMMC/dev/nvme0n1p3
JetPack 4.4.1
to eMMC/dev/nvme0n1p2
JetPack 4.5.1
to eMMC/dev/nvme0n1p1
add_jetpack.sh /dev/nvme0n1p1 human_pose
add_jetpack.sh /dev/nvme0n1p2 jp44_jetbot
add_jetpack.sh /dev/nvme0n1p3 DeepSpeech
add_jetpack.sh /dev/nvme0n1p4 smart_detector
When the system boots, you could find something like the following via the serial console:
[0005.815] I> L4T boot options
[0005.815] I> [1]: "primary kernel"
[0005.815] I> [2]: "JetPack 4.5 human_pose"
[0005.815] I> [3]: "JetPack 4.4 jp44_jetbot"
[0005.815] I> [4]: "JetPack 4.3 DeepSpeech"
[0005.816] I> [5]: "JetPack 4.2 smart_detector"
[0005.816] I> Enter choice:
You can select the kernel everytime or you could update the default by editing extlinux.conf
Maybe you will find that it is not that useful as you need to flash the eMMC and clone the rootfs everytime for a new partition.
To avoid the redundant work, it is recommended to backup the partition(s) you need. You can use dd
, cpio
or a spare storage to keep the partition(s).
Next time, you can simply restore/clone the backup to the new partition, run the command add_jetpack.sh
on Jetson Xavier and done.
extlinux.conf
Be Cautious. Invalid extlinux.conf
will cause the system to become unbootable. Backup before you edit, think twice before you act, double check before you save.
To ensure we are editing the correct extlinux.conf
, do the following:
$ mkdir /tmp/emmc
$ sudo mount /dev/mmcblk0p1 /tmp/emmc
$ sudo vi /tmp/emmc/boot/extlinux/extlinux.conf