Wednesday, April 15, 2009

Permanently Mounting Windows Partition on Linux - Ubuntu/Linux

Permanently Mounting Windows Partition on ubuntu/Linux:

1) Create the folder where you want to mount the partition
sudo mkdir -p /media/disk

2) Find the disk to mount
sudo fdisk -l
Output would be like this:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6374 51199123+ 7 HPFS/NTFS
/dev/sda2 6375 9729 26949037+ 5 Extended
/dev/sda5 6375 9585 25792326 83 Linux
/dev/sda6 9586 9729 1156648+ 82 Linux swap / Solaris

In our case it is /dev/sda1
3) Open the /etc/fstab
sudo gedit /etc/fstab &

4) Copy the following line at the end in /etc/fstab
#Window Drive
/dev/sda1 /media/disk ntfs rw,nosuid,nodev,noatime,allow_other,blksize=4096 0 0

5) Save the file.

6) So when you restart windows partition will be mounted on /media/disk

7) To check mounted or not go to the /media/disk directory or open the file /etc/mtab

You should able to see the following entry:
sudo gedit /etc/mtab

/dev/sda1 /media/disk fuseblk rw,nosuid,nodev,noatime,allow_other,allow_other,blksize=4096 0 0

Note: Above had been tested in ubuntu -8.04

No comments:

Post a Comment