Accessing Windows partitions from Linux

By default any Linux system will fully support FAT partitions, But when it comes to NTFS some are still NOT supporting by default.

Desktop Editions such as Ubuntu 7.10 and Fedora 8 now fully supporting NTFS (with write support), and the partitions are automatically mounted.

Server Editions such as CentOS 5 and RHEL 5 you have to do the following to access NTFS partitions.

01. Configure RPMFroge 3rd party repository, please read my tutorial about CentOS Repositories.

02. Install the following packages
[root@server ~]# yum install dkms-fuse fuse-ntfs-3g

Accessing the Windows partitions.

01. See what are the current partitions in your system, and figure out what partitions belongs to windows.

[root@server ~]# fdisk -l

Usually NTFS partitions will be displayed with a HPFS/NTFS label, Where as FAT partitions will be labeled as W95 FAT32 or W95 FAT16

In the example I'm assuming,

/dev/hda1 = NTFS
/dev/hda2 = FAT32

02. Create mount points for each windows partition that you have in the system.

[root@server ~]# mkdir /media/ntfs
[root@server ~]# mkdir /media/fat32

check

[root@server ~]# ls -l /media

Note - The mount point name can be any name that you like.

03. Manually mounting the partitions.

FAT

[root@server ~]# mount /dev/hda2 /media/fat32
[root@server ~]# cd /media/fat32
[root@server ~]# ls -l

Note - You'll be having Read/Write access to FAT partitions.

NTFS

[root@server ~]# mount -t ntfs-3g /dev/hda1 /media/ntfs
[root@server ~]# cd /media/ntfs
[root@server ~]# ls -l

Note - You'll be having Read/Write access to NTFS partitions.

Once you manually mount the partitions, when you shutdown your PC the partitions will be automatically unmounted.

04. Automatically mounting the partition on boot.

[root@server ~]# nano /etc/fstab

at the end of file, enter the following lines.

/dev/hda1 /media/ntfs ntfs-3g defaults 0 0
/dev/hda2 /media/fat vfat defaults 0 0

What we have done is, first we give the partition number then the mount point then the file system then the permissions then whether to check the partition in case of a power failure, 0 (zero) means don't check since we don't have necessary tools to check NTFS or FAT partitions and finally the checking priority.

05. So now every time you boot your PC the partitions will be automatically mounted to the mount points.

------------------------------------------------------------------------------------------