Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-22-2006, 04:04 PM   #1
LQ Newbie
Registered: Sep 2006
Posts: 10

Rep: Reputation: 0
using fstab to mount a new drive


I have managed to install and partition a new drive but I am getting an error message when I try to mount the drive on bootup using fstab.

The line I put into fstab looks like this:

/dev/sdb1 /thurstone ext2 rw,users,umask=022 0 0

I think the problem might be with the umask portion of this command. Someone from a previous post told me to put that in but I can't find much information about what that command does... I know this isn't much to go on but if you can help at all or need more information to solve the problem, please let me know!

Thank you very much in advance!
Old 09-22-2006, 04:21 PM   #2
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,241
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
why not simply

/dev/sdb1 /thurstone ext2 defaults 0 0

You stated you installed and partitioned the drive, did you create a file system on it yet ? I know your fstab entry says ext2, but I just wanted to verify you have already created the file system on the drive before you are attempting to mount it.

Set the umask (the bitmask of the permissions that are not
present). The default is the umask of the current process. The
value is given in octal.
so a umask of 022 would mount the drive with permissions of 755

owner: read, write and execute permissions,
group: read and execute permissions,
others: read and execute permissions.
Old 09-22-2006, 04:23 PM   #3
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
umask is sort of the opposite of chmod permissions. Basically a 777 permission (rwxrwxrwx) is the same as umask=000. So umask=022 should be the same as a 755 (rwxr-xr-x) permission.
Old 09-22-2006, 04:37 PM   #4
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
I think farslayer hit the nail on the head. Installing a drive and creating a partition is part of the job. Completing the job means creating a filesystem on the partition (read *format* the partition).

Use mke2fs to format the partition. See the manpage for more information.

It'll be something like: mke2fs /dev/sdb1, or, if you want ext3 (journaled ext2), use: mke2fs -j /dev/sdb1.
Old 09-22-2006, 05:02 PM   #5
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
you can create and mount the filesystem simply using these commands:

# create file system
mkfs -t ext2 /dev/sdb1

# mount device
mount /dev/sdb1 /thurstone

however using command line mount will not save it in the boot file /etc/fstab so a reboot will erase this mount. Once the filesystem has been created edit the file /etc/fstab using farslayer's command :
/dev/sdb1 /thurstone ext2 defaults 0 0


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Changing Fstab in ubuntu to mount vfat drive mikeymorgan Linux - Newbie 13 06-23-2005 08:50 AM
Ho do you use fstab-sync to mount a drive? ginda Linux - Newbie 3 03-15-2005 11:05 AM
What fstab mount setting do you use to get full access to a vfat drive? BarkingBonefish Linux - Newbie 4 03-12-2004 01:36 AM
mount network drive fstab/umask? J.Q. Monkey Linux - Newbie 3 02-24-2004 01:49 PM
fstab hard drive mount eastj1974 Linux - Newbie 2 07-05-2003 03:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 AM.

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