Friday, February 19, 2010

Mounting NTFS partitions in Ubuntu 9.10 Karmic Koala

Here is a quick way to mount the NTFS partitions in Ubuntu. Often my external drive powers off erroneously leaving the OS to de-recognize the mounted partitions, leaving an Input/Output error. If that happens, linux gives you another powerful way to mount partitions:

1. Pull up a terminal and test if your drive is connected using:
sudo fdisk -l

Find the partition you would like to mount from the list. My external partition appears here as /dev/sdc1 to /dev/sdc7.

2. Find the UUID of the device using:
ls -al /dev/disk/by-uuid

In my case, I get "D25801C85801ABF3 -> ../../sdc1". The long alphanumeric string is the UUID.

3. Create a drive to mount, for e.g.,
sudo mkdir /media/my_media

4. Mount using fstab:
sudo vim /etc/fstab

Add your device entry at the end, like this:
UUID=D25801C85801ABF3 /media/my_media ntfs user,noauto,exec,utf8,0222,rw 0 0

5. mount your device:
sudo mount /media/my_media

6. As an additional step give proper access permissions:
sudo chown -R username:usergrp /media/my_media
sudo chmod -R 755 /media/my_medi


Now the explorer window can be opened to browse the files:
cd /media/my_media
nautilus .

That ends my log for quickly mounting an ntfs drive in rw mode (assumes you have ntfs-3g package installed).
G/

No comments: