# How to mount NTFS partition in Ubuntu



## Desmond (May 9, 2006)

I have installed Ubuntu the Warty Warthog release. My problem is that I cannot mount my NTFS (hda1) partition for myself. I made a folder from my username, and mounted the partition by using SU. Now, I do not have permission to view the partition. I always have to log in as SU to view the files.

Please Help.


----------



## paragkalra (May 9, 2006)

Go here
*www.linux-ntfs.org/
It may provide u some help
or go here
*discoverlinux.blogspot.com/2006/04/mounting-ntfs-partition-in-redhat-and.html#links
Perhaps it may help you out


----------



## mehulved (May 9, 2006)

Well you can mount ntfs as read-only partition. Add the following in /etc/fstab to mount it and view without su'ing.

```
/dev/hdx  /<name of the folder>   ntfs   defaults,ro,umask=000    0  0
```
Here x in hdx is the partition number of the ntfs partition. If you have SATA drive you have to use sdx.
And reboot the computer. Somehow it did not work for me without rebooting.


----------



## Desmond (May 17, 2006)

Tried but still I have to switch to su to view it.


----------



## mehulved (May 17, 2006)

su in ubuntu???
Please explain what have you done and have you rebooted after making changes?


----------



## Desmond (May 17, 2006)

Yes, I made changes to /etc/fstab as you have described exactly, even counted the spaces and entered the lines. I then restarted and tried to get into the /mnt/win folder, where I have it mounted, then it says that I donot have permission. I swear I entered everything correctly.


----------



## mehulved (May 17, 2006)

Again did you reboot befotre trying to access the partition after you made changes? And no need to count the number of spaces I have left it does not make a difference. You just need to leave a space.
It won't work without a reboot. That had happened to me too. Me and some others were puliing out our hair at why I could not access windows partition as normal user even after making changes in fstab. But, it went all fine after the next reboot.


----------



## bizzare_blue (Dec 6, 2006)

Ain't it possible to have "write-access" to NTFS partitions from ubuntu?


----------



## mehulved (Dec 6, 2006)

Well it is possible using ntfs-3g or ntfs-static but it will be too slow. It is so slow that I found it too irritating to even use it.


----------



## QwertyManiac (Dec 6, 2006)

^^
NTFS-3G isnt slow at all tech_your_future!
Here, follow this for those who need NTFS-3g in Ubuntu.
*ubuntuforums.org/showthread.php?t=217009
__________


			
				tech_your_future said:
			
		

> Again did you reboot befotre trying to access the partition after you made changes? And no need to count the number of spaces I have left it does not make a difference. You just need to leave a space.
> It won't work without a reboot. That had happened to me too. Me and some others were puliing out our hair at why I could not access windows partition as normal user even after making changes in fstab. But, it went all fine after the next reboot.


are yaar, he said he rebooted. I mounted NTFS in my /media folder and it worked, maybe /mnt/win isnt open to all groups ? Thats a bit weird though.


----------



## Desi-Tek.com (Dec 6, 2006)

i never mounted ntfs partition on ubuntu but i don't know how it mounted windows partition automatically! it allow me to read write on ntfs drive without any problem.


----------



## mehulved (Dec 6, 2006)

Which version of Ubuntu are you talking about Desi-Tek? It must be Edgy cos AFAIK, ntfs write is supported only since kernel 2.6.17.


----------



## QwertyManiac (Dec 6, 2006)

Edgy too by default doesnt allow writing to NTFS. But in coming mid summer the k-mod plugin will start write support.


----------



## Desi-Tek.com (Dec 6, 2006)

@tech_your_future hi mate i am using dapper with latest version of kernel which i compiled recently .It require root permission to to write any thing on ntfs drive .


----------



## mehulved (Dec 6, 2006)

OK so that's why. You have compiled a kernel with ntfs write support. A default install of Dapper won't allow to write to ntfs.
And you should be able to write as non-root user too. I guess module isn't loaded or you may have not set write permissions for non-root user, maybe intentionally.


----------



## Desi-Tek.com (Dec 6, 2006)

latest kernel is not the reason i am able to read/write in ntfs drive from the very first day when i installed ubuntu for first time. even through live cd.
actually i mounted ntfs drive through system>administration>>disks
than i created a folder called /ntfs/windows
than i selected partition 1 added this access path /ntfs/windows
and than i clicked on enable it mounted ntfs drive with read and write support


----------



## mehulved (Dec 6, 2006)

Not possible AFAIK dapper doesn't support writing to ntfs.


----------



## Desi-Tek.com (Dec 6, 2006)

i have no idea how it is working for me


----------



## QwertyManiac (Dec 6, 2006)

The Live CD will definitely not support writing of NTFS. If you compiled a kernel, good job.


----------



## Desi-Tek.com (Dec 6, 2006)

i am using fully cr@ckd mce xp may be that could be the reason?  
@QwertyManiac it took me more than 1.5hour to compile source code of kernel. but it was really fun


----------



## mehulved (Dec 6, 2006)

Nope it doesn't have anything to do with pirated or non-pirated copy of windows. Cos you need the ntfs write enabled in the kernel, which came after 2.6.17 and Dapper has 2.6.15 kernel and I don't think ubuntu has anyway enabled write access to ntfs in 2.6.15 kernel by some patches.


----------



## Desi-Tek.com (Dec 6, 2006)

no idea how it is working but it is working for me


----------



## da_tcpip (Dec 7, 2006)

the only hitch for me to install this addon is the warning.. that it may hurt my hdd in some way.. how can i reassure myself.. that nothing would be damaged by it
thanks


----------



## Desi-Tek.com (Dec 12, 2006)

@tech_your_future r u sure that latest version of kernel has ntfs write support?
but people in debian irc told me that it does not have ntfs write support


> <Dheeraj_k> i just installed latest kernel but still not able to write any thing in ntfs  drive
> <PerfDave> Dheeraj_k: I don't think writeable NTFS support is in the upstream Linux kernel, because it depends on non-Free software.
> <jelly-home> PerfDave: say what?
> <jelly-home> Dheeraj_k: /msg dpkg ntfs-3g ... but ntfs-3g is a work in progress... HAVE BACKUPS
> ...


source
irc.freenode.net
##debian channel


----------



## mehulved (Dec 12, 2006)

I am talking of vanilla kernel. Not the ubuntu kernel.


----------



## eddie (Dec 12, 2006)

That PerfDave kid is stupid...NTFS-Write support (no matter how half baked it is) has been in official kernel since I don't remember when. On the other hand...the other user jelly-home just told you about a better solution for NTFS write i.e. ntfs-3g.


----------



## mehulved (Dec 12, 2006)

I guess perf-dave meant about debian when he said that.


----------



## Desi-Tek.com (Dec 12, 2006)

@tech_your_future i am using vanilla kernel version linux-2.6.19 and the problem is it is allowing me to write any thing on ntfs drive but it is supporting the read.

and they were knowin that i am using kernel v 2.6.19 .

but surprisingly i am able to do read/write on ntfs when i boot ubuntu on its default kernel!


----------



## mehulved (Dec 12, 2006)

Did you select the module which allows writing to ntfs?


----------



## Desi-Tek.com (Dec 12, 2006)

yeah i did selected ntfs and other filesystem module. and i guess i got the answer and this time by very exprienced debian user and he is admin of that channel and if i am right than it is a official debian channel


> (05:00:24) Guerin: Dheeraj_k: it's not half-baked, it's completely nonfunctional.
> (05:01:21) Dheeraj_k: Guerin: that means what they said in thinkdigit is wrong?
> (05:01:24) lacin left the room (quit: "Leaving").
> (05:01:57) Guerin: Dheeraj_k: it's technically right - there IS what they call ntfs-write in kernel. It's just utterly ****ing useless.
> ...


 and he also visited this thread before answering the query as i gave him the link via pm


----------



## nitish_mythology (Dec 12, 2006)

I hv jst installed Fc6, wll editing the fstab in the same way work!

wht dows umask men in this line!(umask=000 or umask=0222)


----------



## mehulved (Dec 12, 2006)

OH sorry. I haven't really tried it on a ntfs partition myself cos I don't have one. I just know that there's ntfs write support. Never knew that it was non-functional.


----------



## da_tcpip (Dec 12, 2006)

has anyone tried ntfs-3g???
did anyone find any errors by writing/editing on ntfs partitions of Seagate 80 gb sata drives??
please i intend to use it.. but wanna know how safe would it be.. or how risky would it be?
thanks


----------



## kalpik (Dec 12, 2006)

^^ ntfs-3g is perfectly safe. I use it on my home PC. I've transferred all kinds of  files (big and small) using it. Never faced any problem, and its fast too!


----------



## da_tcpip (Dec 12, 2006)

kalpik: you use your home pc as dual boot.. i use xp to play all the games.. and it has quite a staggering amount data useful to my dad.. was wondering if its same thing (dual boot) and no errs


----------



## QwertyManiac (Dec 12, 2006)

I support Kalpik, I've been using ntfs-3g following his earlier advice and have transferred many a files between ext3 and NTFS, 0% health reduce or problems. Just be careful with the rm, but there is a .thrash thats created on NTFS too!


----------



## da_tcpip (Dec 13, 2006)

whats rm and .thrash  plz elaborate
thanks


----------



## nitish_mythology (Dec 13, 2006)

nitish_mythology said:
			
		

> I hv jst installed Fc6, wll editing the fstab in the same way work!
> 
> wht dows umask men in this line!(umask=000 or umask=0222)





Pls answer my ques too........


----------



## mehulved (Dec 13, 2006)

da_tcpip said:
			
		

> whats rm and .thrash  plz elaborate
> thanks


rm stands for remove command
.thrash is the thrash folder


----------



## kalpik (Dec 13, 2006)

@da_tcpip: yes, i have a dual boot setup Ubuntu/Vista

@nitish_mythology: That's got something to do with usergroups. The umask determines what usergroups get what kind of access (read or write) to the partition.


----------



## mehulved (Dec 13, 2006)

nitish_mythology said:
			
		

> I hv jst installed Fc6, wll editing the fstab in the same way work!
> 
> wht dows umask men in this line!(umask=000 or umask=0222)


See this *en.wikipedia.org/wiki/Umask . It is a bit confusing but just read for basic understanding, if you understand then great. Also read about POSIX. Link is there on the page, it will be quite useful.
Also read man pages of mount and fstab. They are available on the net too *www.die.net/doc/linux/man/man8/mount.8.html , *www.tuxfiles.org/linuxhelp/fstab.html and many more links available from googling but better read the man pages on FC since you don't have a fast connection.


----------



## Desmond (Jan 16, 2007)

Can Ubuntu read Fat32 with ease?


----------



## desertwind (Jan 16, 2007)

DeSmOnD dAvId said:
			
		

> Can Ubuntu read Fat32 with ease?



Of course, it can!


----------



## mak1012 (Aug 20, 2007)

hi when i installed ubutu it was only reading the ntfs then i installed some package to enable the write...it works fine..............now i'm facing the problem noether i'm able to read nor write. when i open sda1,sda2,sda4 and sda5 which is ntfs there is nothing in the folder ubutu is not able to read  ne thing.
please give ne valid reason for this coz?


----------



## praka123 (Aug 20, 2007)

u need to look for partns UUID's changed.look at the o/p of sudo fdisk  -l and blkid command can give the UUID's of ur partns.edit /etc/fstab accordingly.else use the classic /dev/sdax in fstab.


----------



## mak1012 (Aug 20, 2007)

praka123 said:
			
		

> u need to look for partns UUID's changed.look at the o/p of sudo fdisk  -l and blkid command can give the UUID's of ur partns.edit /etc/fstab accordingly.else use the classic /dev/sdax in fstab.




i really dint understood wht u siad but when i did sudo fdisk -l i got this.

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20482843+   7  HPFS/NTFS
/dev/sda2            2551        5265    21808237+   f  W95 Ext'd (LBA)
/dev/sda3            5906        7180    10241437+   7  HPFS/NTFS
/dev/sda4            7181        9729    20474842+   7  HPFS/NTFS
/dev/sda5            4476        5265     6345643+   7  HPFS/NTFS
/dev/sda6            2551        4349    14450404+  83  Linux
/dev/sda7            4350        4475     1012063+  82  Linux swap / Solaris

Partition table entries are not in disk order

now tell me what to do?
Edit:   now its working i think sudo fdisk -l did the magic.


----------



## mak1012 (Aug 22, 2007)

friends again my ntfs partitions are not in the place they disappeared... i tried  every thing what i done before but i'm not able to gain it again.... please help i have all the data in those folders only.


----------



## praka123 (Aug 22, 2007)

*post the contents of fstab here*

^post the contents of /etc/fstab here.If ur novice,I'll ask u paste the o/p of below commands from a terminal(in menu Applications>Accessories>Terminal):
type below command each and press enter and copy the output and paste here.

```
cat /etc/fstab
```


```
blkid
```

just copy the o/p from the terminal by selecting with mouse right click copy and paste here.


----------



## faraaz (Aug 22, 2007)

You know, this may be a little late but if the OP has an internet connection and Ubuntu, all he had to do was:

sudo apt-get install ntfs-3g ntfs-config

Hmm...


----------



## mak1012 (Aug 22, 2007)

this is what i get after cat /etc/fstab


```
root@mak:/home/mukesh# cat /etc/fstab
# /etc/fstab: static file system information.
#
#  -- This file has been automaticly generated by ntfs-config -- 
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=c2648606-56f2-44b0-9741-9c2a0de549dc / ext3 defaults,errors=remount-ro 0 1
# Entry for /dev/sda1 :
UUID=9698CB5998CB3691 /media/sda1 ntfs-3g defaults,locale=en_IN 0 1
# Entry for /dev/sda3 :
UUID=E0C0DF7FC0DF59FC /media/sda3 ntfs-3g defaults,locale=en_IN 0 1
# Entry for /dev/sda4 :
UUID=4CC86B13C86AFA9A /media/sda4 ntfs-3g defaults,locale=en_IN 0 1
# Entry for /dev/sda5 :
UUID=709C8D5C9C8D1E2A /media/sda5 ntfs-3g defaults,locale=en_IN 0 1
# Entry for /dev/sda7 :
UUID=92163ea2-326d-4e7c-b290-24ddcd12be33 none swap sw 0 0
/dev/scd1 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/scd0 /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
```



and for blkid

```
root@mak:/home/mukesh# blkid
/dev/sda1: TYPE="ntfs" 
/dev/sda3: TYPE="ntfs" 
/dev/sda4: TYPE="ntfs" 
/dev/sda5: TYPE="ntfs" 
/dev/sda7: UUID="92163ea2-326d-4e7c-b290-24ddcd12be33" TYPE="swap" 
/dev/sda6: UUID="c2648606-56f2-44b0-9741-9c2a0de549dc" SEC_TYPE="ext2" TYPE="ext3" 
root@mak:/home/mukesh#
```




> You know, this may be a little late but if the OP has an internet connection and Ubuntu, all he had to do was:
> 
> sudo apt-get install ntfs-3g ntfs-config
> 
> Hmm...



i have ntfs config tool installed...


----------



## praka123 (Aug 22, 2007)

^seems like u have formatted/moved ur ntfs partns  so uuid set by ubuntu may be lost.so no probs.do as follows:
edit ur /etc/fstab to look as follows for sda1,sda3,sda4,sda5(ur ntfs partns) ONLY:
remaining entries shud be the same.
for editing u need admin(root) access for that press ALT+F2 to get "run" dialogue.inside enter "gksudo gedit /etc/fstab" -ofcorz without quote.edit,save and exit the editor.

```
# Entry for /dev/sda1 :
[B]/dev/sda1[/B] /media/sda1 ntfs-3g defaults,locale=en_IN 0 1
# Entry for /dev/sda3 :
[B]/dev/sda3[/B] /media/sda3 ntfs-3g defaults,locale=en_IN 0 1
# Entry for /dev/sda4 :
[B]/dev/sda4[/B] /media/sda4 ntfs-3g defaults,locale=en_IN 0 1
# Entry for /dev/sda5 :
[B]/dev/sda5[/B] /media/sda5 ntfs-3g defaults,locale=en_IN 0 1
```
now after saved and exit editor,try below command and look inside ur ntfs mount dirs for whether mounted

```
sudo mount -a
```
^this will solve ur problem of mounting ntfs at boot.though u can post here the o/p of:

```
ls /dev/disk/by-uuid -lh
```
Also looking at ur cdrom drives,I will recommend u get a latest kernel for ur architecture(linux-image-2.6.20-16-386 for intel) u can search that using synaptic package manager after pressing "reload" while internet is ON.


----------



## mak1012 (Aug 23, 2007)

praka123 said:
			
		

> now after saved and exit editor,try below command and look inside ur ntfs mount dirs for whether mounted
> 
> ```
> sudo mount -a
> ...



i'll upgrade when i'll have enough download balance right now im strugling with download limit.


----------



## Desmond (Aug 23, 2007)

I have now got Ubuntu 7.04 FF release and am quite happy with it. It reads NTFS with no sweat.


----------



## faraaz (Aug 24, 2007)

Nice! Remember, you can't WRITE to an NTFS partition however, unless you do:

sudo apt-get update && apt-get install ntfs-3g ntfs-config


----------

