PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 24, 2012, 06:36:44 PM


Login with username, password and session length


Pages: [1] 2   Go Down
  Print  
Author Topic: Stop Drives AutoMount at Startup - How?  (Read 767 times)
Proletariat
Full Member
***
Offline Offline

Posts: 51



WWW
« on: January 11, 2012, 06:29:37 PM »

I've got two drives that I want to stop being auto mounted at start up. Both are for windows. The system reserved & the OS.

So how do I go about it? If I right click on the drive/hide will that stop it showing up at boot? That's basically what I want.
Logged

KDE4 FullMonty 2011
AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11990


Registered Linux User #490933


WWW
« Reply #1 on: January 11, 2012, 06:43:41 PM »

They are being auto-mounted by the /etc/fstab file.

Edit this file as root and # the lines responsible for the two drives.

Upon reboot they should not be auto-mounted anymore.

Regards.
Logged

Archie
Global Moderator
Hero Member
*****
Offline Offline

Posts: 6857


I will never forget you, uhhh...


« Reply #2 on: January 11, 2012, 06:49:06 PM »

Since you did not specify your DE ...

Configure Your Desktop (SystemSettings) > Hardware > Removable Devices.

HTH
Logged

Old-Polack
Administrator
Hero Member
*****
Offline Offline

Posts: 9694


----IOFLU----


« Reply #3 on: January 11, 2012, 07:03:16 PM »

I've got two drives that I want to stop being auto mounted at start up. Both are for windows. The system reserved & the OS.

So how do I go about it? If I right click on the drive/hide will that stop it showing up at boot? That's basically what I want.

Edit /etc/fstab to add those partitions you wish to not be auto mounted. Create, and supply in /etc/fstab, the mount point directories where you want the partitions mounted when you do want them mounted, set the format as ntfs-3g, and add the mount parameters rw,user,noauto,exec,umask=000. You will need one line per partition, and different mount point directories for each. Something like /mnt/win-c, /mnt/win-d, etc, will do fine.

With these settings, you, as a normal user, will be able to mount and unmount those partitions at will, but they will not be auto mounted by root when you boot your machine.
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
Proletariat
Full Member
***
Offline Offline

Posts: 51



WWW
« Reply #4 on: January 11, 2012, 07:04:59 PM »

Since you did not specify your DE ...

Configure Your Desktop (SystemSettings) > Hardware > Removable Devices.

HTH
Damn! I keep forgetting that. KDE.  Roll Eyes

I'll check all those out.
Logged

KDE4 FullMonty 2011
Proletariat
Full Member
***
Offline Offline

Posts: 51



WWW
« Reply #5 on: January 11, 2012, 07:42:53 PM »

I tried the tip from Archie. After rebooting a couple of times & going into safe mode I could not figure it out.

Here's the fstab file.
Code:
# Entry for /dev/sdb1 :
UUID=2fc71f32-bab2-4a7d-8f7a-64aca19687a8 / ext4 acl,relatime 1 1
# Entry for /dev/sdb5 :
UUID=653e47fe-e2be-4279-b851-7c8c111c3ac4 /home ext4 acl,relatime 1 2
none /proc proc defaults 0 0
# Entry for /dev/sdb6 :
UUID=9007db2f-3bed-4d8f-ae3e-def9e0dda6ce swap swap defaults 0 0
none /dev/pts devpts defaults 0 0

I can't get the hang of it as yet.

The drive I want to stop is sda.
Logged

KDE4 FullMonty 2011
AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11990


Registered Linux User #490933


WWW
« Reply #6 on: January 11, 2012, 07:48:27 PM »

And there are no entries for it in /etc/fstab? Weird...

Tell us - after a reboot what is the output of the

Code:
su -c "mount"

command followed by the root password? Maybe the drives are not automounted and just shown as entries in the "Places" in Dolphin ready to be mounted?

Regards.

Logged

Proletariat
Full Member
***
Offline Offline

Posts: 51



WWW
« Reply #7 on: January 11, 2012, 08:00:43 PM »

OK. Get this:

Code:
/dev/sdb1 on / type ext4 (rw,relatime,acl)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw)
/dev/sdb5 on /home type ext4 (rw,relatime,acl)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdc1 on /media/Storage type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdd1 on /media/Libraries type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda1 on /media/System Reserved type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda2 on /media/Corsair SSD type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
Logged

KDE4 FullMonty 2011
Old-Polack
Administrator
Hero Member
*****
Offline Offline

Posts: 9694


----IOFLU----


« Reply #8 on: January 11, 2012, 08:03:55 PM »

I tried the tip from Archie. After rebooting a couple of times & going into safe mode I could not figure it out.

Here's the fstab file.
Code:
# Entry for /dev/sdb1 :
UUID=2fc71f32-bab2-4a7d-8f7a-64aca19687a8 / ext4 acl,relatime 1 1
# Entry for /dev/sdb5 :
UUID=653e47fe-e2be-4279-b851-7c8c111c3ac4 /home ext4 acl,relatime 1 2
none /proc proc defaults 0 0
# Entry for /dev/sdb6 :
UUID=9007db2f-3bed-4d8f-ae3e-def9e0dda6ce swap swap defaults 0 0
none /dev/pts devpts defaults 0 0

I can't get the hang of it as yet.

The drive I want to stop is sda.

Drives don't mount. Filesystems in partitions mount. Even if you only have one partition covering an entire drive, in this case /dev/sda, what you'd mount is /dev/sda1, not /dev/sda.
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11990


Registered Linux User #490933


WWW
« Reply #9 on: January 11, 2012, 08:12:03 PM »

So the partitions /dev/sdax are being mounted even tho there is nothing in the /etc/fstab...

Old-Polack what do You make of this?

Regards.
Logged

Proletariat
Full Member
***
Offline Offline

Posts: 51



WWW
« Reply #10 on: January 11, 2012, 08:19:14 PM »

If i add lines to the fstab file & it's not right will I still be able to boot & change it back?
Logged

KDE4 FullMonty 2011
AS
Global Moderator
Hero Member
*****
Offline Offline

Posts: 4106

Have a nice ... night!


« Reply #11 on: January 11, 2012, 08:43:35 PM »

So the partitions /dev/sdax are being mounted even tho there is nothing in the /etc/fstab...

Old-Polack what do You make of this?

Regards.

it could be possible that the partitions get automatically mounted from KDE, look in:
Configure your desktop -> Hardware -> Removable Devices  and check the flag "Enable automatic mounting of removable media",
or in Device Notifier -> Settings -> Automounting, which is the same config tool as above.

AS
Logged
Old-Polack
Administrator
Hero Member
*****
Offline Offline

Posts: 9694


----IOFLU----


« Reply #12 on: January 11, 2012, 08:44:07 PM »

So the partitions /dev/sdax are being mounted even tho there is nothing in the /etc/fstab...

Old-Polack what do You make of this?

Regards.

It's because it isn't in /etc/fstab that it's being auto-mounted by HAL or udev. Neither will touch anything that's listed in /etc/fstab. Re-read what I wrote above, about mount parameters, especially the user,noauto part.
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
Proletariat
Full Member
***
Offline Offline

Posts: 51



WWW
« Reply #13 on: January 11, 2012, 08:48:05 PM »

I made the changes but now I can't save the file. I tried adding permissions but no go. What's next?
Logged

KDE4 FullMonty 2011
Old-Polack
Administrator
Hero Member
*****
Offline Offline

Posts: 9694


----IOFLU----


« Reply #14 on: January 11, 2012, 08:49:48 PM »

I made the changes but now I can't save the file. I tried adding permissions but no go. What's next?

Made what changes?
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM