Easily set drives to mount automatically at boot

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
MintBean

Easily set drives to mount automatically at boot

Post by MintBean »

This is for people who to enable a second drive to auto-mount at system start up WITHOUT editing a system file by hand.

1. Open the application 'Disks' from the Mint menu. (It's under 'Accessories.')
2. In the left hand part of the window, click on the disk which contains the partition you wish to mount.
3. The partition layout of the selected disk will appear in the right hand portion of the window.
4. Select the partition you wish to auto-mount by clicking on it. The selected partition will be highlighted.
5. Optional - If you wish to immediately mount the disk, you can do so by pressing the triangular 'play' button that appears to the left below the partition display. This will NOT cause it to auto-mount on next boot.
You may unmount the partition if you wish by pressing the square 'stop' button that appears where the play button was.
6. Click the cog icon <additional partition options> and select 'edit mount options.'
7. Switch 'automatic mount options' to OFF.
8. Check the 'mount at startup' box.
9. Optional - choose a custom mount point - in the 'Mount point' box, enter the mount point. I always choose something in the /mnt directory. e.g. '/mnt/Mydiscname'
10. Optional - give your disk a nice display name. This is the name it will appear as on the desktop. Enter your chosen name in the 'display name' field.
11. Hit OK and close the disks application. The disk should automount on next boot.
Last edited by MintBean on Tue Oct 10, 2017 6:45 pm, edited 1 time in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 24617
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Easily set drives to mount automatically at boot

Post by xenopeek »

Good tutorial! Stickied.
MintBean wrote:11. Optional - if the disk is a solid state (SSD) you may wish to stop the system writing the time of the last file access to files when they are used. This saves on writes which add wear to the disk. To do this, edit the field that has no label but contains a bunch of options like 'nosuid,nodev,nofail,x-gvfs-show'. Leave the existing contents intact, but add ',noatime' to the end (without the quotes, with the preceding comma as indicated.)
You already wrote it as optional but I think this is dated information. The kernel uses relatime by default and that only updates the last access time when the file is modified—at which time the file's information block is written anyway to update the last modified time. When compared to relatime, noatime doesn't further reduce disk writes.
Image

MintBean

Re: Easily set drives to mount automatically at boot

Post by MintBean »

Hey, thanks for the sticky, xenopeek!
In light of your advice, I've removed the unnecessary line.

User avatar
nickname
Level 1
Level 1
Posts: 25
Joined: Sun Feb 17, 2019 11:38 am

Re: Easily set drives to mount automatically at boot

Post by nickname »

Excellent write-up. Still works in Linux Mint 19.1, xfce.

Thanks.

User avatar
PaulCarry
Level 1
Level 1
Posts: 6
Joined: Fri Apr 26, 2019 7:50 am
Location: Madrid, Spain
Contact:

Re: Easily set drives to mount automatically at boot

Post by PaulCarry »

nickname wrote:
Tue Feb 19, 2019 10:22 am
Excellent write-up. Still works in Linux Mint 19.1, xfce.

Thanks.
+1 Was just about to confirm this too.

User avatar
deanr72
Level 3
Level 3
Posts: 160
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: Easily set drives to mount automatically at boot

Post by deanr72 »

This was one of the first majorly frustrating issues I had with a Linux distro when I first switched from Windows. A very useful sticky indeed.

Buzzsaw
Level 6
Level 6
Posts: 1322
Joined: Sat Aug 23, 2014 12:53 pm

Re: Easily set drives to mount automatically at boot

Post by Buzzsaw »

xenopeek wrote:
Tue Oct 10, 2017 6:41 pm
Good tutorial! Stickied.
MintBean wrote:11. Optional - if the disk is a solid state (SSD) you may wish to stop the system writing the time of the last file access to files when they are used. This saves on writes which add wear to the disk. To do this, edit the field that has no label but contains a bunch of options like 'nosuid,nodev,nofail,x-gvfs-show'. Leave the existing contents intact, but add ',noatime' to the end (without the quotes, with the preceding comma as indicated.)
You already wrote it as optional but I think this is dated information. The kernel uses relatime by default and that only updates the last access time when the file is modified—at which time the file's information block is written anyway to update the last modified time. When compared to relatime, noatime doesn't further reduce disk writes.

I'm afraid that's incorrect.

From man mount:
Since Linux 2.6.30, the kernel defaults to the behavior provided by [relatime] (unless noatime was specified), and the strictatime option is required to obtain traditional semantics. In addition, since Linux 2.6.30, the file's last access time is always updated if it is more than 1 day old.
Therefore noatime significantly reduces disk writes compared to relatime.

User avatar
Flemur
Level 18
Level 18
Posts: 8385
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Easily set drives to mount automatically at boot

Post by Flemur »

MintBean wrote:
Tue Oct 10, 2017 5:06 pm
10. Optional - give your disk a nice display name. This is the name it will appear as on the desktop. Enter your chosen name in the 'display name' field.
Is 'display name' the same as the LABEL value in e.g.

Code: Select all

$ blkid
/dev/sda1: LABEL="MINT" UUID="2a21...d6" TYPE="ext4" PARTUUID="stuff...1"
?
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

Fires
Level 1
Level 1
Posts: 26
Joined: Thu Mar 26, 2020 9:08 am

Re: Easily set drives to mount automatically at boot

Post by Fires »

I Need some help here
is this only for linux mint ?

and this is my HDD with Linux mint on it

https://imgur.com/ECxAyNk

thank u

User avatar
Sgthawker
Level 4
Level 4
Posts: 225
Joined: Sun Apr 27, 2014 2:23 am

Re: Easily set drives to mount automatically at boot

Post by Sgthawker »

If you are referring to the highlighted drive in the image, it is the esp, it is required for booting on a UEFI computer. It is not for linux or windows in particular, it is for any OS to boot on a UEFI system.
LM18.3KDE/LM19.3Cin/Peppermint 10R/Kubuntu19.10 UEFI on Sabertooth Z170 S, i6700K, GTX950, Samsung 970 Pro M.2 NVMe
LM18.3KDE/KDEneon5.18/Leap15.1/Kubuntu20.04/Kubuntu19.10/LMDE 4 UEFI on STRIX laptop, i7700 HQ, GTX 1060, Samsung 970 Pro M.2 NVMe

User avatar
PhilAypee
Level 3
Level 3
Posts: 146
Joined: Sat Jul 30, 2016 5:14 am
Location: Bramley, Surrey, UK

Re: Easily set drives to mount automatically at boot

Post by PhilAypee »

MintBean wrote:
Tue Oct 10, 2017 5:06 pm
This is for people who to enable a second drive to auto-mount at system start up WITHOUT editing a system file by hand.

1. Open the application 'Disks' from the Mint menu. (It's under 'Accessories.')
2. In the left hand part of the window, click on the disk which contains the partition you wish to mount.
3. The partition layout of the selected disk will appear in the right hand portion of the window.
4. Select the partition you wish to auto-mount by clicking on it. The selected partition will be highlighted.
5. Optional - If you wish to immediately mount the disk, you can do so by pressing the triangular 'play' button that appears to the left below the partition display. This will NOT cause it to auto-mount on next boot.
You may unmount the partition if you wish by pressing the square 'stop' button that appears where the play button was.
6. Click the cog icon <additional partition options> and select 'edit mount options.'
7. Switch 'automatic mount options' to OFF.
8. Check the 'mount at startup' box.
9. Optional - choose a custom mount point - in the 'Mount point' box, enter the mount point. I always choose something in the /mnt directory. e.g. '/mnt/Mydiscname'
10. Optional - give your disk a nice display name. This is the name it will appear as on the desktop. Enter your chosen name in the 'display name' field.
11. Hit OK and close the disks application. The disk should automount on next boot.
This worked almost flawlessly for me. :)

The flaw was that Thunar removed the wastebasket option (it only allowed delete unless the file/files/directory/directories were moved to the wastebasket). To restore it I had to run the Configure Thunar program. It was easy but it might not be obvious to some people :!:
Take care,
Phil.

Minimize your therbligs until it becomes automatic;
this doubles your effective lifetime – and thereby gives time to enjoy
butterflies and kittens and rainbows.


LM 19.3 Xfce 64 bit - 4Gb RAM Dual Core Celeron N3350
🚂🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃🚃

Post Reply

Return to “Tutorials”