LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-16-2007, 03:50 AM   #1
lilili
Member
 
Registered: Jan 2006
Location: SantaBarbara
Distribution: Slackware 12.1
Posts: 196

Rep: Reputation: 30
mounting w95 fat32?


Hi everybody
When I do fdisk /dev/hda, I get this
Device Boot Start End Blocks Id System
/dev/hda1 1 2048 16450528+ 82 Linux swap
/dev/hda2 * 2049 7029 40009882+ 83 Linux
/dev/hda3 7030 19457 99827910 b W95 FAT32

but when I try mount -t vfat /dev/hda3 /mnt
It complains
mount: wrong fs type, bad option, bad superblock on /dev/hda3,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

doing dmesg|tail , I get
NTFS-fs error (device hda3): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device hda3): ntfs_fill_super(): Not an NTFS volume.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev hda3.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev hda3.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev hda3.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev hda3.

Can anybody show me how to mount /dev/hda3?

Thank you
 
Old 10-16-2007, 04:29 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
First of all, do you know how the filesystem was created? Is it actually fat32?
You can check with "sudo file -s /dev/hda3". It is possible the the byte that identifies it is wrong for one reason or another. The error displayed is pretty generic, but checking if the filesystem needs repair, with fsck.vfat, might be worthwhile. If you just repartitioned your system, you will also want to reboot. However this doesn't seem to be the situation here.

For the fat32 filesystem, you also want to use the uid, fmask and dmask options. The first will make you the owner of the mounted filesystem, and the latter two will determine the permissions. These won't help you now until you can mount it successfully.
 
Old 10-16-2007, 04:44 AM   #3
lilili
Member
 
Registered: Jan 2006
Location: SantaBarbara
Distribution: Slackware 12.1
Posts: 196

Original Poster
Rep: Reputation: 30
this is what I get when doing file -s /dev/hda3
/dev/hda3: data

This is what I get doing fsck /dev/hda3.
fsck /dev/hda3
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
/sbin/e2fsck: Bad magic number in super-block while trying to open /dev/hda3

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

This is what I get using dosfsck /dev/hda3
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Logical sector size is zero.


This is how my hda looks like
/dev/hda1 is swap
/dev/hda2 is my linux
/dev/hda3 is empty

Since I can not mount hda3, I am thinking can I just do fdisk /dev/hda
and do delete partition hda3, then create it again with linux (type 83) without putting my /dev/hda2 in danger?

Thank you

Last edited by lilili; 10-16-2007 at 04:55 AM.
 
Old 10-16-2007, 05:21 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Quote:
this is what I get when doing file -s /dev/hda3
/dev/hda3: data

This is what I get doing fsck /dev/hda3.
fsck /dev/hda3
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
/sbin/e2fsck: Bad magic number in super-block while trying to open /dev/hda3
Did you run "file -s /dev/hda3" as root? A regular user doesn't have read permission on a device. Was a filesystem created on this partition? It may have been partitioned but not formatted.

My suggestion was to use "fsck.vfat" (or the equivalent "fsck -t vfat") to check the partition. You used the option for an ext3 partition.
However, it looks like that is what the dosfsck program does.
 
Old 10-16-2007, 05:30 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
One can only mount a partition after it has been formatted.

In mounting a partition, which is a block device, the kernel has to read its filing system. No format=no filing system inside.

The partition id of b is just a byte in the 16-byte partition table indicating the partition has been created for a fat32 partition.

The hda3 will immediately mountable after this command has been issued in root console
Code:
mkdosfs -F32 /dev/hda3
It is my suspicion that the partition is unformatted as Post #3 confirms it is empty.

Last edited by saikee; 10-17-2007 at 03:35 AM.
 
Old 10-17-2007, 03:11 AM   #6
lilili
Member
 
Registered: Jan 2006
Location: SantaBarbara
Distribution: Slackware 12.1
Posts: 196

Original Poster
Rep: Reputation: 30
Thank you
mkdosfs -F32 /dev/hda3 does the trick

Yoohooo, learn something new everyday
 
  


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
mounting W95 Ext'd (LBA) in FC5 sureshkellemane Linux - Newbie 5 12-11-2006 08:43 PM
mounting fat32 gachejad Fedora 2 09-30-2005 11:33 AM
Can't mount W95 FAT32 (LSA) partition on USB HD ta0kira Slackware 4 07-09-2005 09:22 AM
Change "Hidden W95 FAT32 (LBA)" to ""W95 FAT32 (LBA)" TroelsSmit Linux - Newbie 6 03-27-2004 08:01 PM
mounting W95 FAT32 LBA in Slack 9.1 meisjohn Linux - Newbie 5 12-11-2003 10:15 AM


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