Page 1 of 1

Automatic mounting of hdd on system startup:

Posted: Mon Aug 15, 2022 6:20 am
by Kester
Hi,

Thanks to help from forum members I have recently set up a full installation of MX-Linux on an external usb hdd. The drive is attached to a desktop computer running Linux Mint 20.3. The Mint OS is installed on an internal 125gb ssd but there is also a 1tb hdd within the desktop which I use for data files and backups etc.

Although I can easily access the internal hdd from within MX-Linux (it appears on the MX desktop), it has to be mounted. This requires my password to authenticate the action. I've no problem with that but it would be convenient if the internal hdd drive mounted automatically when I boot up MX-Linux. If this can be done I would be grateful for advice.

Thank you.

Re: Automatic mounting of hdd on system startup:

Posted: Mon Aug 15, 2022 6:42 am
by Jerry3904
Try using Disk Manager to have it automatically mounted.

Re: Automatic mounting of hdd on system startup:

Posted: Mon Aug 15, 2022 7:33 am
by Kester
Hi Jerry,

Many thanks. That was so easy with no manual editing of the fstab file - just ticked a box in Disk Manager and it was done. I'd read so many different suggestions online with dire warnings of what could happen if you messed up without backing up first. Your solution was perfect so thanks again.

Cheers.

Re: Automatic mounting of hdd on system startup:

Posted: Mon Aug 15, 2022 8:45 am
by Huckleberry Finn
Glad you solved it easily.

This is not a big issue, but (just by the way, generally speaking) you need to click the check-mark icon on the post "that was the solution" (#2 in this case).

(You can click it twice: 1st one will remove the current mark, 2nd will mark) :)

Re: Automatic mounting of hdd on system startup:

Posted: Mon Aug 15, 2022 8:49 am
by fehlix
Kester wrote: Mon Aug 15, 2022 6:20 am Although I can easily access the internal hdd from within MX-Linux (it appears on the MX desktop), it has to be mounted. This requires my password to authenticate the action.
FWIW, you may get rid of the password prompt to mount internal drives with one click in Thunar file manger by enabling
within "MX Tweak" -> Other-tab the option "Enable mounting of internal drives by non-root users".

Re: Automatic mounting of hdd on system startup:

Posted: Mon Aug 15, 2022 2:00 pm
by Kester
Thanks fehlix, these MX tools are certainly useful

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 5:44 am
by Kester
UPDATE to SITUATION

Hi,

Although the internal hard drive is mounted on startup it is in 'read only' mode only and appears to be controlled by root. The right click permissions items are all greyed out. Is there a simple way to allow access automatically. This would make things more convenient in using Grsync for backing up files to the internal hard drive. When I untick the drive in Disk Manager, and manually mount the drive on startup, Grsync works happily but with the drive ticked it throws up a string of errors.

Any ideas or suggestions thanks? I've removed the 'Solved' marker for the time being.

Cheers.

PS: the tip to avoid having to use the password continues to work satisfactorily.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 5:55 am
by fehlix
Kester wrote: Tue Aug 16, 2022 5:44 am UPDATE to SITUATION

Hi,

Although the internal hard drive is mounted on startup it is in 'read only' mode only and appears to be controlled by root. The right click permissions items are all greyed out. Is there a simple way to allow access automatically. This would make things more convenient in using Grsync for backing up files to the internal hard drive. When I untick the drive in Disk Manager, and manually mount the drive on startup, Grsync works happily but with the drive ticked it throws up a string of errors.

Any ideas or suggestions thanks? I've removed the 'Solved' marker for the time being.

Cheers.

PS: the tip to avoid having to use the password continues to work satisfactorily.
Please, post "Quick System Info" if you want to avoid "Help replies" by helpful mind readers, which may help or not.
In addtion post details about the filesystems involved:
like the output shown with

Code: Select all

lsblk -f
and state which one of the listed partitions is the one you want to have access to.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 9:20 am
by Kester
Hi fehlix,

Thanks for posting back - sorry I'm not the brightest of pupils but hope the attachments will provide the information you require to assist me.

Best regards.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 9:44 am
by wdscharff
Oh please, asking for help, read through how to do it properly
It's under the Welcome, on the main page, on every group page ... post the text, and no file attachments.

I don't have a program on my work system that can read docx, for example, so I'm not going to install office or get my laptop out of the car.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 9:52 am
by fehlix
wdscharff wrote: Tue Aug 16, 2022 9:44 am Oh please, asking for help, read through how to do it properly
It's under the Welcome, on the main page, on every group page ... post the text, and no file attachments.

I don't have a program on my work system that can read docx, for example, so I'm not going to install office or get my laptop out of the car.
+1 - a simpel text-file posted may be either as attachment or as text-block (preferred) between those [code] code.tags
[/code
] would certainly help those who try to help or motivate to help.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 9:59 am
by wdscharff
In principle, this sounds like one of the popular ownership/rights problems and I'll give you a hint in the dark, crystal ball and all ....

There are several solutions if you have problems with the owner of the directories/files of a mounted disk.
Absolutely simple, with a file manager that still has a root function on the corresponding mount point e.g.
/media/winni/7e735c5b-cf57-4950-bfce-885a991a495f/
or if you have a name for the disk
/media/winni/qvo/

With mx, the mountpoint is usually in /media , then comes the user name and the device name.
Simply mark the device name with the root file manager and allow writing/reading for all.
is of course against the rules, because ALL means all!

Via the command line, you explicitly enable reading/writing for a specific user, which looks like this for the two devices

sudo chown -R winni /media/winni/qvo/

sudo chown -R winni /run/media/winni/7e735c5b-cf57-4950-bfce-885a991a495f/

more about the chown command in the linux wiki of your choice (just google it)

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 10:35 am
by Kester
wdscharff,

Thank for your comments. Yes I had read the 'how to ask for help' info and I did not see anything about not posting file attachments - I fail to understand why, if attachments are not permitted, the facility is included for posters. Also I was responding directly to another member who specifically asked me to forward the information. With the attachment facility available I assumed that was the best way to forward it because the system information from "Quick System Info" was rather lengthy. I chose docx because it is such a widely used format and I'm sure fehlix will tell me if I was wrong in choosing that method.

I found your tone to be somewhat unnecessarily aggressive particularly considering I am a new, inexperienced member. My experience of this forum up to now has been very positive finding those responding to my requests for help to be patient, understanding and confidence building in their replies. It is a pity that your input has been so very different and has soured the atmosphere for me. If I needed to be guided in how I post, it could be done in a more polite and helpful way than your method.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 10:46 am
by wdscharff
Your answer is inappropriate.
The forum rules are clear.
Your reaction to my comment is demotivating.
I regret having given you a tip, this will certainly not happen again.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 10:50 am
by Eadwine Rose
When we ask for quick system info, we do so for a reason. It may seem lengthy to you, but that is your opinion. You will see us asking it everywhere till we see blue in the face sometimes. In order to help you we need to see it, as it is, pasted here, not in a doc or pastebin. It has been designed as formatted for the forum.

As for other things that are personal: take it up in a PM please. Thanks.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 11:09 am
by fehlix
Kester wrote: Tue Aug 16, 2022 9:20 am Hi fehlix,

Thanks for posting back - sorry I'm not the brightest of pupils but hope the attachments will provide the information you require to assist me.

Best regards.
Now try this:
Unmount in Thunar filemanger the ntfs partition sda1
and mount with disk-manger /dev/sda1
as you have done before
and now do post the content of the file
/etc/fstab
as text
between thos code-tags [code] content of fstab here[/code]
You can press the [</>] button above the post-editor
to insert the code-tags.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 12:01 pm
by Kester
Hi all,

I'm sorry but have got into a bit of a muddle. I was upset by your first post on this thread wdscharff and my response was to that not your second much more helpful input so apologies for the misunderstanding. Please don't let us fall out over it and please also bear in mind that I am an 81 year old fogey and that some techological issues can go over my head but I am willing to try.

Thanks too to you again fehlix and Eadwine Rose for putting me straight on attachments - perhaps an explanation of how best to add text to posts, as you have carefully explained to me fehlix, could be included in the 'How to get help' item for the benefit of new members - I suspect many ex Ubuntu versions users, like me, will be joining up.

fehlix, I'll post again with the information you require.

Thanks.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 12:15 pm
by Kester
Hi fehlix,

Hope this is OK (etc/fstab file after unmounting HDD via Thunar and mounting via Disk Manager):

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sdc1 :
UUID=9e69356d-94db-4b4f-b620-fa052a82fd20	/	ext4	noatime	1	1
#Entry for /dev/sda1 :
UUID=629DBC5D48080494	/media/HDD	ntfs	defaults,umask=0222,x-gvfs-show	0	0
#Entry for /dev/sdc2 :
UUID=5144ed61-9a42-48e6-bac5-9d2c2e36e328	swap	swap	defaults	0	0
Cheers.

Re: Automatic mounting of hdd on system startup:  [Solved]

Posted: Tue Aug 16, 2022 12:28 pm
by fehlix
Kester wrote: Tue Aug 16, 2022 12:15 pm Hi fehlix,

Hope this is OK (etc/fstab file after unmounting HDD via Thunar and mounting via Disk Manager):

Code: Select all

#Entry for /dev/sda1 :
UUID=629DBC5D48080494	/media/HDD	ntfs	defaults,umask=0222,x-gvfs-show	0	0
OK, now open disk-manager again.
And select ntfs-3g from the drop down list, instead of ntfs (readonly),
and post again /etc/fstab

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 12:35 pm
by seaken64
I won't open attachments either.

Please copy the text output from the terminal and paste into the forum post between "code" markers.

Thank you,
Seaken64

Ahh, yes, I see you did that. Good. Thank you. (I didn't notice page 2 of the thread yet)

BTW, while attachments are allowed it is not generally a good idea to use attachments in these cases. It's just a matter of forum "norms", as you are learning.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 12:59 pm
by fehlix
seaken64 wrote: Tue Aug 16, 2022 12:35 pm Please copy the text output from the terminal and paste into the forum post between "code" markers.
No need to re-iterate what was already stated.
Thanks

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 1:32 pm
by Kester
Hi fehlix,

Here is the file text you requested:

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sdc1 :
UUID=9e69356d-94db-4b4f-b620-fa052a82fd20	/	ext4	noatime	1	1
#Entry for /dev/sda1 :
UUID=629DBC5D48080494	/media/HDD	ntfs-3g	defaults,uid=1000,gid=100,dmask=0002,fmask=0113,utf8,x-gvfs-show	0	0
#Entry for /dev/sdc2 :
UUID=5144ed61-9a42-48e6-bac5-9d2c2e36e328	swap	swap	defaults	0	0
This has been a telling and educational experience for me in more ways than one so many thanks for your patience and dogged determination to help me.
I believe you have resolved this for me but I have yet to test with Grsync. Certainly permissions is set to read/write.
I'll post back after setting up a Grsync backup but probably tomorrow as my ancient eyes need a rest.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 1:48 pm
by Kester
UPDATE

Hi fehlix,

Great news - it all worked - Many thanks.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 1:53 pm
by baldyeti
I believe ntfs has been synonymous with ntfs-3g in debian for quite a while (they use the better maintained fuse/ntfs3g driver no matter what type fstab or mount specifies)

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 1:56 pm
by fehlix
baldyeti wrote: Tue Aug 16, 2022 1:53 pm I believe ntfs has been synonymous with ntfs-3g in debian for quite a while (they use the better maintained fuse/ntfs3g driver no matter what type fstab or mount specifies)
Not with disk-manager, b/c we kept the original read-only options, in case someone needs readonly.

Re: Automatic mounting of hdd on system startup:

Posted: Tue Aug 16, 2022 11:21 pm
by seaken64
fehlix wrote: Tue Aug 16, 2022 12:59 pm
seaken64 wrote: Tue Aug 16, 2022 12:35 pm Please copy the text output from the terminal and paste into the forum post between "code" markers.
No need to re-iterate what was already stated.
Thanks
Yeah, I know. Already edited the post. I didn't realize I hadn't read into page two of the thread yet.

Seaken64