JetsonHacks

Developing on NVIDIA® Jetson™ for AI on the Edge

Install Samsung SSD on NVIDIA Jetson TX1

Note: This article has been updated for L4T 28.1. See: Develop on SSD – NVIDIA Jetson TX1 and Jetson TX2

This is the third in a series of short articles about running the Jetson TX1 from external storage. This article discusses installing a Samsung SATA SSD on a Jetson TX1, and formatting the SSD so that it can be used as external storage. In addition the contents of the internal flash memory of the Jetson TX1 are copied over to the SSD so that the SSD can be used as the root directory. Looky here:

The SSD Drive in the video is a Samsung 850 PRO SSD 256GB.
A SATA cable is a 22-pin (7+15) Sata Male to Female Data and Power Combo Extension Cable.

Background

SATA drives are used in many desktop and laptop computers. While this article describes installing a Solid State Disk, this information can be used to install other types of SATA drives. SATA drives are probably the fastest external storage interface to the Jetson TX1, they can be more than twice as fast as USB drives. Also, SATA drives are relatively inexpensive for the amount of storage they hold.

You can simply use the SATA drive as supplemental storage, or choose to use the drive as the root directory of the operating system. This basically means that the system runs from the SATA drive instead of the internal flash (eMMC) memory. The video describes the process to copy the root over from the internal eMMC over to the SATA drive, and then modify the boot process to use the SATA drive as root directory.

This method is a mostly GUI solution, there are command line equivalents that others may use and are more sophisticated. Just be forewarned that if you ask for help, others may speak in ‘CLI‘ language.

An embedded system like the Jetson TX1 uses a different boot sequence than a PC. A PC uses system firmware called a BIOS which is able to easily assign different devices to be the boot device. Embedded systems tend to be simpler and more direct. While there are several different strategies used, the Jetson TX1 uses the extlinux boot loader. By modifying the file extlinux.conf in /boot/extlinux, we can directly control which device and partition are set to be the root directory for Linux.

Installation

Note: The installation on the video was done on a Jetson TX1 running L4T 24.2.1, which was flashed from JetPack 2.3.1.

Because the installation demonstration is using mostly GUI tools, please refer to the video for the walk through. Here are the basic steps:

Make sure that the Jetson is powered down, and attach the SATA drive to the Jetson using a SATA extension cable. Some SSD drives will fit on the Jetson TX1 SATA connector directly. However, this can be rather precarious as the SSD can act as a big lever which when bumped may break off the connector from the TX1 carrier board. Adding a cable minimizes this risk.

With the SATA drive installed, start up the machine.

Format the SATA drive by adding at least one partition with a ext4 format. The partition size must be at least 16GB. There are a couple of ways of doing this, an easy way is to use the Disks application which provides a GUI for formatting disks.

Next, mount the SATA drive. Double clicking the SATA drive icon in the sidebar will mount the SATA drive and open a file browser.

If you are only looking to add external storage to the Jetson, then you are finished.

SATA Drive as Root Directory

On the other hand, if you want to use the SSD as your root directory you copy the contents from the root directory of the internal flash memory to the SATA drive. In the video example:

$ sudo cp -ax / ‘/media/ubuntu/JetsonSSD-256’

copies the root directory to the mounted SSD Drive named ‘JetsonSSD-256’. For a nearly full internal flash memory, this will take about 3 minutes depending on the speed of the SATA drive.

The last setup step is to modify the file extlinux.conf file on the eMMC. The system will boot from the internal eMMC, then the kernel will set the root directory to point to the SATA drive.

First, switch to the extlinux directory:

$ cd /boot/extlinux

Next, make a backup of the existing extlinux configuration:

$ sudo cp extlinux.conf extlinux.conf.original

Now edit the configuration to set up the USB drive:

$ sudo gedit /boot/extlinux/extlinux.conf

An editor will open on the configuration file. Duplicate the eMMC entry (usually named primary), and change the entries as shown in the video. One of the major changes indicates the device and partition, which is:

Internal eMMC

root=/dev/mmcblk0p1

SSD Drive:

root=/dev/sda1

Sample extlinux.conf File

The completed example file shown in the video is:

TIMEOUT 30
DEFAULT satassd

MENU TITLE p2371-2180 eMMC boot options

LABEL satassd
MENU LABEL primary SATA SSD
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=${lp0_vec} nvdumper_reserved=${nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0 root=/dev/sda1 rw rootwait

LABEL emmc
MENU LABEL Internal eMMC
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=${lp0_vec} nvdumper_reserved=${nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0 root=/dev/mmcblk0p1 rw rootwait

Make sure to save the file.

Now restart the machine and it will boot to the SATA drive.

Note: If the machine does not boot, hook up a serial console to a host and examine the boot sequence. The entries that you have changed should show up in the boot options.

Once the machine boots, you should run some typical programs or compiles to make sure everything works and is installed correctly. There are some things to watch out for, such as checking to make sure that system level settings for things such as swap files are correct. In general, it is a copy of the internal eMMC, so it should all pretty much behave itself.

Things to Watch Out For

Lions, Tigers, and Bears for starters. Badgers are really mean, be careful of those.

Once past the usual suspects, one thing that you need to be aware of is that if the Jetson can’t see the SATA drive, it will not boot. You may see error messages on the screen or console that it is looking for a boot drive.

If the root SATA drive is not available for some reason, you can use the serial console to select the internal eMMC as the boot device. That will allow you to edit the extlinux.conf file to boot from a different device.

I would advise keeping a bootable SD card around in case something really goes wrong.

If you have changed file system settings (such as those in /etc/fstab, automount, swap files, etc) you will need to revisit the changes to make sure that they are compatible with the new root system.

The SATA drive will usually mount at /dev/sda, which means that USB drives will move up one, i.e. /dev/sda becomes /dev/sdb. The number following the sda (e.g. /dev/sda1) represents the partition.

Facebook
Twitter
LinkedIn
Reddit
Email
Print

36 Responses

    1. Do you mean in the case that you are using the SSD as extra storage, or as the root? As you know, when the Jetson TX1 boots to the SSD as the root as described in the video, the SSD is automatically mounted.

      In the case where you are using the SSD as external storage, there are many options as to how /etc/fstab can be set. Personally, I use the Disks program to help, similar to how was done on the TK1. One difference is that L4T 24.2.1 does *NOT* require the “comment=” workaround noted in the article.

      Article here: http://wp.me/p7ZgI9-3l

      While manually setting up the /etc/fstab file is not difficult, there are all sorts of ways you may want to configure it, which make it difficult to describe as “Here, modify it to look like this”

      Hope this helps.

  1. Great video! Thank you for putting it together. I have a couple questions.

    I’ve been having trouble booting my TX1 when anything is plugged into the SATA port. Did you have any issues with a SSD plugged into it?

    How did you manage to screen record the boot up sequence of the TX1?

    1. Hi Nick,
      I did not have any issues with the SATA port. There weren’t any significant edits in the video, I just plugged it in and it worked.

      To record the screencast videos, I use an Elgato HD Capture ( http://amzn.to/2kMAL39 ). Basically plug the HDMI from the computer into the Elgato, there’s a pass through for the HDMI and a USB stream for the screen capture. I happen to record the USB stream on a Mac using the Elgato software, but it works on Windows too. I record the audio separately, and then mix the two in the video editor. This works on both the Jetson and the PC that I use.

      For $150 bucks and the number of screencasts that I do, it’s earned it’s keep several times over.

      Thanks for reading!

  2. Thank you very much for these instructions, they have been quite helpful. I’ve encountered a problem which I believe occurred after setting the SSD as the root: I now get “uvcvideo kernel module is not loaded” error when trying to run a librealsense project and no longer see any modules when typing “lsmod” in the terminal. Prior to the SSD setup, I did not encounter this issue (also thanks to your guidance on installing librealsense and kernels).
    Would you have any suggestions for me to resolve this issue?

      1. I still get the same error: “uvcvideo kernel module is not loaded”, though entering “lsmod” does display (instead of nothing):
        Module Size Used by
        bnep 14552 2
        bcmdhd 7464986 0
        cfg80211 449643 1 bcmdhd
        bluedroid_pm 11204 0

        Any advice would be appreciated.

        1. I don’t know what the issue is at this point. If you did not change the eMMC (other than the extlinux.conf file) and it does not work properly, then there is something else wrong. Is the source directory still on the eMMC where you compiled the new kernel?

          1. I have reinstalled the librealsense kernel, but there is no change. I have done a fair bit on the eMMC, though was surprised by this change as I did not think I had touched this area. Maybe it is more straight forward to flash and start fresh as it is may be too difficult to trace the problem?

          2. Unfortunately you’re presenting multiple issues here. The first thing that you need to do is cut down some of the variables so that you don’t have to solve multiple problems at once.

            There are several actions you can take at this point.
            1) Just say the thing is mucked up, reflash and rebuild everything. Once it is running on the eMMC, clone it to your PC so you don’t have to worry about losing everything, and then try a SSD install.

            2) If you’re interested in learning what is wrong, the first thing that I would do is disconnect the SSD entirely, and boot from the eMMC. My first guess in listening to your issue is that the local string variable is not set correctly in your menu.config file. What is the result of “uname -a”
            If you built the kernel, the local string variable determines which directory it gets put into. It is likely if it doesn’t show up at all that it is misnamed, and not in the true kernel directory.

            You could literally spend days playing with this issue. The end result is that you will better understand the kernel layout when you are done. If you’re not interested in that, reflash instead. Building a kernel is not a novice task, you have to have some understanding in what you’re trying to accomplish.

  3. Good Video. After following your videos as install ros and realsense package. I really enjoy it now. Now the problem I am facing is I am almost running out of the memory on eMMC, so I decide to add a SSD. Instead of cp everything to the SSD and boot it as root, is it possible just merge the SSD disk to the eMMC to aviod some unexpected errors since I faced some errors on librealsense when booting from SD card before. I am working on computer vision but really a newer to the kernel. Appreciate if there is any comment.

  4. great instructions, thanks a lot

    if I’m applying to TX2 board, is there anything different or I should take care of specifically?

    Thanks!

  5. I do notice that informative article, but it didn’t cover the system files copying procedures.
    Anyway I assumed the procedure is similar and tried. I successfully booted from SSD on TX2, THANKS A LOT!

  6. Just a note, if you want to continue to use the 15GB build-in Flash that came with the unit. You can remove very thing except /boot/ directory after you move all your files to SSD. However, if you boot from SD card, the /boot/ directory on 15GB build-in flash will not required. strange.

      1. Say, Jim. What is the reverse command now? I have to restore from a terabyte USD disk back to the root SSD. Is it also
        sudo cp -ax ‘/media/nvidia/My Book/Jetson2018’ ‘/media/nvidia/JetsonSSD-240’
        I booted from the MicroSD card.

  7. Hey Jetson Hacks.. Have you got a guide for installing an NVMe drive (Samsung Pro) using a PCI to M.2 adaptor ?
    I’m using Jetpack 3.2 – The drive detects, but looks like it’s just some removable storage within Ubuntu..

    Any ideas?

    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    mmcblk0rpmb 179:24 0 4M 0 disk
    mmcblk0boot0 179:8 0 4M 1 disk
    mmcblk0boot1 179:16 0 4M 1 disk
    mmcblk0 179:0 0 29.1G 0 disk
    ├─mmcblk0p1 179:1 0 28G 0 part /
    ├─mmcblk0p2 179:2 0 4M 0 part
    ├─mmcblk0p3 179:3 0 4M 0 part
    ├─mmcblk0p4 179:4 0 512K 0 part
    ├─mmcblk0p5 179:5 0 512K 0 part
    ├─mmcblk0p6 179:6 0 512K 0 part
    ├─mmcblk0p7 179:7 0 512K 0 part
    ├─mmcblk0p8 259:0 0 3M 0 part
    ├─mmcblk0p9 259:1 0 3M 0 part
    ├─mmcblk0p10 259:2 0 2M 0 part
    ├─mmcblk0p11 259:3 0 604K 0 part
    ├─mmcblk0p12 259:4 0 604K 0 part
    ├─mmcblk0p13 259:5 0 500K 0 part
    ├─mmcblk0p14 259:6 0 500K 0 part
    ├─mmcblk0p15 259:7 0 2M 0 part
    ├─mmcblk0p16 259:8 0 2M 0 part
    ├─mmcblk0p17 259:9 0 6M 0 part
    ├─mmcblk0p18 259:10 0 6M 0 part
    ├─mmcblk0p19 259:11 0 2M 0 part
    ├─mmcblk0p20 259:12 0 128M 0 part
    ├─mmcblk0p21 259:13 0 128M 0 part
    ├─mmcblk0p22 259:14 0 32M 0 part
    ├─mmcblk0p23 259:15 0 32M 0 part
    ├─mmcblk0p24 259:16 0 64M 0 part
    ├─mmcblk0p25 259:17 0 512K 0 part
    ├─mmcblk0p26 259:18 0 256M 0 part
    └─mmcblk0p27 259:19 0 467.3M 0 part
    nvme0n1 259:20 0 477G 0 disk /media/nvidia/NVMe

    lspci:
    00:01.0 PCI bridge: NVIDIA Corporation Device 10e5 (rev a1)
    01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a804

    1. The Jetson cannot use it as a boot drive. You can set it to be the root drive however. Typically you boot from the EMMC and then set the root to be your new drive.

  8. Does this process transfer over all installed programs as well as JetPack/ROS packages? If I wanted to re-flash my TX1 would I be able to do so on the SSD, or would the process default to installing on the internal eMMC?

  9. Hello,
    Thanks a lot for your tutorial, it is really usefull.
    Meanwhile, I would like to know how to do the reverse.

    Once installed the HD SSD following your tutorial, how can I go back with the 15GB internal SSD ?

    Thank you for your help and support.

    All the best,

    Chris

    1. Thank you for the kind words. You should be able to change back to the original extlinux.conf file, or edit the current one appropriately to indicate the eMMC. Thanks for reading!

  10. Hi Kangalow,
    After a while , this is still the best place to hit my goals. Hope this question will stil draw your attention and response from all the friends here. I followed your instruction, to install the extension samsung SSD on Jetson Tx1, ubuntu 18.04 version, but struggled a while , is not succeede yet, when gedit or nano the extlinux.conf, I only got this text in the file opened extlinux.conf ,no idea how to make it as boot!

    TIMEOUT 30
    DEFAULT primary

    MENU TITLE L4T boot options

    LABEL primary
    MENU LABEL primary kernel
    LINUX /boot/Image
    INITRD /boot/initrd
    APPEND ${cbootargs} quiet

    # When testing a custom kernel, it is recommended that you create a backup of
    # the original kernel and add a new entry to this file so that the device can
    # fallback to the original kernel. To do this:
    #
    # 1, Make a backup of the original kernel
    # sudo cp /boot/Image /boot/Image.backup
    #
    # 2, Copy your custom kernel into /boot/Image
    #
    # 3, Uncomment below menu setting lines for the original kernel
    #
    # 4, Reboot

    # LABEL backup
    # MENU LABEL backup kernel
    # LINUX /boot/Image.backup
    # INITRD /boot/initrd
    # APPEND ${cbootargs}

    really hope anyone can provide me some help, cos I want to integrated lot extra stuff on this TX1 , such as tensorflow,etc.

    regards,
    Dom

  11. Thanks,

    The problem is that when I try to edit extlinux.conf file after mounting a brand new SSD Drive, the file is opened, but the content is not the same as you video shows, the content is attached in last message, please have look, you can see the stage I was on.

    Please give me some guidance
    Have good weekend

    Regards
    Dom

    1. I am asking what is the command line you execute to edit the extlinux.conf file. There are two of them, one on the SD card, and one on the SSD drive. The only one that matters is the one on the SD card. Also, I could not tell if you modified the extlinux.conf file, saved it and it appeared to change, or if you do not know how to change it.

  12. As you asked, the step I was working on was when I opened extlinux.conf for modifying the boot sequence (using new ssd as primary) I cannot see the content as you showed in the video for Jetson tx1 (256ssd) . I tried to do the exact same ssd on tx1 , but the extlinux.conf didn’t have the same content as yours, so did not have ideas on how to modify the file as your doing.
    This is my step and question

    I have posted this question before, but have not get helps yet
    Hope this message makes sense to you.

  13. howdy,kangalow,

    I am using the command: $ sudo gedit /boot/extlinux/extlinux.conf
    the opened file displayed the content is only as below, which is not the same as your demonstration on : https://jetsonhacks.com/2017/01/28/install-samsung-ssd-on-nvidia-jetson-tx1/
    So, i dunno how to modify it as your tutorial .

    TIMEOUT 30
    DEFAULT primary

    MENU TITLE L4T boot options

    LABEL primary
    MENU LABEL primary kernel
    LINUX /boot/Image
    INITRD /boot/initrd
    APPEND ${cbootargs} quiet

    # When testing a custom kernel, it is recommended that you create a backup of
    # the original kernel and add a new entry to this file so that the device can
    # fallback to the original kernel. To do this:
    #
    # 1, Make a backup of the original kernel
    # sudo cp /boot/Image /boot/Image.backup
    #
    # 2, Copy your custom kernel into /boot/Image
    #
    # 3, Uncomment below menu setting lines for the original kernel
    #
    # 4, Reboot

    # LABEL backup
    # MENU LABEL backup kernel
    # LINUX /boot/Image.backup
    # INITRD /boot/initrd
    # APPEND ${cbootargs}

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer

Some links here are affiliate links. If you purchase through these links I will receive a small commission at no additional cost to you. As an Amazon Associate, I earn from qualifying purchases.

Books, Ideas & Other Curiosities