Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mounting a fat32 partition in Redhat 7.2

Status
Not open for further replies.

piked

Programmer
May 7, 2002
14
AU
Ok.. Basically I have my HD set up with a 15 gig win98SE primary partition, a 15 gig shared fat32 partition, and a 10 gig redhat 7.2 partition.

No problems, got it dual-booting fine. Win98 has no problems recognising the shared drive, and nor did Linux, until I rebooted today and suddenly failed a few initialisation routines on boot-up.

The partition is in /dev/hda5, so i try:
# mount -t auto /dev/hda5 /mnt/hda5
and it spits out:
mount: /dev/hda5 is not a block device (maybe try `-o loop'?)

So i try:
# mount -o loop -t msdos /dev/hda5 /mnt/hda5
and it spits out:
mount: wrong fs type, bad option, bad superblock on /dev/loop0, or too many mounted file systems

(I only specify msdos there instead of auto cause it refuses to accept auto when i include the -o loop switch)

So, any ideas? It refuses to mount the partition.

Again, this was working perfectly, and I didn't fiddle with anything applicable to this since.

Cheers
 
hi friend,
If you want to mount fat32 in linux try this,it works fine and the partition is mounted automaticly when loading linux.

assumming that your fat32 partition is hda1

1. log on as root

2. edit the file '/etc/fstab' and add a new entry with this values for each columes :
/dev/hda1 /mnt/dosc vfat defaults 0 0

3. then create a directory named dosc in mnt directory :
example : mkdir /mnt/dosc

4. save the fstab and close all open windows

5. reboot

after reboot you can access the fat32 partition through /mnt/dosc.

use the same procedure to add new partition - just change the device partition number and directory.

bye,
king.
 
Done all that. Same problem, when I boot up.

Gives me exactly the same error about it not being a block device.

If mount won't mount it, it aint gonna be mounted through fstab. :(
 
the problem may be with your partitions. try to find out the partition used by fat32 for eg. hda1, hda2, hda3, hda4........

the type of error you are getting only comes when you try to mount the partitions which are not available.

try this :
1. first create ditectory in mnt named mydos
mkdir /mnt/mydos

2. secondly try to mount the partition.
mount /dev/ha1 /mnt/mydos

if you get error :
try changing the hda1 to other partitions name eg. hda2, hda3, hda4.....................in the mount command.

try this command again & again with other partition names unless the partition is mounted.

if this works then you can use the steps given in my first forum.
 
Can you post the output of `ls -l /dev/hd*` and `ls -l /mnt` please.

It may shed some light.

Also what exactly is failing on boot, could you post that aswell. [smurf]
01101000011000010110010001110011
 
Print the output of the following...

fdisk -l /dev/hda


Did you try "mount -t vfat /dev/hda5 /mnt/vfat"? You used msdos in your earlier post, which is only for FAT16 partitions.


ChrisP
 
ls -l hda* (I assume you mean hda* and not hd*, which is almost the entire directory ;)) shows up all the usual numbers, and they're all labeled disk except for hda5 (which is my shared partition) :

-rw-r--r-- 1 root root 3811 Sep 30 18:06 /dev/hda5

as opposed to the others which are labelled disk:

brw-rw---- 1 root disk 3, 0 Aug 31 2001 /dev/hda
brw-rw---- 1 root disk 3, 1 Aug 31 2001 /dev/hda1
brw-rw---- 1 root disk 3, 2 Aug 31 2001 /dev/hda2

etc etc

Have I unwittingly modified the hda5 file or something? Note the modification date.. All the rest are untouched after Sep 30. As I said tho, win98 still recognises the partition fine, possibly it modified something?

fdisk shows hda5 is my fat32 shared partition (ie. hda2 is the logical dos drive, hda5 is the extended dos partition which takes up the space):

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1913 15366141 c Win95 FAT32 (LBA)
/dev/hda2 1914 3826 15366172+ f Win95 Ext'd (LBA)
/dev/hda3 3827 4795 7783492+ 83 Linux
/dev/hda4 4796 4860 522112+ 82 Linux swap
/dev/hda5 1914 3826 15366141 b Win95 FAT32

Hope that gives you more information on the problem.

BTW, during bootup, anything to do with filesystems is either passed or failed, about 3 checks.
 
Ok, problem is the dev/hda5 file was replaced somehow.

I must have stupidly saved something over it, god knows how, but in its place was an ascii file containing a bunch of garbage. (But it was viewable, as opposed to the other hda* files which prompt me for an application to open them in).

So.. question now becomes, how do I rebuild the /dev/hda5 file? :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top