Tuesday, May 28, 2013

first i had faced this problem a lot of times,since i had started using Linux Distro 4 years ago. But i had never bothered to solve it by using a permanent solution.
This is my first step towards execution

problem: mount ntfs or any partition from the start
my journey to the solution, after a long and tedious search i finally found a website, which had shown different methods to do it, rather than showing some narrow minded and simple way, it explained all the methods properly. So i chose the best solution as a core linux user should have, the manual way

for this i need to understand the use of this important command   fdisk

fdisk - used to view and manipulate the partition table
should use this command with root
so , the cmd is

sudo fdisk -l          to view the parition the table of all disks

this showed my partition table, then i got to know about this as well, what is the difference between hda and sda drives being shown here
hd means ide drives which parallel ATA
sda means serial ATA

SATA replaced PATA these days

since it is resolved, now

another important stuff for this is to know the device UUID, this has been used since if the device partition is changed then it will be known by a different name, hence to identify the device irrespective of the partition , UUID is used

Therefore, this is the cmd or path to know device UUID

ls -l /dev/disk/by-uuid/

this will show all the devices UUIDs in the partition table

now we have to learn about an important file /etc/fstab
this file contains the mount information which is used at boot time to mount the drives
an example is here


/dev/hda1   /media/windows   vfat   user,fmask=0111,dmask=0000   0   0

the first field is the drive
second is mount point
3 rd is filesystem type, mine ntfs, but to allow access to everyone use ntfs-3g
4th is options, need to explore this , but that is for another day
5th option is dump, later
6th is pass, which gives the order in which they are checked at boot time, linux partition is always 1

So this is the code i inserted in the /etc/fstab file

UUID=88E0876FE0876274 /media/windows-xp ntfs-3g user,fmask=0111,dmask=0000 0 0 

reboot
voila! the work is done



No comments:

Post a Comment