Access Windows partitions

First you must find out what are the device names of the partitions you want to access. To do so open a terminal and type:

sudo /sbin/fdisk -l
Here you should see something like this:

Device Boot Start End Blocks Id System
/dev/sda1 * x xxxx xxxx+ 7 HPFS/NTFS
/dev/sda2 xxxx xxxx xxxx b W95 FAT32

which means that there is one NTFS /dev/sda1 partition and one FAT32 /dev/sda2 partition.
FAT32 partitions
Create a mount point for the FAT32 partition. Here it will be directory fat32 under /mnt/ Of course you can name it as you wish.

$ sudo mkdir /mnt/fat32
$ sudo cp /etc/fstab /etc/fstab.original
$ sudo nano /etc/fstab

Add the following line at the end of file.

/dev/sda2 /mnt/fat32 vfat auto,iocharset=utf8,umask=0000 0 0
This line allows everybody to read/write in your fat32 partition and the partition will be automatically mounted at startup. You can set noauto if you want to mount it manually.

Save (Ctrl+O) and exit (Ctrl+X). Now you can mount your fat32 partition by typing

$ mount /mnt/fat32
$ umount /mnt/fat32
NTFS partitions
First you must have ntfs-3g installed:

$ sudo yum install ntfs-3g fuse fuse-libs
Next you must create a mount point for the ntfs partition.

$ sudo mkdir /mnt/ntfs
$ sudo cp /etc/fstab /etc/fstab.original
If you want users to have read only access in the ntfs partition add the following line in your fstab:

/dev/sda1 /mnt/ntfs ntfs-3g ro,defaults,umask=0222 0 0
If you want to have read/write access add this line:

/dev/sda1 /mnt/ntfs ntfs-3g rw,defaults,umask=0000 0 0
Save (Ctrl+O) and exit (Ctrl+X). Now you can mount and unumount your ntfs partition by typing

$ mount /mnt/ntfs
$ umount /mnt/ntfs


About Tanveer
RIA (Rich Internet Application) Developer with a wide variety of business applications. Particularly interested in client/server and relational database design. Always interested in migration projects, as well as close interaction with the DB manufacturers.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: