LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-15-2004, 12:46 AM   #1
Dswissmiss
Member
 
Registered: Mar 2004
Location: New York
Distribution: Gentoo, xubuntu
Posts: 91

Rep: Reputation: 15
fstab help (changed title)


Hi,
I'm trying to figure out how to mount a windows partition and use the files on it in linux (music, pics, docs).

I read about having to add some lines to /etc/fstab, but I dont have it so what would be the easiest way to correct this?
In case this helps, I'm running Libranet and during the installation it configured grub for me, so I could boot into XP, and now my c drive is mounted on / but my files are all on a seperate NTFS drive (I'm just telling you this cause I can access the files on my c drive, so there has to be an easy way to somehow add my other drive /.

Thank you
Dswissmiss

Last edited by Dswissmiss; 04-15-2004 at 02:22 AM.
 
Old 04-15-2004, 01:21 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I don't think a system will start without /etc/fstab.

Are you sure that you just don't have permission to access it?
 
Old 04-15-2004, 01:39 AM   #3
Dswissmiss
Member
 
Registered: Mar 2004
Location: New York
Distribution: Gentoo, xubuntu
Posts: 91

Original Poster
Rep: Reputation: 15
oh whoops... i was only looking at the folder icons. sorry!

ok, my fstab looks like this (added the hdb5, wondering if its right)

# /etc/fstab: static file system information.
#
# <device> <mount point> <type> <options> <dump> <pass>
/dev/hdb4 / reiserfs defaults 0 1
/dev/hdb1 /windows ntfs defaults,ro,gid=windows,umask=002 0 0
/dev/hdb3 none swap sw 0 0
/dev/hdb5 /files ntfs defaults,auto,unmask=002,exec,ro 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat,auto defaults,user,noauto 0 0
usbfs /proc/bus/usb usbfs rw,devmode=0660,devgid=432 0 0
/dev/scd0 /cdrom udf,iso9660 defaults,user,noauto,ro 0 0
/dev/scd1 /cdrom1 udf,iso9660 defaults,user,noauto,ro 0 0

But when I try to mount /files, I get this:
mount: wrong fs type, bad option, bad superblock on /dev/hdb5,
or too many mounted file systems

I also created a folder in / called files...is this where I went wrong?


Thank you
Dswissmiss


Last edited by Dswissmiss; 04-15-2004 at 02:14 AM.
 
Old 04-15-2004, 03:20 AM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
"fdisk -l" ,no quotes and the option is a lowercase "L" and not a 1, should give you a listing of your hard drive's partitions and their linux device labels (/dev/hda#). you should see a listing similar to:

Code:
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1       446   3582463+   b  Win95 FAT32
/dev/hda2           447      7296  55022625    f  Win95 Ext'd (LBA)
/dev/hda5           447      1473   8249346    b  Win95 FAT32
/dev/hda6          1474      1859   3100513+   b  Win95 FAT32
/dev/hda7          1860      2500   5148801    b  Win95 FAT32
/dev/hda8          2501      5243  22033116    b  Win95 FAT32
/dev/hda9          5244      5887   5172898+   b  Win95 FAT32
/dev/hda10         5888      6326   3526236    b  Win95 FAT32
/dev/hda11         6327      7165   6739236   83  Linux
/dev/hda12         7166      7296   1052226   82  Linux swap
i guess look for something like NTFS in the system column.

also for your /dev/hdb5, if this label is correct, then make sure the directory, /file, already exists before mounting the partition. mounting of this should be automatic on your next boot up into linux. if you want to mount it right now, then use:

mount -a /dev/hdb5

on a side note, you should probably have all your mount point directories inside the /mnt directory as opposed to /file.

Last edited by megaspaz; 04-15-2004 at 03:23 AM.
 
Old 04-15-2004, 10:12 AM   #5
Dswissmiss
Member
 
Registered: Mar 2004
Location: New York
Distribution: Gentoo, xubuntu
Posts: 91

Original Poster
Rep: Reputation: 15
Checked fdisk -l and everything seems to be correct...but I still get the error.
Was I right to just right click in nautilus and create a new folder for /files, or should I have done this in a nother way? I'm also not sure my /dev/hdb5 line is correct.

thanx
 
