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@daddylinux~]# 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@daddylinux~]# 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@daddylinux~]# mkdir /media/ntfs
[root@daddylinux~]# mkdir /media/fat32


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

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

03. Manually mounting the partitions.


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

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


[root@daddylinux~]# mount -t ntfs-3g /dev/hda1 /media/ntfs
[root@daddylinux~]# cd /media/ntfs
[root@daddylinux~]# 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@daddylinux~]# 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.


Post a Comment