View Full Version : Unable to mount FAT32 partition in FC5; WinXP reads it fine
commonplace
2006-05-26, 08:48 AM CDT
I have a FAT32 partition (/dev/hda1) which I can read/write to in Windows XP just fine, but when I try to mount it in FC5, I get the following error:
mount: /dev/hda1 is not a valid block device
I verified with fdisk -l that the drive is where I think it is, and it shows:
/dev/hda1 1 24321 195358401 c W95 FAT32 (LBA)
I've created /mnt/fat32 and tried to mount using mount -t vfat /dev/hda /mnt/fat32, and that's when I receive the 'not a valid block device' error.
What am I doing wrong? I'm fairly new to Linux, so dumb it down for me if you would. Thanks in advance.
linmix
2006-05-26, 11:47 AM CDT
it may be just a typo.
You mentioned you mount with:
mount -t vfat /dev/hda /mnt/fat32
that should be:
mount -t vfat /dev/hda1 /mnt/fat32
commonplace
2006-05-26, 11:51 AM CDT
Sorry, I mistyped it on here. I am indeed trying to mount /dev/hda1 and it doesn't work.
jbannon
2006-05-26, 01:23 PM CDT
What version of the kernel are you using? The earlier ones had a problem here in that they wouldn't recognise vfat32 disks (at least it wouldn't recognise mine).
Seve
2006-05-26, 03:07 PM CDT
Sorry, I mistyped it on here. I am indeed trying to mount /dev/hda1 and it doesn't work.
Hello:
What is your output from # fdisk -l ?
Seve
commonplace
2006-05-26, 04:40 PM CDT
What version of the kernel are you using? The earlier ones had a problem here in that they wouldn't recognise vfat32 disks (at least it wouldn't recognise mine).
2.6.16-1.2111
jbannon
2006-05-26, 04:44 PM CDT
2111 should be OK as it mounted mine fine (I'm running the current one). Repaet of the above question: what does fdisk -l tell you?
commonplace
2006-05-26, 04:45 PM CDT
Hello:
What is your output from # fdisk -l ?
Seve
HDA is the drive in question, with four partitions (in my efforts to get this working, I repartitioned the drive, hoping it might help -- it didn't). The first three, HDA1, HDA2, and HDA3, are 32GB FAT32 partitions (initially I had a single, ~186GB FAT32 partition), and the fourth is NTFS. I'm not concerned about accessing the NTFS right now... in fact, I've had better luck mounting NTFS, though it was read-only. :-) Here's the output from fdisk -l:
Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 4177 33551721 c W95 FAT32 (LBA)
/dev/hda2 4178 8354 33551752+ c W95 FAT32 (LBA)
/dev/hda3 8355 12531 33551752+ c W95 FAT32 (LBA)
/dev/hda4 12532 24321 94703175 7 HPFS/NTFS
Disk /dev/hdb: 27.2 GB, 27226644480 bytes
255 heads, 63 sectors/track, 3310 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 3310 26483152+ 8e Linux LVM
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 24320 195350368+ 7 HPFS/NTFS
Disk /dev/sdb: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 36483 293049666 7 HPFS/NTFS
jbannon
2006-05-26, 05:35 PM CDT
How did you create the partitions? Did you use mkfs -t vfat?
commonplace
2006-05-26, 05:43 PM CDT
How did you create the partitions? Did you use mkfs -t vfat?
I created them in WinXP. I can delete one and try remaking it using mkfs, though, although it seems like I might have tried that at one point. I'll give it a try once I figure it out, and let you know. Thanks again for your help.
Seve
2006-05-26, 05:54 PM CDT
Hello:
Try this in your fstab :
/dev/hda2 /mnt/XXXX vfat users,defaults,umask=000 0 0
/dev/hda3 /mnt/YYYY vfat users,defaults,umask=000 0 0
As long as you have directories created in FC5 as /mnt/XXXX and /mnt/YYYY
you should be good to go based on what I see.
Seve
commonplace
2006-05-26, 06:03 PM CDT
Hello:
Try this in your fstab :
/dev/hda2 /mnt/XXXX vfat users,defaults,umask=000 0 0
/dev/hda3 /mnt/YYYY vfat users,defaults,umask=000 0 0
As long as you have directories created in FC5 as /mnt/XXXX and /mnt/YYYY
you should be good to go based on what I see.
Seve
I tried that, and when FC5 boots up, I see it show a line that says (I think) 'Mounting other filesystems' and it shows /dev/hda2 and /dev/hda3 and next to each one it says 'not a valid block device'. Neither are mounted, and neither are mountable by hand once FC5 boots.
commonplace
2006-05-26, 06:05 PM CDT
How did you create the partitions? Did you use mkfs -t vfat?
Okay, I used fdisk to delete all the partitions on /dev/hda, and then created a single partition that spans the entire drive. I then used mkfs -t vfat to partition /dev/hda1 as FAT32. Everything seemed successful and it fdisk -l showed /dev/hda1 as being FAT32, but I was still unable to mount it either manually or through /etc/fstab; both show 'not a valid block device'.
Any other thoughts, anyone?
Seve
2006-05-26, 06:20 PM CDT
Hello:
The only thing I can think of is to check your BIOS and see if the drive is actually enabled properly??? Other than that I am out of ideas as it seems FC can see it, but somehow it cannot be mounted :confused:
Seve
commonplace
2006-05-26, 06:22 PM CDT
Hello:
The only thing I can think of is to check your BIOS and see if the drive is actually enabled properly??? Other than that I am out of ideas as it seems FC can see it, but somehow it cannot be mounted :confused:
Seve
Looks fine in the BIOS, and Windows XP sees and accesses it fine, too. I'm at a loss as well. Thanks for trying, though!
jbannon
2006-05-26, 06:42 PM CDT
Try updating the kernel to 2111. I've just tried it with my internal zip drive as a vfat anf that works fine.
commonplace
2006-05-26, 06:52 PM CDT
Try updating the kernel to 2111. I've just tried it with my internal zip drive as a vfat anf that works fine.
Actually, I just did that, before I saw this post. I just got back from the reboot, and it still says the same thing (not a valid block device).
Starting from scratch (I'm willing to blow the existing partition away because there's nothing on it), what do I need to do? Again, I'm new, so it's entirely possible I've done something wrong or missed a step or something. If you have the time to do the step-by-step, I'd be grateful. If not, I understand.
Seve
2006-05-26, 06:59 PM CDT
hello:
IMO opinion the easiest way is format the drive in Windows ..One or two partitions or whatever you want and try the deal again. I really have no idea why it will not work.
Good Luck
Seve
commonplace
2006-05-26, 07:09 PM CDT
hello:
IMO opinion the easiest way is format the drive in Windows ..One or two partitions or whatever you want and try the deal again. I really have no idea why it will not work.
Good Luck
Seve
Well, that's what I'd initially tried to begin with, and I used Windows to do the formatting the first 2-3 times. None of the ways I tried have worked.
I guess it just wasn't meant to be. :(
jbannon
2006-05-26, 07:47 PM CDT
If you make one of the partitions, the first, ext2 or ext3 does it see the rest then?
commonplace
2006-05-26, 08:01 PM CDT
If you make one of the partitions, the first, ext2 or ext3 does it see the rest then?
I'll give it a try! So make /dev/hda1 an ext3 partition and make /dev/hda2 FAT32?
jbannon
2006-05-26, 08:09 PM CDT
Yep and use the linux partitioning tools making sure you label the partitions. I've noticed some really odd behaviour when building my machine as it seems to label partitions in a strange way. For instance, sometimes / is labeled as /1 etc. I'm not sure why this occurs and it only happens sometimes. Also, when using automatic partitioning it sometimes moves the paritions around from where you expect them to be. Again I'm not sure if this is supposed to happen.
commonplace
2006-05-26, 08:40 PM CDT
Alright, I made /dev/hda1 an ext2 partition, and /dev/hda2 a FAT32 partition. I can't even mount /dev/hda1 (the ext2 partition)... it says 'not a valid block device'. I must be doing something wrong here, with how I'm creating the partitions and/or how I'm formatting them or something.. 'cause I don't know what I'm doing.
jbannon
2006-05-27, 06:53 AM CDT
Right, let's get back to real basics.
1. Has this drive been working under any Linux before? If so, which one and how was it set up?
2. Check with the manufacturer's handbook as to how it should be set-up (jumper settings etc) for normal operation. I am assuming it is an IDE set to primary on it's own bus on a standard i386 platform. If none of these are true, this might be the source of the difficulty. See if the manufacturer has any special instructions with regards to a Linux set up (unlikely but you never know).
3. As an experiment, try disabling LBA mode for this disk in your BIOS. Yes, that will result in you not being able to create large partitions but this is just a test to see if it's LBA that's causing the problem.
4. Check the hardware compatibility list (not that this will tell you much) and check the Red Hat knowledgebase for any known problems with this drive. I had a look yesterday but couldn't really find anything relating to problems with vfat partitions. There was an entry relating to some problems with automatic partitioning but we're not trying to do that here.
5. If you can, try using the gparted live disk to set up the partitions. There's an article about the live disk in the Red Hat magazine that should tell you where to get it. If not, come back to me and I'll see if I can remember where I downloaded it from.
6. Try doing an install of FC5 with only this disk as the primary disk in the system. This might work.
I'm about out of ideas at the present.
linmix
2006-05-27, 09:35 AM CDT
There's another possibility that hasn't been considered yet: the error might be due to a corupt or badly formatted partition table. It should be possible to check and rewrite it with fdisk or cfdisk.
(Personally I always prefer 'repair' to 'reinstall')
commonplace
2006-06-06, 11:09 AM CDT
The problem ended up being that the drive in question was formerly flagged for RAID. I removed the RAID flag and lo and behold, I was able to mount the drive's partitions (regardless of type; NTFS, FAT32, ext3, etc.) just fine.
I found this out by doing: dmraid -r
which showed that the drive (/dev/hda) was set for RAID.
I then used: dmraid -E -r /dev/hda
and it removed the RAID metadata from the drive (hda). I was then able to mount the partitions on that drive with no problems.
VinylMatt
2006-06-24, 07:32 AM CDT
One thing to note - I was getting a "command not found messsage" when trying to execute the above.
You need to log in as root using "su -" and not just "su" from a terminal (the dash is important as it will load root's environment).
Hope this helps,
Matt.
tr3s
2006-07-27, 01:11 AM CDT
hi!
i'm having the same problem.
i checked and saw that hda has raid metadata. so i removed that and checking with dmraid -r says that there is already no raid disk. the error is still there: /dev/hda1 is not a valid block device
i have 3 hard drives. i can mount ntfs partitions on the other 2 hard drives, hdc and sda, though.
jbannon wrote:
1. Has this drive been working under any Linux before? If so, which one and how was it set up?
i think the drive is just used by ubuntu to install boot loader since it is the first hard drive but the sata drive (sda) is where i installed ubuntu.
the only thing i noticed on the partition table is that there is a + sign after the blocks column of the hda section, but on the hdc and sda, there is none.
Seve
2006-07-27, 01:15 AM CDT
Hello:
I'm sorry but what exactly is the issue you are experiencing?
It's not clear from your post. Are you having trouble mounting an ext2/3, LVM, ntfs, or fat file system?
Seve
tr3s
2006-07-27, 02:07 AM CDT
ok, sorry. same with commonplace's problem. hda has two windows partition: fat32 and ntfs. i cannot mount both partition.
here's the partition table:
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 2968 23840428+ 7 HPFS/NTFS
/dev/hda2 2969 4865 15237652+ 5 Extended
/dev/hda5 2969 4865 15237621 b W95 FAT32
Seve
2006-07-27, 03:12 AM CDT
Hello:
To mount the fat32 login as root and mkdir /mnt/XXX and edit your /etc/fstab file and add:
/dev/hda5 /mnt/XXX vfat users,defaults,umask=000 0 0
to mount your Ntfs have a look here : http://www.fedorafaq.org/#ntfs
reboot and you should be good to go :)
Seve
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.