Mounting Windows FAT16/FAT32 and NTFS partitions on Linux

(taken from “Dual Boot Systems – A series of Articles by James Attard.”)

If you want to access your Win95/98 partition (VFAT filesystem) from Linux, do the following as root (/c reminds me of the C: drive letter, you may call the directory whatever you’d like):

1. Create the mount point

% mkdir /c
% chmod a+rw /c

2. Mount the drive manually to make sure it works.
Note: see article on Windows/Linux partition naming for information about which Windows drive letter corresponds to which Linux device name.

% mount /dev/hda1 /c -t vfat

If there were no error messages, quickly browse around /c and make sure everything looks right.

3. If that worked, you can make it easier or automatic to mount by adding the following line to /etc/fstab –

/dev/hda1 /c vfat noauto,user 0 2

4. With step 3 completed, you can now use the following command to mount the Win98 partition (this is how my machine is set up):

%mount /c

5. If you want to have /c mounted automatically at boot time, change the “noauto” in step 3 to “auto”.

Now I can use free space on the Windows partition for Linux stuff as well. One thing to be careful of is that, unlike Unix, the VFAT file system is not case-sensitive: “README” and “readme” are the same file. And, of course, the performance of VFAT is pretty bad compared to ext2fs. Another difference is that FAT32 partitions know nothing about file-owners or permissions.

If you use Redhat, this procedure does not work as is, with WinXP (and win 2000 i think), since you will often get this message

mount: fs type not supported by kernel

To deal with this problem you need to rebuild the kernel with ntfs enabled. I won’t be the last to tell you that you are risking the corruption of your ntfs partition especially if you enable read/write on the partition. If you are not experienced in tweaking your kernel, you can follow the steps below (I tried it with Red Hat 7.3) –

synapse:note – If you do not want to risk corrupting your ntfs partition or are too paranoid of recompiling the kernel then click here (linux-ntfs project) to view download page for downloading an RPM package to enable NTFS support in your Linux kernel. (Make sure you download the correct package corresponding to your kernel version. Type uname -r in a terminal window to view your kernel version.) If you would like to go ahead and recompile the kernel anyways, read on –

# cd /usr/src/linux-2.4
# make menuconfig
(active to “File systems/NTFS file system support (read only)”,
# make modules SUBDIRS=fs/ntfs
# make modules_install SUBDIRS=fs/ntfs
# insmod /lib/modules/2.4.18-3custom/kernel/fs/ntfs/ntfs.o

Now mount your nt-filesystem as explained in steps 1-5 above. This procedure applies to all NTFS filesystems.
NB: I emphasize again that the “NTFS not supported” error comes around with Redhat distros. I don’t know whether other distros such as Mandrake or Debian suppost NTFS immediately. In such case, just follow steps 1-5 directly.

Hope it helps.

James Attard
aka MadviP

Copyright © 2003 James Attard
CVS: $Id: winmount.xml,v 1.1 2003/02/21 07:43:21 rac Exp $


About synapse
Programming, motorcycles and photography. Want to do more, but only have time for so much!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: