User Guides AutoMounting NTFS partitions during startup in Ubuntu

Manual mounting of NTFS partition may add an extra layer of security but for most this can be more of an annoyance than a necessity .Generally dual booters of Ubuntu and windows maintain most of their files in NTFS partitions which are accessible from both operating systems . In such a scenario auto-mounting these drives during boot time can make life so much more comfortable .

There are many ways through which this can be done and having tested quite a few i found this particular method to be the simplest and most reliable (less prone to errors).

Step 1: Install ntfs-3g . ntfs-3g comes installed by default in most recent versions of Ubuntu .

If you are using an older version install ntfs-3g

Code:
sudo apt-get install ntfs-3g
Step 2: Identify your NTFS drives

Code:
sudo fdisk -l
you should get an output similar to this

Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes

255 heads, 63 sectors/track, 19457 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0xxxxxxxxx

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1        3824    30716248+   7  HPFS/NTFS

/dev/sda2            3825        8654    38796975    7  HPFS/NTFS

/dev/sda3           10352       19457    73143945    7  HPFS/NTFS

/dev/sda4            8655       10351    13631152+   5  Extended

/dev/sda5            8655       10274    13012618+  83  Linux

/dev/sda6           10275       10351      618471   82  Linux swap / Solaris
Note that sda1, sda2 and sda3 are the NTFS drives i am going to automount .

Step 3: Create the folder in which the disks are going to be mounted

Code:
cd /media

mkdir volume-A volume-B volume-C
Step 4: BackUp fstab

Code:
sudo cp /etc/fstab /etc/fstab.backup
Step 5: Open up /etc/fstab as root:

Code:
gksu gedit /etc/fstab
step 6: Add the following lines at the bottom .Put a tab between each section rather than a space except between 0 0 at the end.

Code:
/dev/sda1  /media/volume-A  ntfs-3g  defaults  0 0

/dev/sda2  /media/volume-B  ntfs-3g  defaults  0 0

/dev/sda3  /media/volume-C  ntfs-3g  defaults  0 0
Step 6: Save and exit

Step 7: To mount them immediately

Code:
sudo mount -a
Step 8:Reboot computer the NTFS partitions should automount during start-up

Step 9: If you want to revert back to manual mounting just restore your old settings which were backed up

Code:
mv /etc/fstab.backup /etc/fstab
and reboot
 
I would have appreciated the guide a lot if you have taken a bit more time in making us understand what you actually did with those commands. Copying and pasting stuff is kinda easy and slick to get work done. But it will be good if you know what actually goinng in background..

If you are posting a guide make sure there are other ways to get it done. What if don't do it with mount point and use use UUID ? What if there is anyother method like ntfs-config ? and what if my NTFS is no cleanly shutdown and throw some mountig error ? :p

i found this particular method to be the simplest and most reliable (less prone to errors).

What ? Are there anyother way to mount ? IINM all the way has to go through the same step that you mentioned, whether you use scripts , gui or whatever :p and does this guide applies only to Ubuntu ? if yes why :p?
 
Dark Star said:
I would have appreciated the guide a lot if you have taken a bit more time in making us understand what you actually did with those commands. Copying and pasting stuff is kinda easy and slick to get work done. But it will be good if you know what actually goinng in background..
Feel free to use the 'man' command to check up what each command does . If not there is always google . This tutorial is likely to be read by a number of newbies and i wanted to make the tutorial as short and clear as possible . Most commands i have used are standard like gksudo, mkdir, cp etc

If you are posting a guide make sure there are other ways to get it done. What if don't do it with mount point and use use UUID ? What if there is anyother method like ntfs-config ?
I have already mentioned the existence of other methods .This guide is specifically for the ntfs-3g method .

and what if my NTFS is no cleanly shutdown and throw some mountig error ? :p
Restore the backed up fstab in step 4 by booting into recovery mode and recheck the procedure you have followed .

What ? Are there anyother way to mount ? IINM all the way has to go through the same step that you mentioned,
Yup like you yourself mentioned theres the ntfs config method or you could use PYSDM and there are so many more methods available .This tutorial is the fruit of many hours of surfing and experimenting and not all were successful .

and does this guide applies only to Ubuntu ? if yes why :p?
This particular guide applies only to Ubuntu since the author has not had a chance in attempting the same with other distros . Though it should work in other distros as well, there is only a minor variation in procedure for other distros when using ntfs-3g .
 
This particular guide applies only to Ubuntu since the author has not had a chance in attempting the same with other distros . Though it should work in other distros as well, there is only a minor variation in procedure for other distros when using ntfs-3g .

:rofl: So who is the author ? and what if I say it applies to other distro or should say Linux in general?

Linux applications don't change their functionality from the change in distro, its 100% same :p So this guide applies to all distro if it is not pre-mouunted :p
 
Dark Star said:
:rofl: So who is the author ?
Obviously i was referring to myself in third person .
and what if I say it applies to other distro or should say Linux in general?
I wont crucify you for posting additional information that i am not aware of

Linux applications don't change their functionality from the change in distro, its 100% same :p So this guide applies to all distro if it is not pre-mouunted :p
ok

Your comments seem to take on a snide (derogatory in a superior way) tone .I wrote this guide with the good intention of helping Ubuntu/Linux users quickly find an easy working tutorial to automount ntfs partitions without having to spend long hours surfing and experimenting like i did . I am not a pro Linux user and i have'nt said so anywhere .But i am not a noob either ,I am knowledgeable enough to post tutorials .
I am very disappointed with your attitude more so because you are a moderator.
Maybe we need a rules recap ?
Do not berate members who do not have as much computer knowledge as you.
 
Thanks alot...People like me who are new to Linux like clutter free guides where we don't need to read pages and pages just to get to the point.
 
Hey,not trying to be ruin the tut, its good.

But one can use ntfs-config tool which comes with handy GUI which can be used to mount partitions. It might be easier method for many people.
 
Back
Top