Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-02-2022, 02:19 PM
|
#1
|
LQ Newbie
Registered: Nov 2021
Posts: 14
Rep: 
|
Auto Mount 2nd HDD
I have a second hard drive on latest Fedora Workstation that requires a password to mount.
Can someone please step me in the right direction for making this drive available with no pass required when logged in?
Thank you.
|
|
|
01-02-2022, 05:22 PM
|
#2
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,426
|
Include an entry for it in /etc/fstab. Make its mount point a location with appropriate permissions for your login account. Add a user option in its fstab entry for passwordless mounting and unmounting. man fstab
|
|
|
01-02-2022, 09:04 PM
|
#3
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,835
|
Here's an excellent tutorial on fstab: https://www.cyberciti.biz/faq/linux-...-update-fstab/
It's the one that taught me how to use UUIDs in /etc/fstab.
|
|
|
01-03-2022, 04:53 AM
|
#4
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,829
Rep: 
|
When more than one disk, you need to use UUID, so that it will always mount to your chosen mount point.
|
|
|
01-03-2022, 05:41 PM
|
#5
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,426
|
Quote:
Originally Posted by fatmac
When more than one disk, you need to use UUID
|
May use, not need to use. I have hundreds of fstabs and not one of them in current use contains any UUIDs. LABEL is an option (that I use as an alternative to UUID) that is much easier for human brains to type and remember.
|
|
|
01-04-2022, 05:32 PM
|
#6
|
LQ Newbie
Registered: Nov 2021
Posts: 14
Original Poster
Rep: 
|
Just getting to this now.....
I am ready to edit fstab - should I use UUID of disk or partition UUID?
Code:
/dev/sdb1: LABEL="HDD2" UUID="dcfb3e52-e7c8-4569-921b-7ed6e47bea4b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="a28f670c-f56a-453e-ad79-cd79d8db552e"
|
|
|
01-04-2022, 07:41 PM
|
#7
|
LQ Newbie
Registered: Nov 2021
Posts: 14
Original Poster
Rep: 
|
I gave it a go and added this line in fstab:
Code:
UUID=dcfb3e52-e7c8-4569-921b-7ed6e47bea4b /run/media/rosie/HDD2 ext4 default 0 0
Unfortunately adding this crashed my system. I was able to use terminal with live USB edit this line out and am back up and running again.
Could someone please tell me what I did wrong?
|
|
|
01-04-2022, 07:48 PM
|
#8
|
Moderator
Registered: Aug 2002
Posts: 26,644
|
Code:
UUID=dcfb3e52-e7c8-4569-921b-7ed6e47bea4b /run/media/rosie/HDD2 ext4 default 0 0
The correct syntax is defaults not default.
My preference would be to mount the drive at /media/HDD2 but it does not matter.
|
|
|
01-04-2022, 08:08 PM
|
#9
|
LQ Newbie
Registered: Nov 2021
Posts: 14
Original Poster
Rep: 
|
The mount point is what how the installation of Fedora made it.
Could you please show me how you would make the entry in fstab for this drive?
|
|
|
01-04-2022, 08:32 PM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,644
|
Many systems automatically mount to /run/media/username/... but you can mount it just about any where. /mnt or /media makes it eeasier. Just create a directory via mkdir and use that in the fstab file.
|
|
|
01-04-2022, 09:46 PM
|
#11
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,426
|
/run/media is a system thing. For a personal use filesystem, put it in a convenient location of your choice, e.g. somewhere in /home/, /home/myuser/ or /home/myuser/bigdata/.
|
|
|
01-04-2022, 10:24 PM
|
#12
|
LQ Newbie
Registered: Nov 2021
Posts: 14
Original Poster
Rep: 
|
Sorry to say but that is not really helpful.
Is it correct to say that it was my fstab edit and not the choice of mount point that was the problem?
I am not a Linux expert but I do know it is never useful to get pulled down the wrong path when troubleshooting any system.
|
|
|
01-05-2022, 12:35 AM
|
#13
|
LQ Newbie
Registered: Nov 2021
Posts: 14
Original Poster
Rep: 
|
Quote:
The correct syntax is defaults not default.
|
So all I need to change is default to defaults...like this?
Code:
UUID=dcfb3e52-e7c8-4569-921b-7ed6e47bea4b /run/media/rosie/HDD2 ext4 defaults 0 0
|
|
|
01-05-2022, 12:52 AM
|
#14
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,426
|
Yes, but I'd change it to this
Code:
UUID=dcfb3e52-e7c8-4569-921b-7ed6e47bea4b /home/rosie/HDD2 ext4 defaults 0 0
to improve access to its content, because less file manager navigation will be necessary to access it. Actually it's not what I would do. It's just a suggestion, since I use LABELs in all my own fstabs. 
|
|
|
01-05-2022, 09:53 AM
|
#15
|
LQ Newbie
Registered: Nov 2021
Posts: 14
Original Poster
Rep: 
|
Thank you, appreciate the advice.
Can the mount point be changed just like that in fstab or somewhere else first?
|
|
|
All times are GMT -5. The time now is 06:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|