One of the many nice features of the NVIDIA Jetson TK1 is that it has a SATA interface and power connector so that it’s easy to connect an external hard disk for extra storage. It’s also pretty easy to set up in software…
First off: the cables. A standard SATA data cable works for the data connection but a Molex to SATA power cable adaptor is needed for the power connection. I used this one for example as it was to hand.
Unusually for a second disk, it appears as /dev/sda on the default Ubuntu 14.04 OS. The first thing to do is to format the external disk. gparted is very convenient for this but is not installed by default so using a terminal window enter:
sudo apt-get install gparted
By default, gparted will select the onboard flash so you need to select /dev/sda in the drop-down in the upper right of the gparted window. Delete any existing partitions, add a new ext4 partition, apply the changes and then exit gparted once that’s done.
The next step is to mount the new disk. Create a directory to use as a mount point – I use /home/ubuntu/work for this kind of thing for no particularly good reason (ubuntu is the default user created incidentally) but it could just as easily be /work for example. Then add the following line to /etc/fstab (using your favorite editor invoked with sudo):
/dev/sda1 /home/ubuntu/work ext4 defaults 0 0
sudo mount -a sudo chown ubuntu:ubuntu /home/ubuntu/work
to actually mount the disk (it will be mounted on every reboot) and change the ownership to the user ubuntu. Test it all by copying some files into /home/ubuntu/work and use the df command to check that everything looks good.