Click to See Complete Forum and Search --> : Startup config


RedEyes
06-29-2001, 11:56 AM
When I boot my RedHat box, I'd like it to automatically mount certain drives. I currently have the 'mount' commands in my bashrc file (I've also tried them in /etc/profile)

The only problem is, those files (as you all know) execute every time someone logs in, and once the drives are mounted, when the next user logs in, it returns an "drive already mounted" error.

This isn't really a problem, per se, but it is an annoyance. What file to I have to edit to make the computer automatically mount the drives at startup, but not every time someone logs in?

Any help would be greatly appreciated -- Thanks in advance !

demetrius
06-29-2001, 11:59 AM
You should put the drives in /etc/fstab if you want them mounted at boot.

EyesWideOpen
06-29-2001, 11:59 AM
etc/fstab

ille_pugil42
06-29-2001, 12:20 PM
I'm not quite sure on Redhat specific.. look into /etc/rc.d - should be a file or dir that runs on startup (i've got slackware and the specific file is /etc/rc.d/rc.S) Put it in there and it will run once and only once on startup

RedEyes
06-29-2001, 12:36 PM
See... That's why I love this board so much! In the past few days I've asked an awful lot of questions, and have gotten answers within minutes...

I really appreciate it -- Thanks a lot !

ille_pugil42
06-29-2001, 02:13 PM
not a prob. When I get in front of a red hat machine, I can let you know the specifics.

demetrius
06-29-2001, 04:28 PM
The file you're thinking of is /etc/rc.d/rc.local, but /etc/fstab is still the best place to mount drives on bootup.

ille_pugil42
07-03-2001, 08:12 AM
yep, just installed 7.1 on my box to play around, and /etc/rc.d/rc.local is the "autoexec.bat" of linux. /etc/fstab is just a "list" of mountable partitions/drives. You'll still need to tell it to mount - that'd be in rc.local.