Old 04-15-2004, 12:22 PM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
OK, here's the deal as far as mount points... unless the mount point is in your /home/username directory, only root is going to have access to it by default.... and if you were not root when you created it, /files isn't there in any case, as a regular user does not have the right to make a folder in / under any circumstances.

The default owner of any new folder created anywhere but in one's own /home/username directory is root, and the default group is the root group, which a regular user should not be a member of. There's a fair likelihood that such a folder will by default include read-only access for "others" (which means you if you aren't root or a member of the root group, which you are not), but that is not necessarily going to occur if the distro has tweaked the default umask for security purposes (so that others have no rights, and special user permissions are managed by group membership).

So you might seriously want to consider moving that mount point to your /home/username directory for 3 reasons:

1. You will own the mount point, and will have more control over it, both in terms of being able to change the group ownership and permissions of the mount point, and in terms of being able to set up /etc/fstab to retain your preferred ownership and permission model (read man fstab for proper syntax, and man mount for information on the uid=. gid= and umask= options for the ntfs and vfat filesystems, which are useable in fstab).

2. All file managers open to /home/username by default, and it just means a lot less browsing if the mount point is there already. I suppose that can be considered a personal preference, but I find having mount points that I use a lot in /mnt really annoying.

3. If you need to share any of the folders on the mounted partition back to the network, they have to be in your /home/username directory for you to do so (as files in that location are the only ones you have sufficient rights to share with others).

As for your error... well, it's one of two things. Either it's literal, and there's something wrong with your line in /etc/fstab. Looking at the line, it's not the cleanest I've ever seen, as many of the options that are specified when you choose "defaults" (which specify "rw, suid, dev, exec, auto, nouser, and async") are later cancelled out or replicated when you specify "exec", "auto" and "ro", but otherwise it looks OK.

Or it's the situation where there's some reason that the drive can't be mounted, but there is no specific error message, so you get the general one.

If I was you, I would suggest that you:[list=1][*] Open a terminal, su to root, and type 'cfdisk /dev/hdb' (without the quotes). I find that cfdisk gives more useful information when you're trying to identify which partition you want to mount, because it shows the size in MB, which also helps you to know what you're looking for. Write down the designation of all your partitions!!! You will need this information more often than you might think. When you have checked everything out, just arrow over to the Quit button and cfdisk will close without doing anything to your drive setup (and you can then retype cfdisk /dev/hd* to check another drive and write down its designations, or go do something else)
[*] Go to your ~/ folder (that's your /home/username folder) and create a mount point called whatever (meaning "whatever you want to call it"), and then right-click the new folder, choose, "properties and check and uncheck the relevant checkboxes to give the group full permissions and "others" no permissions.
[*] Use the following line in /etc/fstab:
/dev/hdb5 /home/username/whatever ntfs auto,user,ro,exec,uid=your_username,gid=your_default_groupname,umask=007 0 0[/list=1]

I would also ask... what kernel are you using? Does Libranet's default kernel even include NTFS read support? Many distros that were released around that time did not turn any NTFS support on when tweaking their kernels, even though read-only support was available in the vanilla kernel (I think). If not, it would mean that the "bad fs type" was in fact really the correct error, and the message was therefore literal-- and that you'll need to crank up Adminmenu to recompile your kernel to allow the partition to be recognized. You'd probably need to crank up Adminnmenu to check out your kernel options in any case, unless there's something about this issue on the Libranet site, or in their FAQ.

Hope this helps somewhat.
 
Old 04-15-2004, 04:58 PM   #7
Dswissmiss
Member
 
Registered: Mar 2004
Location: New York
Distribution: Gentoo, xubuntu
Posts: 91

Original Poster
Rep: Reputation: 15
oh man! it worked

thank you for taking the time to explain everything in such detail..it's really appreciated!


dswissmiss
 
Old 04-15-2004, 05:55 PM   #8
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Glad to hear it . And you're very welcome... how can anybody learn if nobody explains anything? One last tip... man pages are really great; so is the --help switch. Don't forget to check them out when you don't understand something at first (or second) glance.

Have fun!
 
  


Reply


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
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 07:15 AM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 06:54 AM
What is fstab? sceadu Linux - Newbie 2 11-02-2004 08:25 PM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 06:55 PM
Help with /etc/fstab wawosz Linux - General 3 04-24-2003 03:12 PM


All times are GMT -5. The time now is 04:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration