I have a Jetson Xavier Dev-kit (jetpack 4.2) and have installed and formatted a 1tb Samsung EVO NVME SSD.
If I start it up, and SSH into it, the SSD does not exist (/media/user/1tbSSD just doesn’t exist).
However, if I first start it up, then login using the GUI interface with a monitor and keyboard. Then do nothing more and SSH. The SSD exists from the SSH terminal point of view as expected.
Why is this? I would like to be able to access the SSD without needing to use the GUI first, but I would prefer to keep the GUI if I choose to use it later. What can I do to fix this?
In all cases I logged in as the same user. I used putty to SSH.
Anything showing up in “/media” is based on being owned by whoever logs in at the local GUI. This is not the only access to the device. If you want this disk mounted somewhere specific without requiring a login, then you would simply add the correct entry to “/etc/hosts”. With this drive connected what do you see from “lsblk -f”? You only need to list the entries for that device, but you can list them all if you don’t know which one goes with that disk. It might be more informative to run that command while logged in such that the disk appears in “/media” (the lsblk will show mount point…if it is in “/media”, then you know it is the SSD).
FYI, this is just a desktop “Linux thing”, and isn’t dependent upon distribution or particular hardware for the most part.
Also, where do you want the disk to be available at? Will the disk always be connected? Is it USB? m.2?
+1 for @linuxdev
/media/user mount points are only done with Ubuntu GUI session.
If headless and remotely logged, you would have to manually create mount points (say in /mnt) and manually mount any external drive.
Thank you! I just created a mount point as suggested. It is installed in the m.2 slot and will be always connected. It all works now.
The correct file name is “/etc/fstab” and this is, indeed, a standard Linux / UNIX thing. The GUI file manager has a feature that finds un-mounted drives and mounts them into “/media”, but that’s not standard when you don’t log in to the GUI.
Adding the disk to fstab is pretty easy, assuming you have sudo privileges.
First, you need to figure out the hardware device name of the partition you want to mount, or the UUID of the file system. You can find it with, for example, “sudo lsblk -f”
Then you add a line like this to /etc/fstab:
echo "UUID=f047ec91-3143-4ad1-a7e6-beef1d621e3a /opt/mydisk ext4 defaults,noatime 0 2" >> /etc/fstab
device name based mount:
echo "/dev/nvme0n1p1 /opt/mydisk ext4 errors=remount-ro,noatime 0 1" >> /etc/fstab
You also need to make sure that the directory “/opt/mydisk” (or whatever) exists:
sudo mkdir -p /opt/mydisk
Also, if you made the disk using FAT32 or NILFS or some other file system than EXT4, you should substitute that file system type in the above commands. “lsblk -f” will tell you the file system type for each available partition.