How do you make a drive mount automatically at boot up?

I have a Fedora Core 4 machine, I've installed a harddrive /dev/hdd and mount it with the following command "mount /dev/hdd /opt/lampp/htdocs" , but I have to do that at every boot up. How do I make it so that a drive will automatically mount at startup?

Thanks
LVL 1
jaycangelAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
pjedmondConnect With a Mentor Commented:
Add the following line to your /etc/fstab:

/dev/hdd1?            /opt/lampp/htdocs                   ext3    defaults        1 2

I suspect that you are /hddx? rather than just hdd? I'm also presuming ext3?

Alternatively, add your command line to the /etc/rc.local file. This will make the system run your command after all the other daemon processes are started.

(   (()
(`-' _\
 ''  ''


0
 
ravenplCommented:
insert the mount entry into /etc/fstab
existing lines should tell everything about the syntax
0
 
jaycangelAuthor Commented:
Hi there,

The command I used to mount was "mount /dev/hdd /opt/lampp/htdocs" and it worked. Was that the wrong command?


Which is better to use fstab or rc.local method? Are there any benefits?
0
 
ravenplConnect With a Mentor Commented:
use /etc/fstab - it was designed for.
if the command works, then it's valid command.
0
 
ravenplCommented:
Since You know howto use mount, I assumed that pointing You to /etc/fstab is enought.
Also - why only B?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.