Storing Dependencies on External Hard Drive

Hi all,

I want to download some software onto the Jetson like Cmake, PCL, and Ncurses. Unfortunately, the Jetson’s 16 GB memory isn’t nearly enough to store all of the programs and dependencies. I have a 500 GB SSD connected and mounted to the Jetson, and would like to store and install the dependencies on the SSD.

However, I’m not entirely sure how to go about doing this. Normally I would just clone the Jetson’s memory to the SSD, but I don’t have a second Linux computer from which to carry out the process.
Most of the research I’ve done has turned up symlinks as a possible solution, but that would involve me transferring the /bin/ and /usr/ folders to the SSD and symlink to them from the Jetson - a process that could possibly brick the Jetson.

Is there a way to install the dependencies onto the SSD and instruct the Jetson to call the dependencies from there?

You can “mount” a partition anywhere you like. A common example is to mount a partition which is ext4 formatted to “/usr/local”, which can mirror a standard directory structure, e.g., “/usr/local/etc”, “/usr/local/share”, “/usr/local/man”, “/usr/local/bin”, so on. Should you want a partition to take over for something which already exists, it can get a bit more complicated, but isn’t too bad. So for example some people want “/home” to be on its own drive so they can upgrade a system and physically migrate the home directory to a new machine. Assuming you are on a JTX1 and the new partition is “/dev/sda1”, while the eMMC currently has “/home”, you could temporarily mount sda1 on “/mnt” and then do a recursive copy from “/home” to “/mnt”, or use other programs such as rsync or cpio to do the file copy. Once sda1 has the content of “/home”, you’d simply edit “/etc/fstab” to make sda1 mount as “/home” at each reboot.

If you are talking about needing multiple specific directories at different locations needing their real location be the hard drive, then you will probably just mount the hard drive somewhere out of the way and use symbolic links, e.g., you could mount sda1 at “/mnt/data”, make directories there for “foo”, “bar”, and “baz”, then somewhere else you can link to those directories…e.g., you could have “/home/ubuntu/foo” link to “/mnt/data/foo”, “/var/www/html/bar” can be a link to “/mnt/data/bar”, and “/usr/share/doc/baz” can be a link to “/mnt/data/baz”.

The distinction in which method to use is whether there is a 1:1 correspondence between partitions and mount points, or a many-to-1 directory-to-single-partition correspondence.

So it just depends on what your needs are and whether the drive will always be connectoed.

More complicated schemes involve using logical volume manager (LVM), but this normally combines a series of disks which are of the same or similar type in a RAID scheme (or similar).

One thing I sometimes do is create an iSCSI server on another machine and then I can mount that drive to any other machine over gigabit at any time. This gets really complicated, but migrating data and flexibility among multiple machines is about as good as it gets. Basically iSCSI is the poor man’s version of Network Attached SCSI (NAS) appliances.

One other network based scheme is NFS mounting, but although this is extremely convenient and somewhat simpler to set up than iSCSI, it also has weaknesses which I don’t care to run into in a development environment where a software hang can destroy something.