Auto Mount Partitions on Boot (also Windows partitions)

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
AlbertP
Level 16
Level 16
Posts: 6714
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by AlbertP »

You probably removed some line from /etc/fstab, or mounted some filesystem at a wrong location. You can boot a Mint disc, there open the file manager and go to your Linux partition (note it's not the "File System" button - that is the filesystem of the CD/DVD) to edit /etc/fstab again.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
ajg007
Level 1
Level 1
Posts: 45
Joined: Tue Sep 11, 2012 3:18 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by ajg007 »

AlbertP wrote:You probably removed some line from /etc/fstab, or mounted some filesystem at a wrong location. You can boot a Mint disc, there open the file manager and go to your Linux partition (note it's not the "File System" button - that is the filesystem of the CD/DVD) to edit /etc/fstab again.

Thanks. That sorted it.

Better keep the linux mint disk in the drive lol.

Here goes attempt number 2 lol
ajg007
Level 1
Level 1
Posts: 45
Joined: Tue Sep 11, 2012 3:18 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by ajg007 »

Ive managed to do it in a round about way.

I used the terminal to create the mount points using mkdir.

Then in a text document creating the uuid like this:

#Auto mount the Backups partition, (sdb2), File format: NTFS
UUID="FAA4042DA403EAC9" /home/alan/Backups ntfs defaults 0 2

then booting up parted magic i opend the fstab and added the lines above.

Might be a long way round but it works!
nthcode
Level 1
Level 1
Posts: 3
Joined: Fri Nov 09, 2012 11:28 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by nthcode »

Was a gentoo ricer and ubuntu user a couple of years ago, then switched back to winows.
Just updated my win7 laptop to win8 and the experience is great imo.

Trying to multi-boot since I'm installing an new OS anyway since mint looks promising.
Obviously I need a shared partition among the two OS as always.

Remember how I was trying to do this since 10 years ago everytime I install a distro,
I can totally do it from CLI but was hoping for a GUI solution for such a common thing to do.
My first intution lead me to look for this feature in the Disk Utility, tough luck.

The group 46 is impossible to find out unless you're really familiar with Ubuntu so a google search is necessary.

IMO it's major usability problem and we shouldn't need a tutorial about this, but instead for customized mounting options only.
The problem is pretty easy to fix, and I'm sure heaps of developers encounter this when they install.
*Scraching my head
altair4
Level 20
Level 20
Posts: 10278
Joined: Tue Feb 03, 2009 10:27 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by altair4 »

This HowTo has become somewhat dated so there are a few things that don't work as smoothly as they did when it was originally posted and conventions and option lists have also changed. So for an NTFS partition instead of something like this:

/dev/sdxx /home/fred/Windows ntfs defaults,umask=007,gid=46 0 0

It's now become something like this:

UUID=200C11850C1156DE /home/fred/Windows ntfs defaults,umask=007,gid=46,windows_names 0 0

And that's the problem. All of these GUI's were written during that awkward stage of Linux evolution when things like Firestarter were written. Most of them were done without adult supervision, really didn't work very well, it's authors really didn't understand the meaning and use of the mounting options, and haven't been supported for years. So very few of these GUI's know what a UUID is, were written before ntfs allowed write access, and not one of them knows what the windows_names optiton does so it's best to just avoid them all.

Side Note:
nthcode wrote:The group 46 is impossible to find out unless you're really familiar with Ubuntu so a google search is necessary.
Up until a few releases ago Ubuntu / Mint automatically made new users members of the plugdev group ( group=46 ) so it wasn't an issue.

BTW, When you install Mint you are given the chance to have these non-system partitions mounted automatically at boot as part of the install process so you don't have to go in after the fact to mess about with fstab unless you install new disks or change partitions around or want specific mounting options applied.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
aelfinn
Level 3
Level 3
Posts: 193
Joined: Thu Dec 11, 2008 2:11 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by aelfinn »

altair4 wrote:When you install Mint you are given the chance to have these non-system partitions mounted automatically at boot as part of the install process
That sounds interesing—where would I find that option?
nthcode
Level 1
Level 1
Posts: 3
Joined: Fri Nov 09, 2012 11:28 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by nthcode »

altair4 wrote: ...
True that, I still remember when rw access was experimental, not long ago.
Went for Ubuntu 12.10 and I'm gonna stick to it since I actually like unity, wired! (customizability like the location of the dock would be appreciated tho..) But I do understand why people would prefer Cinnamon.

In their gnome-disk-utility (3.6.1-0ubuntu1) you get to disable auto mount options and click "mount at startup".
You get to enter the mount options in a textbox. Well the default mount options they give is not sane either anyway, "nosuid,nodev,nofail,noauto", you get smth like root:root rwxrwxwx. So what you gave me still helps, thanks! I guess they should fix it at gnome3, I'll see if contributing is possible.

I'm not sure about what Cinnamon is using now coz it's been a while since I jumped ship, but IIRC it's different?
Well being able to change it in installation is no excuse! :D And it wasn't obvious anway.
User avatar
MagicMint
Level 3
Level 3
Posts: 140
Joined: Fri May 31, 2013 1:29 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by MagicMint »

As an example of safe mounting options for the well-known DATA partition of Windows for the standard “linux” user of Linux Mint, take this for fstab:

Code: Select all

LABEL=DATA /mnt/DATA ntfs-3g defaults,uid=linux,gid=linux,dmask=022,fmask=133,windows_names 0 0
Of course, if you’ve chosen another name for yourself, you should replace the two occurrences of “linux” by your own user (and group) name :P.
biggocharley
Level 2
Level 2
Posts: 79
Joined: Fri Dec 10, 2010 5:54 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by biggocharley »

I am running Mint 16 Petra and I have a data partition on sdb3 that I would like to mount automatically on boot.

Following the instructions in Fred's original post on this thread, I added this line to /etc/fstab:
/dev/sdb3 /media/Data vfat umask=0000,uid=1000,gid=1000,auto,rw,users 0 0

I get the following message during the boot process:
"press S to skip mounting or M for manual reboot"

I pressed "S" but after booting the partition Data is successfully mounted in
/media

What's happening here? more imporatanly how do I get rid of this message and what did I do to cause it?
altair4
Level 20
Level 20
Posts: 10278
Joined: Tue Feb 03, 2009 10:27 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by altair4 »

/dev/sdb3 /media/Data vfat umask=0000,uid=1000,gid=1000,auto,rw,users 0 0
Fred hasn't posted in this forum for quite some time so let me give this a shot.

It's possible that the system is getting confused by /dev/sdb3. Since the original HowTo was written Linux has moved to using UUID numbers rather than /dev/sdxy to specify a partition so as to remove this type of confusion.

Run the following command:

Code: Select all

sudo blkid -c /dev/null
That will list all your partitions and their UUID numbers. Find the UUID number for your vfat partition and use it in fstab instead. Something like this:
UUID=C4DB-C1B0 /media/Data vfat umask=0000,uid=1000,gid=1000,auto,rw,users 0 0
If you have /dev/sdb3 currently mounted unmount it then run the following command to test for any errors in fstab and if there are none mount the partition:

Code: Select all

sudo mount -a
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
biggocharley
Level 2
Level 2
Posts: 79
Joined: Fri Dec 10, 2010 5:54 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by biggocharley »

I did as you suggested above and sudo mount -a revealed a syntax error in fstab ahich I corrected. The error message on boot is no longer there.
Thanks so much for your help and the quick response. I will try the command with sdb3 instead of the UUID again now that the syntax error is fixed and see what happens. I'll report back with the results.
biggocharley
Level 2
Level 2
Posts: 79
Joined: Fri Dec 10, 2010 5:54 pm

Re: Auto Mount Partitions on Boot (also Windows)[SOLVED]

Post by biggocharley »

Both of these lines I added to fstab achieved the desired rresults -- The partition mounted ok with no error message.
Thanks again for your help.

Code: Select all

UUID=EF4D-9143 /media/Data vfat umask=0000,uid=1000,gid=1000,auto,rw,users 0 0

/dev/sdb3 /media/Data vfat umask=0000,uid=1000,gid=1000,auto,rw,users 0 0
Last edited by biggocharley on Wed Dec 04, 2013 11:44 am, edited 1 time in total.
altair4
Level 20
Level 20
Posts: 10278
Joined: Tue Feb 03, 2009 10:27 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by altair4 »

I personally would recommend staying with the UUID. By design the probability of duplicate UUID's - outside of cloning your partition - is near zero which is why the installer sets your root partition with UUID's.

With multiple hard drives and multiple partitions on those hard drives the boot process will eventually get confused which is why we moved to UUID's in the first place.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
biggocharley
Level 2
Level 2
Posts: 79
Joined: Fri Dec 10, 2010 5:54 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by biggocharley »

good advice -- I will do so
User avatar
ronkz
Level 2
Level 2
Posts: 63
Joined: Thu Mar 21, 2013 9:35 am
Location: Arizona Rockies
Contact:

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by ronkz »

The initial post held the answers which worked for me to mount my ntfs partition sdab at startup. Wading thru the post was scary for me, but I mananaged it without messing up anything, and by golly it's working! Thank you - good job!
Ditching WinDoze tough but necessary
Fivefinger
Level 1
Level 1
Posts: 1
Joined: Sat Apr 26, 2014 7:43 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by Fivefinger »

Hi,
is there any way how to redo the auto mounting? I mistype the name of the dev and now while booting the system is searching for that device.

Thx.
altair4
Level 20
Level 20
Posts: 10278
Joined: Tue Feb 03, 2009 10:27 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by altair4 »

You need to open an editor with root privileges:

Code: Select all

gksu gedit /etc/fstab
Make your changes then unmount the partition if you mounted it manually then run this command to remount it:

Code: Select all

sudo mount -a
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
jrmwalsh
Level 1
Level 1
Posts: 3
Joined: Mon Mar 17, 2014 5:11 pm

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by jrmwalsh »

My great thanks to Fred for his original tutorial. I managed to get connected by following his very clear directions, with the appropriate modifications for my (wife's) computer, Finch.
Finch used to be an XP-only machine, but with the demise of XP support, I am migrating her to Linux Mint, which she enjoys.
Her Thunderbird email profile is still in a Windows partition, and I wanted her to be able to access all her mail in the same profile, no matter whether she boots to Windows or Linux.
My attempts at solving this issue, by pointing the Thunderbird "profiles.ini" file (in the Linux partition) to the Thunderbird profile in the Windows partition, worked up to a point, but I had to ask Linux to actually open the Windows partition each time she turned her computer on, otherwise Thunderbird could not find the Windows profile.
I did try Menu > Preferences > Disks > More Actions > Edit Mount Options > etc, etc., but it would NOT make the changes to the fstab file. I had to go in and change the fstab file manually.
I used Fred's tutorial and edited fstab successfully; and now Linux opens the Windows file system properly every time.

Thank you Fred.
Mike.

In this world there are just two types of people. There are those who divide the world into two types of people, and there are those who don't.
F3Spirit
Level 1
Level 1
Posts: 23
Joined: Fri Jan 08, 2016 5:05 am

Re: Auto Mount Partitions on Boot (also Windows partitions)

Post by F3Spirit »

Hi,
i am a total Noob.
I read this and other posts in this forum about this topic but i don't get my data HDD to auto mount.

I Have a dualboot system (Win8.1 and Mint 17.2 64bit). Both have there own SSD and i have a HDD to store all my Data.
I need to get this Data HDD auto-mounted in Mint 17.2

Is there still no UI-solution to this, do i get that right?
And if so how do i do this from Terminal exactly, because to me the lines of code i see about this topic, i don't understand. But i would like to understand the lines, if there is no UI way, to learn how to fix this.
Locked

Return to “Tutorials”