Hello, on my first setup of my TX2 after installing tensorflow, opencv and everything else i only had around 1Gb free on my root partition. So im wondering is there a clean way on flashing jetpack on the SSD along with ubuntu and everything else?
You can use below steps to flash image on external devices:
1. Create GPT and partiton using gdisk on external device $sudo gdisk /dev/sdx 2. Check partition UUID $ sudo blkid /dev/sdx1 3. Copy PARTUUID to /Linux_for_Tegra/bootloader/l4t-rootfs-uuid.txt 4. sudo mkfs.ext4 /dev/sdx1 (check PARTUUID again) 5. Copy rootfs to SSD 6. Flash the board with rootfs device: $ sudo ./flash jetson-tx2 external 7. After flash completed and boot up, using sdkmanager to install SDK components.
Can you please break this down to Linux commands?
Wanting to boot my TX2 from 1TB SSD .
Don’t forget that you can always ask more questions at any step you need help with. Different people have different levels of knowledge and it is hard to know exactly what to abbreviate versus go into details on.
Other than needing to find out the exact device name designation of the SSD while connected to the host PC, #2 is already nearly step by step commands.
Every disk will have a device special file associated with it. On the host PC, the PC itself has one or more disks, definitely “/dev/sda” (and partitions, e.g., “/dev/sda1” since this is the PC’s disk). If the SSD is the second disk, then it will be “/dev/sdb” (and its first partition would be “/dev/sdb1”). You have to be very careful to name the correct disk. A command like “lsblk -f” tends to say which disk partitions are in use where. Because the SSD is not used when on your host PC, expect the SSD will not name any partitions as mounted anywhere if you run “lsblk -f”. If your SSD (when connected to the host) is “/dev/sdb”, then substitute “sdb” for each “sdx” in #2 and you will have commands.
The “gdisk” command creates or edits partitions, and may require some getting used to. It is simple, but uses hot keys and so it may not be as obvious as a GUI. There are other apps which can partition, but the “?” key, once in the gdisk command, will tell you the hot keys. You may prefer to install a GUI version instead, e.g., “sudo apt-get install gparted”, and then “sudo gparted” to run the GUI version. The goal is to make the first partition of the SSD (being very careful to not name the wrong disk) your partition.
As an example, you can use gdisk or gparted to create an ext4 partition on the SSD. If the disk is “/dev/sdb”, then using these commands you can create “/dev/sdb1”, the first partition.
If you have created “/dev/sdb1”, then I think gparted can format as ext4, but gdisk would require this added command (and again, be very very careful to name the right device):
sudo mkfs.ext4 /dev/sdb1
Once the partition is created and formatted as ext4, then you can copy to it. There are a number of ways to do this. The location on your PC where the content is depends on what follows in the next paragraph.
If you have run the SDK Manager before for a TX2, then it will have created a subdirectory in your home directory named after the TX2 (the P3310) and the release of SDKM (you didn’t say which release, but for example, release 4.3). An example to get there would be:
The commands previously listed will be mostly run from there (and “cd” takes you there). I’ll simply refer to this as the “Linux_for_Tegra/” directory. If you type “pwd”, then you can see where your current location is.
Verify that “Linux_for_Tegra/rootfs/” has content. For example, if you are at “Linux_for_Tegra/”, then “ls rootfs/” and see if there is more content than “README.txt”. If there is, then you can copy this over after mounting the SSD partition (and there is more than one way to do this as well).
One example method (assumes “/dev/sdb1”, please adjust if it isn’t):
- sudo mount /dev/sdb1 /mnt
- Verify "/mnt" has the SSD there via "lsblk -f".
- cd rootfs
- sudo cp -adpR * /mnt
- sudo umount /mnt
There might be a case of still needing to edit a file on the SSD, but the basic copy and setup is done. Step 3 from #2 was this:
3. Copy PARTUUID to /Linux_for_Tegra/bootloader/l4t-rootfs-uuid.txt
From “Linux_for_Tegra/”, after finding the PARTUUID via the “blkid” command he listed, this would create a file with that content (I am making up a PARTUUID of “1234-abc-56789”…substitute the one you actually have for that SSD partition):
echo "1234-abc-56789" > ./bootloader/l4t-rootfs-uuid.txt
When you flash to target “external”, and have this “l4t-rootfs-uuid.txt” in place, then the Jetson will look for that PARTUUID as its boot content. With the TX2 in recovery mode, and the micro-B USB connected to the host PC, you can then run this command to flash:
sudo ./flash.sh jetson-tx2 external
Be sure to have an HDMI monitor/keyboard connected to the TX2 and run any first boot account creation.
If there is any boot issue, then you can get simply ask. The best way to log a boot, if you need to, is with serial console. See: