totn Linux

Linux: How to Mount a Windows file system from Linux

Question: How can I mount a Windows file system from Linux?

Answer: To mount a Windows file system from Linux can be a challenging task.

To begin, you'll need to determine what kind of Windows file system you are trying to view. Most flavors of Linux come with appropriate drivers for the most common file system types.

Windows 3.x, 95, 98, 98SE, and ME usually use a MSDOS or a VFAT formatted partition. (VFAT is a replacement file system, which is more efficient than the older MSDOS one.)

Windows NT4, 2000, and XP generally use a more advanced file system called NTFS.

All of the RedHat releases of Linux ship with support for the MSDOS and VFAT file systems. The newer NTFS file system is a different story. Very few of the Linux distributors ship with out-of-the-box support. This is for a good reason. While there is quite a bit known and published about MSDOS and VFAT, Microsoft has kept the specifics for NTFS very quiet, so the implementations vary in stability and features.

Fortunately, there is a web site which maintains RPM packages with appropriate NTFS drivers for most recent versions of RedHat Linux. The site can be found at:

http://linux-ntfs.sourceforge.net/info/redhat.html

If you are attempting to mount an NTFS file system, you'll need to download the appropriate RPM for your system. If you are unsure of how to do this or are confused by the next step, I would recommend that you seek more advanced Linux help. All systems are different so it is difficult to provide exact help with these types of problems.

To continue, you'll need to have determined what type of file system you have. If it is an NTFS file system, you will also need to have downloaded the correct RPM package from the site above and installed it without error.

Now that you have the necessary driver support installed, you'll need to determine which partition holds the Windows file system you need access to. You may already know this from your installation procedures.

Linux uses a different convention than Windows for describing disk partitions. A typical example of a Linux partition would be:

/dev/sda2

This indicates that you installed windows on your SCSI disk on the second partition.

An IDE hard drive would look something like:

/dev/hda2

If you have more than one hard disk in your computer, the convention will be different. For example, for the first partition on the second SCSI hard disk would take the form:

/dev/sdb1

Hopefully by now, you've determined where you installed your Windows file system.

Next, assuming an NTFS file system, try mounting the partition by typing something like:

mount -t ntfs /dev/sda1 /mnt     (Of course replacing the /dev/sda1 with your partition specifics.)

This command should complete without error. If you get an error, you may either not have the file system driver installed correctly or the partition you specified may be incorrect.

For VFAT or MSDOS partitions, change the -t flag in the mount command to "vfat" or "msdos".

Accessing disk partitions is a very dangerous task and should be done with great care. If you have any trouble with the commands or concepts above, please ask an advanced Linux user to take a look at your system.