Sharing a partition (drive) between Linux and Windows

In a dual booting environment between Windows NT, 2000, XP and Linux there is a need to save files in either Windows or Linux and read in the other incarnation of the same machine.



The simple way to do it is to create a small partition in Windows and format it either as Fat16, or Fat32 (a better option), using Windows Disk Manager if you have areas in your hard-drive not yet partitioned. This can better be done at the time you install Linux and are creating space for Linux in your machine.

You can read and write to disk new partition, drive X: (whatever label you gave to it), without any problems, since this is a Windows partition/drive. The trick is how to access this partition in Linux.

In Linux, as root, create a directory /mnt/dos (or other name for the directory to be mounted). I suggest you change the ownership of this directory to your personal account from root. At the shell prompt type:

chown paccount /mnt/dos    # where paccount is your personal account, not root

All that is needed to be done now is to mount temporarily the Windows partition in Linux. Lets suppose that the Windows partition formated as Fat32 is the first partition of the second hard-drive. In Linux this would be referred as /dev/hdb1 and the command at the shell prompt to mount it in /mnt/dos would be:

mount -t vfat /dev/hdb1 /mnt/dos

The same command to mount a partition formatted in Fat16 would be:

mount -t dos /dev/hdb1 /mnt/dos

Mounting NTFS (native Windows NT/2000/XP format) is not yet part of the standard Linux kernel.


This page is maintained by Al Bento who can be reached at abento@ubalt.edu. This page was last updated on March 5, 2004. Although we will attempt to keep this information accurate, we can not guarantee the accuracy of the information provided.