Linux Mint Cinnamon 17.3
When I log in after a reboot, my external USB automatically mounts at /media/user1/. However if user2 logs in before user1, it mounts at /media/user2/ instead, and unless user2 specifically unmounts the drive and "switch user" is used, user1 cannot access the data on the drive, and any processes (e.g., Plex Media Server, Subsonic) using data on that drive are also unable to access it as it's not at the expected path.
How can I make it mount with the same path every time regardless what user logs in?
Thanks, and let me know if I need to provide any further info.
EDITED for clarity
Mount path for external USB drive
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Mount path for external USB drive
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Mount path for external USB drive
What would be needed is a mount point other than /media/user1 and an entry in /etc/fstab with the nofail option in case the drive is not plugged in when booting.
Paste back
Paste back
Code: Select all
sudo blkid
Re: Mount path for external USB drive
Thanks for your reply.
/dev/sda1: LABEL="System" UUID="8E94DECD94DEB745" TYPE="ntfs"
/dev/sda2: LABEL="TI106348W0B" UUID="4A461D1A461D0879" TYPE="ntfs"
/dev/sda3: LABEL="HDDRECOVERY" UUID="C4AE2C65AE2C51EA" TYPE="ntfs"
/dev/sda5: UUID="718816d2-e77b-4c92-bead-8902f49e1fbb" TYPE="ext4"
/dev/sda6: UUID="11ccfe33-776d-4dc0-8654-5c5c1111b797" TYPE="swap"
/dev/sdb1: UUID="f5552ad3-a58d-4356-88eb-00dc034db7f7" TYPE="ext4"
That last line is my USB drive
/dev/sda1: LABEL="System" UUID="8E94DECD94DEB745" TYPE="ntfs"
/dev/sda2: LABEL="TI106348W0B" UUID="4A461D1A461D0879" TYPE="ntfs"
/dev/sda3: LABEL="HDDRECOVERY" UUID="C4AE2C65AE2C51EA" TYPE="ntfs"
/dev/sda5: UUID="718816d2-e77b-4c92-bead-8902f49e1fbb" TYPE="ext4"
/dev/sda6: UUID="11ccfe33-776d-4dc0-8654-5c5c1111b797" TYPE="swap"
/dev/sdb1: UUID="f5552ad3-a58d-4356-88eb-00dc034db7f7" TYPE="ext4"
That last line is my USB drive
Re: Mount path for external USB drive
Make a mount point, call it anything you want, but just make sure it matches the fstab entry. I'll use data for illustration.
Add this to /etc/fstab
Create the mount point
Then
The line in fstab will attempt to mount it at boot, but should not fail if it's not attached.
Good luck
Add this to /etc/fstab
Code: Select all
UUID=f5552ad3-a58d-4356-88eb-00dc034db7f7 /media/data ext4 defaults,nofail,errors=remount-ro,user,noatime 0 0
Code: Select all
sudo mkdir /media/data
Code: Select all
mount /media/data
Good luck
Re: Mount path for external USB drive
Thanks so much!! I'll give this a try when I'm back in front of that laptop.
Re: Mount path for external USB drive
you can also use gparted if its not installed
there is a dropdown in the top right corner allowing you to select different disks. this dropdown will show all the /dev/s.. drives you have.
You can also use disks instead of gparted
all drives are listed on the left click the one you want (your usb drive) and at the very top you will see /dev/s..
then follow WharfRat instructions for mounting.
The reason i suggest using gparted or disks as an alternative to the terminal command sudo blkid for new users is because it makes i a bit easier to decipher which device is which.
Code: Select all
sudo apt-get install gparted
there is a dropdown in the top right corner allowing you to select different disks. this dropdown will show all the /dev/s.. drives you have.
You can also use disks instead of gparted
all drives are listed on the left click the one you want (your usb drive) and at the very top you will see /dev/s..
then follow WharfRat instructions for mounting.
The reason i suggest using gparted or disks as an alternative to the terminal command sudo blkid for new users is because it makes i a bit easier to decipher which device is which.