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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-16-2007, 03:50 AM
|
#1
|
Member
Registered: Jan 2006
Location: SantaBarbara
Distribution: Slackware 12.1
Posts: 196
Rep:
|
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
|
|
|
10-16-2007, 04:29 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
10-16-2007, 04:44 AM
|
#3
|
Member
Registered: Jan 2006
Location: SantaBarbara
Distribution: Slackware 12.1
Posts: 196
Original Poster
Rep:
|
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.
|
|
|
10-16-2007, 05:21 AM
|
#4
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
10-16-2007, 05:30 AM
|
#5
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep: 
|
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.
|
|
|
10-17-2007, 03:11 AM
|
#6
|
Member
Registered: Jan 2006
Location: SantaBarbara
Distribution: Slackware 12.1
Posts: 196
Original Poster
Rep:
|
Thank you
mkdosfs -F32 /dev/hda3 does the trick
Yoohooo, learn something new everyday
|
|
|
All times are GMT -5. The time now is 02:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|