LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do I auto-mount a drive at boot (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-auto-mount-a-drive-at-boot-73103/)

warkrime 07-15-2003 10:18 PM

how do I auto-mount a drive at boot
 
I installed Linux then a couple days later added another harddrive. As things are currently I have to mount the drive after I boot and log in. How do I make the drive mount at boot like my cd-rom?

DrOzz 07-15-2003 10:31 PM

you have to add an entry into the /etc/fstab file.

warkrime 07-15-2003 11:16 PM

Okay.....

So what do I type?

DrOzz 07-15-2003 11:29 PM

i don't know because for 1 i have no idea what device you want to add, number 2 i dont' know what kind of permissions you want set, and number 3 i don't know where your mount point is and finally 4, i dont' know what kind of filesystem it is...
but other than all the things i dont know, you can just follow how other things are typed in that file:
for instance if you have a cdrom device you may see something like:
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
it may not be the same but it will be similiar to that
so by looking at it you see the first column contains the device the second column contains the mount point, the third column contains the filesystem type, and the fourth column contains the options, i am not explaining the last 2 numbers but just for a secondary you can leave these at 0 0 ....
thats all i can really tell ya cause as i said i have no information about the drive, so if you still can't follow these steps, then if you want you can post the answers to the questions i don't know, and either me or someone else can give you the entry you should make, or just post what you think the entry should be and someone can confirm it

warkrime 07-15-2003 11:52 PM

Ok, sorry.

here is my current fstab file:
Code:

/dev/hda6 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
none /mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,unhide,unmask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hda1 /mnt/windows ntfs iocharset=iso8859-1,ro,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/hdd1 /mnt/hd auto user,iocharset=iso8859-1,kudzu,codepage=850,noauto,umask=0,exec 0 0

Answer to 1: The device is hdd1

Answer to 2: I want anyone to be able to access even people on my network

Answer to 3: It would be fine if it was mounted as /mnt/hd

Answer to 4: It's fat32

Hope that helps you help me! :)

acid_kewpie 07-16-2003 06:36 AM

/dev/hdd1 /mnt/hd vfat default,umask=002 0 0

ceantuco 11-26-2008 12:06 PM

Thanks!
 
Quote:

Originally Posted by acid_kewpie (Post 377998)
/dev/hdd1 /mnt/hd vfat default,umask=002 0 0

Thank you very much! It worked for me too! :)

Merenguey 08-03-2013 04:56 AM

Just in case :
  • open a terminal and check what drive partition is used: sudo gedit /etc/mtab
  • In the mtab file, look for your drive, such as (for example) : /dev/sdbx/media/path-to-drive file-system others-informations
  • copy all the line of the desired drive and quit mtbab file
  • backup your fstab file (just in case) : sudo cp /etc/fstab /etc/fstab.backup
  • now configure the new /etc/fstab : sudo gedit /etc/fstab
  • paste your line at the bottom of the document. Save & quit
  • Reboot your computer and check if everything's alright.
  • If it doesn't work, just backup your fstab : sudo cp /etc/fstab.backup /etc/fstab


All times are GMT -5. The time now is 03:33 AM.