LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-15-2003, 10:18 PM   #1
warkrime
Member
 
Registered: Jul 2003
Location: Sammamish, WA, USA
Distribution: Gentoo
Posts: 42

Rep: Reputation: 15
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?
 
Old 07-15-2003, 10:31 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
you have to add an entry into the /etc/fstab file.
 
Old 07-15-2003, 11:16 PM   #3
warkrime
Member
 
Registered: Jul 2003
Location: Sammamish, WA, USA
Distribution: Gentoo
Posts: 42

Original Poster
Rep: Reputation: 15
Okay.....

So what do I type?
 
Old 07-15-2003, 11:29 PM   #4
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
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
 
Old 07-15-2003, 11:52 PM   #5
warkrime
Member
 
Registered: Jul 2003
Location: Sammamish, WA, USA
Distribution: Gentoo
Posts: 42

Original Poster
Rep: Reputation: 15
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!
 
Old 07-16-2003, 06:36 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
/dev/hdd1 /mnt/hd vfat default,umask=002 0 0
 
Old 11-26-2008, 12:06 PM   #7
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Rep: Reputation: 88
Smile Thanks!

Quote:
Originally Posted by acid_kewpie View Post
/dev/hdd1 /mnt/hd vfat default,umask=002 0 0
Thank you very much! It worked for me too!
 
Old 08-03-2013, 04:56 AM   #8
Merenguey
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
auto mount a network drive at boot Dr Gutiemouth Linux - Newbie 14 02-27-2005 01:32 PM
cdrom and floppy drive auto mount problem shams Fedora 1 02-27-2005 07:43 AM
Auto Mount a Network Drive thebutler4 Linux - Newbie 3 06-23-2004 09:56 PM
Auto-mount a network drive agarnier Linux - Networking 4 10-29-2003 07:09 AM
auto mount of novell drive saavik Linux - Networking 7 08-07-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration