How to mount fat16 partition

Hello,

I am trying to mount a FAT16 and FAT32 partition on an already installed Redhat system.

I have tried to edit the fstab and mtab, and to put in the data I got from fdisk, but it just says cannot find it.

The information given by fdisk on /dev/hda is:

Device        Boot  Start     End      Blocks      Id     System
/dev/hda1    *           1     100     201568      6        FAT16
/dev/hda2             101     658   1124928      5        Extended
/dev/hda5             626     658       66496    82        Linux Swap
/dev/hda6             101     625   1058337    83        Linux

my /etc/fstab contains:

LABEL=/        /                     ext2        defaults                           1  1
/dev/fd0        /mnt/floppy    auto        noauto,owner                 0  0
none             /proc              proc         defaults                          0  0
none             /dev/pts         devpts     gid=5,mode=620            0  0
/dev/hda5     swap              swap       defaults                          0  0
/dev/cdrom   /mnt/cdrom     iso9660   noauto,owner,kudzu,ro  0  0

my /etc/mtab contains:

/dev/hda6  /  ext2  rw  0  0
none   /proc  proc  rw  0  0
none  /dev/pts  devpts  rw,gid=5,mode=620  0  0
automount(pid539)  /misc  autofs  rw,fd=5,pgrp=539,minproto=2,maxproto=3  0  0

I have been trying to figure out the changes myself but this is about the only subject I cannot locate *any* info on. This computer only has a FAT16 partition, but I also have another one that has a FAT32 partition that I would like to access, I poresume the methods are the same....

Cheers in advance

I found it myself at last:

for anyone interested here is the solution:

if you know which hard drive the partition is on then use fdisk on that drive ('fdisk /dev/hda' for me) and type 'p' to get a list of partition info.

next you need to locate which poartition, I need to access hda1.

quit fdisk and make a directory to use as a mount point ('/home/win' for me)

edit the fstab to include the line

/dev/hda1           /home/win                vfat    defaults        0  0 

and voila next time I boot, it is recognised.
If I just want to mount it once, I type:

mount -t vfat /dev/hda1 /home/win

or mount -t [filesystem] [device] [mount point]

Happy days,

Hi,

Have you tried adding the following to your /etc/fstab file:

/dev/hda1 /mnt/msdos msdos  auto

I think the msdos file type should work okay for fat16 filesystems.

For fat32 filesystems you'll need to add vfat for the fs type.

i.e. a partition named /dev/.hda8 add the following to fstab:

/dev/hda8 /mnt/fat32 vfat  auto

Of course you'll need to ensure that the mount directories have been created before mounting the directories.

To mount the fat16 partition you'd type:

mount /mnt/msdos

or

mount /dev/hda1 

I hope this helps.

Andy :slight_smile:

cheers,
The above solution is working fine for me, and I set file type to vfat (fat was not recognised as an option to mount) but it works fine for me.
When I tried DOS as a filesystem, it was rejected, I see now that I should have used MSDOS.
Cheers for the tip,

That's okay.

Supported modules for your system's kernel can be found in:
/lib/modules/kernelversion*

  • kernel version can be found from the /proc/system/kernel/osrelease file.

The exact location for modules can vary, on my system fs modules are in
/lib/modules/2.4.6/fs

Andy :slight_smile: