Life of student

All about Programming , C++ ,Fedora

  • Blog Stats

    • 16,913 hits
  • Categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email. I too can't see who had subscribed my blog :(

    Join 11 other followers

  • Advertisements

Auto mount drives in linux

Posted by pankaj4u4m on November 28, 2009

I was just searching for how to enable the mounting the drives at start up because I didn’t find authorization menu in Fedora 12.

I found one solution and it is working for my system

open terminal and do following commands:

[codegambler@localhost /]$ su

[root@localhost /]#vi /etc/selinux/config'

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.

change the hi-lighted line as given;

[root@localhost /]# vi /etc/rc.local
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

now add following lines:
su -c 'mount -t ntfs-3g /dev/sda2 /media/windows -O uid=500,rw,fmask=0000,dmask=0000'
su -c 'mount -t ntfs-3g /dev/sda3 /media/srudy_fun -O uid=500,rw,fmask=0000,dmask=0000'

it is for my system

Now whenever you will restart your system you no need to mount again:
Happy fedora :)


One Response to “Auto mount drives in linux”

  1. Can’t you add it to /etc/fstab?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: