Though the title says NTFS, this can be used for any file system.
I see a lot of people complaining about Hardy not automatically mounting the non-native partitions (i.e., NTFS, FAT) so I thought I'd put together this HOW TO. Here I show two ways of identifying the device and automatically mounting your partition without the need to install additional packages.
NOTE: NTFS-3G is native to Hardy and does not need to be installed for this to work. Furthermore, any instance of NTFS as a file system defined in fstab can be replaced with NTFS-3G.
Common grounds
When you boot into ubuntu (hardy), even though you don't have your ntfs partitions on the desktop, they should be listed in the menu "Places". To mount the HD, simply click on the appropriate name and an icon will show up on your desktop.
Determining the mount point
If you want to leave the same mount point as the ubuntu default, go to "Places" and manually mount the HD, then browse to your media folder (or in the terminal type cd /media then ls) and look at the mountpoint given to your ntfs partition (i.e. folder called backup - in my case).
If your HD doesn't show up under "Places" then you will need to create the mount point in the /media folder
(where backup can be whatever you call it...)Code:mkdir /media/backup
Determining what you have
From the terminal, type
this will list all your partitions. This is what my looks like.Code:sudo fdisk -l
So from this list, I know I want to mount /dev/sda1 and /dev/sda4Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 4400 14860125 83 Linux
/dev/sda3 4401 4462 498015 82 Linux swap / Solaris
/dev/sda4 4463 9725 42275016 7 HPFS/NTFS
What to add to fstab
from the terminal type
this will open your fstab.Code:sudo gedit /etc/fstab
Alternative 1
Let's say I wanted to mount my /dev/sda1, then I would add this to the last line:
This will mount /dev/sda1 in the /media/backup folder (as explained above)/dev/sda1 /media/backup ntfs defaults,umask=007,gid=46 0 0
simply keep adding lines as you need more partitions. Save your fstab and reboot. You should now get the partitions automatically mounted and the respective icons on your desktop.
Alternative 2
An alternative is to add a line to the end of fstab using the UUID option instead of /dev/sda1. You can determine the UUID by using (i.e., for sda1)
orCode:sudo vol_id -u /dev/sda1
so your fstab file will have this lineCode:sudo blkid
where NUMBER_ID is the output from vol_id for your device, i.e.:UUID=NUMBER_ID /media/backup ntfs defaults,umask=007,gid=46 0 0
I found this to be more stable/suitable than using the /dev/sda1 option.UUID=78980E1B980DD890 /media/backup ntfs defaults,umask=007,gid=46 0 0
Bookmarks