[Solved] external ssd plugged into usb3: HOW TO to make permanent path to it

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
User avatar
AZM
Level 2
Level 2
Posts: 74
Joined: Sat Oct 19, 2013 5:20 am
Location: Mesa, AZ area

[Solved] external ssd plugged into usb3: HOW TO to make permanent path to it

Post by AZM »

Solved: Please see my reply below this post for the solution. ---AZM

I run a MintBox Mini 2 Pro from the Linux Mint Store. Running Linux Mint 20.3, Cinnamon.
I have an outboard 7-port USB3 hub with external power between the MintBox and the Samsung SSD. It mounts at (originally)

Code: Select all

/media/you/samsung
.
It now mounts at

Code: Select all

/media/you/samsung5
. Not every time that I update the system and reboot, the Samsung # goes up one increment, leaving me with root-only samsung, samsung1-through-samsung4 folders in my media folder.

On my Home folder's side panel, the drive is still called "samsung." From the user's point of view, I can visit the SSD with no issue. However, I have placed a soft link in ~/home/.mozilla called "firefox" to my Firefox profile on the SSD. When the samsung# has incremented again, Firefox comes looking for its profile, and I have to delete "firefox" and recreate a new soft link.

I would like to know if I can delete the empty root folders in

Code: Select all

/media/you
. Can I rename the samsung5 folder back to its original name without screwing things up?

How may I make this SSD a permanent link that will not break?
Last edited by AZM on Sun Feb 11, 2024 10:57 pm, edited 1 time in total.
MintBox Mini 2 Pro + 250G outboard SSD
Linux Mint 21.3 Cinnamon since March 2024
User avatar
AZM
Level 2
Level 2
Posts: 74
Joined: Sat Oct 19, 2013 5:20 am
Location: Mesa, AZ area

Re: [Solved] external ssd plugged into usb3: any way to make permanent path to it?

Post by AZM »

SOLUTION, HOW TO make that permanent path to USB drive:

In Terminal, type

Code: Select all

blkid
This will get the UUID of my Samsung SSD, currently mounted as

Code: Select all

/media/you/samsung5
Before I did anything, I ran

Code: Select all

cat /etc/fstab
to view the contents of the fstab file.

I used my xed text editor to edit fstab:

Code: Select all

sudo xed /etc/fstab
I got some warnings but it worked in the past and worked today.
I added this new line:

Code: Select all

UUID=7b84083f-6f00-4c17-bc21-4110a35354aa /mnt/usb-samsung ext4    defaults,nofail,x-systemd.automount        0 2
to the bottom of fstab and saved the file, then unmounted my USB drive from the left panel of my Files GUI listing. I had to empty the trash before unmounting, but I did that and restarted the computer.

I visited the Files GUI interface and looked on the side panel. No drive listed there. I visited the filesystem from the side panel, and looked for /mnt, which previously was unused. There it was, /mnt/usb-samsung. I clicked usb-samsung and opened my drive.

Everything there was owned by me, so I need to make a shortcut in ~ (Home) so I have quick access to it, or put it on the Desktop.

Proof that it works: I deleted the broken "firefox" link to the Firefox profile and ran a command to link the profile to ~/.mozilla again. I am using Firefox with its profile on the USB drive that is mounted using the code added to fstab.

Sources of information:
How to Automount USB Devices in Linux | Baeldung on Linux
I read down to 2.3 on his page. This page has me coming off of /media/usb-stick. The usb-stick folder is the name of his drive. I used my UUID and my ext4 filesystem in the place of his UUID and "auto." I kept the rest of his line intact in my fstab file. I followed the next source's use of /mnt and named my drive "usb-samsung."

Automatically mount USB external drive - Linux Tutorials - Learn Linux Configuration

These sources helped me better understand my questions in this matter, and hope this information helps others.

Looking back in /media/you, there are five iterations of the Samsung SSD, called "samsung," "samsung1," - "samsung4," all root directories. I believe they should be removable.
MintBox Mini 2 Pro + 250G outboard SSD
Linux Mint 21.3 Cinnamon since March 2024
Post Reply

Return to “Storage”