Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

2nd drive - how to mount automatically

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Vsat
Posts: 15
Joined: 2021-07-07 13:47
Has thanked: 4 times

2nd drive - how to mount automatically

#1 Post by Vsat »

I have Debian10 installed on M.2 SSD in a Dell laptop. I also have a 2Tb HDD, but I have to enter the password to access it using Gnome 'Files' app.
How do I configure it to mount automatically?
And can I give it an alias name, as it is listed as "2.0 TB Volume" which is not very elegant?
Thanks

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: 2nd drive - how to mount automatically

#2 Post by 4D696B65 »


User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: 2nd drive - how to mount automatically

#3 Post by ticojohn »

I assume that the 2Tb HDD is used for data and does not have some OS installed. To do what I think you want to do, and not taking anything away from the post by @4D696B65, I installed a program called gnome-disk-utility. With that utility you can name the drive and can designate the drive to be mounted at startup. After installing (on xfce), the utility is found at Menu > Accessories > Disks.
I am not irrational, I'm just quantum probabilistic.

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: 2nd drive - how to mount automatically

#4 Post by CwF »

Also there is the systemd.automount option.

You can change the 'label', gparted is an easy way.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: 2nd drive - how to mount automatically

#5 Post by p.H »

Beware, automount is not what one usually expects. It is rather for on-demand mount (mount on access).

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: 2nd drive - how to mount automatically

#6 Post by CwF »

p.H wrote:Beware, automount is not what one usually expects
Well, it's an option, a long one with a few low level ingredients that all tie together.
It is indeed re-inventing the wheel.

there are the two required systemd .mount and .automount files.
then the modded pkla polkit file with an additional 'org.freedesktop.systemd1.manage-units' right added to the user...
I'll note, the udisk2 rules mentioned elsewhere don't work for me...
Then the user need no privileged, they can not choose what where, just on/off.

I have this worked out reliably, not extensively tested, on a sudo-less system. More to go.

If you mix this wheel with older wheels it can destroy the differential!
ie, use a standard 'umount' as root on a automounted device it can lock the interface, tty's alive.

Post Reply