LinuxQuestions.org
Review your favorite Linux distribution.
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 04-21-2006, 12:30 PM   #1
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Rep: Reputation: 34
Question fat partition accessing error due to fstab


I have Red Hat Linux 9 and Windows XP installed on one computer.I have lots of mp3s on that drive and I want to access it.I know that having fat partition makes things better fro linux.

I tried mounting the partition but it said:
mount: can't find /dev/hda2 in /etc/fstab or /etc/mtab

I read the related posts but cant find a solution.The partition I need to access is hda2.

The other threads required me to post my fstab file so here it is:


LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

Thanks a lot for your help.

Last edited by gregorian; 10-07-2009 at 09:06 AM.
 
Old 04-21-2006, 12:38 PM   #2
onelung02
Member
 
Registered: Oct 2003
Location: utah
Distribution: Slackware 10.0, Gentoo 2006.0
Posts: 289

Rep: Reputation: 30
That error simply means no entry is made in your /etc/fstab for the partition.

First I would make sure that you have kernel support for the file system, then make the following entry in your /etc/fstab

Code:
/dev/hda2  /mnt/fat  vfat umask=0000   0 0
Now, you have to create the mount directory before mounting, which is done by:

Code:
mkdir /mnt/fat
Keep in mind you can make that dir anywhere you want and it can be anything you want, but it has to match with whatever mount point you have in your fstab.

The umask option that I have shown you is for all access to everyone on your system. If you would like different options, look into the umask option.

Now:
Code:
mount /dev/hda2
You should be set. Something worth reading on the subject is found right here:
http://gentoo-wiki.com/HOWTO_Mount_W..._FAT%2CNTFS%29

Have fun,
onelung02
 
Old 04-22-2006, 03:09 AM   #3
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Original Poster
Rep: Reputation: 34
I did exactly what you said but I get this error message:

mount: wrong fs type, bad option, bad superblock on /dev/hda2,
or too many mounted file systems
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)

Here is my fstab file:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda2 /mnt/windows vfat umask=0000 0 0

Thanks for the help anyway.
 
Old 04-22-2006, 05:03 PM   #4
pen8wen
LQ Newbie
 
Registered: Apr 2006
Posts: 17

Rep: Reputation: 0
use
fdisk /dev/hda to see the partition info
type p at the fdisk prompt

hda2 should show up as a dos-ish partition type, eg. FAT32

use q to quit fdisk.

it may be that you will possibly need to add ntfs support if you want to access xp. as of the last time i looked at it, ntfs is read only.
 
Old 04-22-2006, 06:41 PM   #5
onelung02
Member
 
Registered: Oct 2003
Location: utah
Distribution: Slackware 10.0, Gentoo 2006.0
Posts: 289

Rep: Reputation: 30
Maybe switching the VFAT part in your /etc/fstab to auto, try that.
 
Old 04-23-2006, 06:06 AM   #6
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Original Poster
Rep: Reputation: 34
Yes I tried putting auto but it is no good.
 
Old 04-23-2006, 06:51 AM   #7
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Post the output of -->
fdisk -l /dev/hda
 
Old 04-23-2006, 08:07 AM   #8
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Original Poster
Rep: Reputation: 34
This is the output:

Cannot open /dev/hda
 
Old 04-23-2006, 09:02 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,322

Rep: Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905
You must be root to use the fdisk command.
From the error messages hda2 is an extended partition which can not be mounted.
 
Old 04-23-2006, 10:50 AM   #10
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Original Poster
Rep: Reputation: 34
Here is the output of fdisk -l /dev/hda

Disk /dev/hda: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1218 9783553+ 7 HPFS/NTFS
/dev/hda2 1219 4870 29334690 f Win95 Ext'd (LBA)
/dev/hda5 1219 2436 9783553+ b Win95 FAT32
/dev/hda6 2437 3654 9783553+ 7 HPFS/NTFS
/dev/hda7 3655 4870 9767488+ 7 HPFS/NTFS

P.S.I have Windows XP and not 95 and where is hda3 and hda4?I have my Linux Installed on hdb and what is LBA

I have two hardrives, one containing Windows and the other Linux.The partition I want to access is in Windows and is D drive and I formatted it with Fat for linux compatibility.I assumed it is hda2 since C: drive is hda1.

But after seeing the info above,I have my doubts.

Last edited by gregorian; 04-23-2006 at 10:54 AM.
 
Old 04-23-2006, 11:39 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,322

Rep: Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905Reputation: 1905
Partitons 101:
Your d: drive is hda5.

Partitions 1-4 are called primary partitions and when hard drives first were introduced to the PC world this was the max amount you could have.

To overcome this limitation the extended / logical partitions were developed so now you can divide the drive into 64 partitions. A primary partition is designated as an extended partition. Then logical partitions are created within the extended partition. logical partitions have IDs >=5.

Partitions 3 & 4 in your case are not used.

Last edited by michaelk; 04-23-2006 at 11:41 AM.
 
Old 04-23-2006, 11:51 AM   #12
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Original Poster
Rep: Reputation: 34
Thumbs up

Thanks a lot guys.My problem is now fixed.I am able to access all the partitions.Thanks for your time.
 
  


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
accessing fat partition in linux Mickaletto Linux - Newbie 5 11-26-2005 06:12 AM
Accessing a FAT partition? or NTFS? cucolin@ Linux - Hardware 5 11-23-2004 07:54 AM
/etc/fstab MOUNTING FAT PARTITION cb951303 Slackware 7 08-30-2004 09:07 PM
FreeBSD+fstab+fat partition krajzega *BSD 4 08-09-2004 04:05 PM
Accessing FAT partition from fedora linux_ub Linux - General 4 07-09-2004 04:38 PM

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

All times are GMT -5. The time now is 09:01 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