using-windows-ntfs-fat-partitions-from-linux-fedora-core

With some space available on your disk, when you go to install Linux, consider adding a small FAT16 or FAT32 partition (maybe 2GB) on your disk. Every x86 operating system (Linux, Windows 95, NT, 2000, XP, Vista and DOS) supports those types. With that added, you will be able to freely exchange files between your Linux and Windows system on the FAT16 partition. With FAT partitions, however, keep in mind that there are limitations. FAT is limited to between 2GB and 4GB file sizes. Also, FAT16 doesn't support long file names. Total partition size for FAT file systems is 32GB. After you have installed Linux in the space freed up by the previous procedure, you should be able to choose between Linux and Windows when the Fedora or RHEL boot screen appears during boot time. Press any key to go to the GRUB boot screen. Then move the arrow key to choose to boot Linux or Windows.

The first time you boot Windows, you might be asked to check your disk (because your Windows partition will be a different size than expected). After that, there should be no change in how you use your Windows system. Your disk space will just be smaller. Now, when you boot up Linux, if you have a lot of documents, digital images, music, or other content on your Windows partition, you probably want to be able to use that content from Linux. To do that, you need to:

• Determine which partition is your Windows partition.
• If you didn't do so during installation, add support for the file system type of your

Windows partition to Linux. Since VFAT is already built in, that means adding NTFS support if that is the file system type.
• Mount the Windows partition on your Linux file system.

The following procedure describes how to do those things.

1. Check partitions. To determine which partition contains your Windows file system, use
the fdisk command as follows:

# fdisk -l     
Disk /dev/sda: 60.0 GB, 60011642880 bytes  
16 heads, 63 sectors/track, 116280 cylinders  
Units = cylinders of 1008 * 512 = 516096 bytes      
Device Boot
Start
End
Blocks
Id
System
/dev/sda1       *
1
41725
21029053+
7
HPFS/NTFS
/dev/sda2
106741
116280
4808160
12
Compaq diagnostics
/dev/sda3
41725
41932
104422+
83
Linux
/dev/sda4
41932
106734
32660145
5
Extended
/dev/sda5
41932
106718
32652081
8e
Linux LVM
     
In this example, the Windows partition is on device /dev/sda1 and is an NTFS file system. (The other common type of Windows file system is VFAT.)
2. Get NTFS support. If you have a VFAT file system, you can skip this step. If you have an NTFS file system, and NTFS support is not already installed, you can install the necessary drivers and tools to be able to mount and use your NTFS file system in Linux by running the following yum command as root user from a Terminal window:

# yum install ntfsprogs ntfs-3g

Assuming you have an active connection to the Internet, this will install the NTFS support you need to access your NTFS partitions from Linux.
3. Mount Windows file system. You can access your Windows file system from Linux using the mount command. Assuming your Windows partition is an NTFS file system on /dev/sda1 (as in the example above), you could type the following to create the Windows mount point and mount the file system there:

# mkdir /mnt/win
# chmod 755 /mnt/win
# mount -oro -t ntfs /dev/sda1 /mnt/win
# chmod 755 /mnt/win
# ls /mnt/win

The -oro option to mount will mount the file system read-only. Read/write support is not considered to be stable (so if you remove the -oro option to mount read/write, you do so at your own risk). Replace the ntfs with vfat if your Windows partition is a VFAT file system. The ls command is just to find out if you can see the contents of your Windows partition. You can have the mount occur permanently by adding an entry to the /etc/fstab file. Here’s an example of the line you could add to /etc/fstab to have the partition mounted every time the system reboots:

/dev/sda1 /mnt/win ntfs ro 0 0

At this point, you can use the files from your Windows partition as you would any other files on your system. You can open a folder or change directories to the /mnt/win directory to see the contents. Then use any applications you choose to open your documents (OpenOffice.org), music (Rhythmbox), images (Gimp), or any other content type you want to use from your Windows partition in Linux.

NOTE: If your Linux system uses an ext2 or ext3 file system (as Fedora typically does), you can do the
reverse of what was just described as well: access your Linux partition from Windows. For information on how to do this, see the Ext2 Installable File System for Windows (http://www.fs-driver.org).

No comments:

Post a Comment