While this guide is still valid, see here for a newer and more stable way to gain access to NTFS.
If you’re like me, then you’ve got a dual boot machine running both Windows and Ubuntu. heck, even if you’re not like me it’s entirely possible that you’ll have a dual boot machine. I’ll even allow for a triple boot machine if you like.
Here’s a guide to making the most of your NTFS partition while in Ubuntu. When you’re done you should be able to have your NTFS partition mounted at boot, be able to write to it and read from it and be able to lift three times your body weight without breaking a sweat.
It should be noted that writing to NTFS is still experimental. You’d best have a backup of your machine if you’re going to do this.
First let’s figure out where our NTFS partition is hiding. I’m going to assume that you’ve got an NTFS partition, an EXT3 partition and perhaps a FAT32 partition laying about. Open up a terminal session and type the following:
sudo fdisk -l
You’re looking for the NTFS partition, my output looks like this:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20480008+ 7 HPFS/NTFS
/dev/sda2 2550 7493 39707451+ f W95 Ext’d (LBA)
/dev/sda3 7494 9729 17960670 83 Linux
/dev/sda5 2550 7394 38911288+ b W95 FAT32
/dev/sda6 7395 7493 795186 82 Linux swap / Solaris
It’s /dev/sda1 that I’m interested in. Find out what yours is and write it down somewhere. A good thing to do is to write it backwards on your forehead in indellible marker. This not only allows you to see where it is every time you look in the mirror but I’ll also be able to identify my readers if you venture out into public.
So let’s install the stuff we’ll need to get this working.
sudo apt-get install libfuse2 fuse-utils libntfs8 ntfsprogs
Now let’s add fuse to the list of stuff that our kernel will load:
echo fuse | sudo tee -a /etc/modules
Now let’s add a group which we’ll use to control who can or can’t get access to the NTFS partition.
sudo addgroup ntfs
When this is done, you’ll get some output which will contain your GID (Group ID). It’ll look something like adding group ntfs (1001). Write down that GID, or add it to your backwards forehead list.
Now we’re going to create a mount point for our partition. This is a folder into which this disk will be shoved. Well, metaphorically speaking anyway. We’ll put it in the /media directory so it’ll show up on our desktop. then we’ll edit the fstab file to tell it to mount the NTFS partition on to the folder.
sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab.bak
gksudo gedit /etc/fstab
Now that you’ve got the fstab file backed up and open in gedit, let’s add the following line to the bottom of it.
/dev/hda1 /media/windows ntfs-fuse auto,gid=1002,umask=0002 0 0
Here’s where you’ll need a mirror to look at the info you’ve written backwards on your forehead. The first bit ‘/dev/hda1′ is the location of your NTFS partition. If you’re is different, then change it in your fstab entry above. The second bit we’ll need is the GID of your ntfs group. If it’s not 1002 then change that as well.
Now, let’s add your user to the ntfs group. If you’re username is ‘slartibartfast‘ this is how the command would look. (If you’re username is not ’slartibartfast, then type your username in place of slartibartfast, or consider changing it to slartibartfast’).
sudo adduser slartibartfast ntfs
Now let’s do some quick removing and linking to fix a known bug.
sudo rm /sbin/mount.ntfs-fuse && sudo ln /usr/bin/ntfsmount /sbin/mount.ntfs-fuse
Now reboot your machine and you’ll come back up to the joy of being able to muck with your windows install while not actually booting into windows.
Technorati Tags: ubuntu, windows, ntfs, mount, partition, disk, geek, technology, computers
Certifications like 70-294 as well as 70-528 have never been easy. Just the fact they are in the same series as 70-620 and 70-272 does not mean that they follow the same preparation outlines. Like 70-292, they all follow a fairly simple model, but that is where the similarities end. However after studying for 642-176, one might as well attempt a 640-822 since they both have almost the same material.















September 25th, 2006 at 10:20 am
Slartibartfast? What kind of name is THAT? I mean, unless you’re a planetary designer working on the largest computer ever known as designed by mice, that’s just a stupid name. Just stupid.
Okay, seriously, I will give this a shot, but I can’t see any reason why this wouldn’t work. Nice hack on the known bug, BTW.
Thanks,
Zaphod.
42
September 25th, 2006 at 10:36 am
Hey Zaphod,
It works for me, and my mice. The dolphins are having a bit of trouble though… probably the lack of hands.
geek out
September 26th, 2006 at 8:19 am
When I try to install the fuse-utils package it states it’s not available, but is referred to by another package.
What do I do know (being a Linux newbie)?
September 26th, 2006 at 10:28 am
Hi Michael,
What version of Ubuntu are you running? 6.06?
September 26th, 2006 at 11:48 am
why not just go to sys. settings disk and filesystem click on admin mode click on windows partition then new then in type choose ntfs then chech box to start at boot read and write then in files belong to user scroll through till you see your log name.do the same in the files belong to group then use divice owner may enable/disable then click ok . then reboot you should see it on desktop
September 26th, 2006 at 11:28 pm
it doesnt work…
mount: unknown filesystem type ‘ntfs-fuse’
September 27th, 2006 at 12:36 pm
First of all, I am 100% new to Linux/Ubuntu. I’m really, really looking forward to canning XP, but for now, need to share files and programs from the XP side of the computer.
I didn’t have any luck with this excercise. I’m going to paste what happened - please let me know if this is against etiquette. If anyone wants to email me to help me with this rather than post it here, I’d be extremely grateful. I anticipate this will take many “screw ups” on my part.
Here’s what happened, and again, apologies in advance if it’s not cool to post this:
administrator@Zink-Ubuntu:~$ sudo fdisk-l
Password:
sudo: fdisk-l: command not found
administrator@Zink-Ubuntu:~$ sudo fdisk -l
Disk /dev/hda: 60.0 GB, 60011642880 bytes
16 heads, 63 sectors/track, 116280 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 69711 35134123+ 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/hda2 107101 116280 4626720 12 Compaq diagnostics
Partition 2 does not end on cylinder boundary.
/dev/hda3 69711 105507 18040995 83 Linux
Partition 3 does not end on cylinder boundary.
/dev/hda4 105507 107100 803250 5 Extended
Partition 4 does not end on cylinder boundary.
/dev/hda5 105507 107100 803218+ 82 Linux swap / Solaris
Partition table entries are not in disk order
administrator@Zink-Ubuntu:~$ sudo apt-get install libfuse2 fuse-utils libntfs8 ntfsprogs
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
administrator@Zink-Ubuntu:~$ sudo apt-get install libfuse2 fuse-utils libntfs8ntfsprogs
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
administrator@Zink-Ubuntu:~$
September 28th, 2006 at 5:17 am
mmm. I’m ruinning kubuntu and am trying to mount and write to an NTFS usb drive and it keeps not working.
I get:
“Could not mount device.
The reported error was:
mount: only root can mount /dev/sda1 on /media/windows”
Boo.
Any thoughts?
September 28th, 2006 at 7:51 am
Hey Matt and Kevin - Here’s what I ‘m seeing from a quick look at your posts.
Matt, /dev/hda1 is your NTFS partition. When you try and install the various packages using apt-get it’s throwing an error saying that dpkg is already in use. Did you have Synaptic open? Or were you updating or downloading something else?
Kevin, as the error says, only the root user can mount a partition. Try runing the command as sudo - i.e. ’sudo mount blah blah blah’
good luck, let me know if this resolves your issues!
September 28th, 2006 at 12:32 pm
Thanks for the response, Arsgeek! I’m very excited and grateful that you responded.
Well, truth to be told (and this little tidbit will reveal just how little I actually know) I’m not even sure what Synaptic is - how can I determine if it is open? And what specifically is “dpkg”? Again, if it is easier and won’t clutter up this forum, feel free to email me instead.
Thanks - looking forward to figuring this out! Should be awesome!
September 28th, 2006 at 1:10 pm
Hey Matt,
No problem! Let’s keep it here and perhaps others can benefit as well.
Synpatic is the graphical package manager (i.e. program installer) that Ubuntu uses. It can be launched either by typing ’sudo synaptic’ in a terminal, or going to System->Administration->Synaptic Package Manager.
dpkg is the back-end that things like Synaptic and apt-get use to actually manage the install/removal/upgrade of various programs. That error looks to me like something already has dpkg running, so when you try and run apt-get, it’s told that it can’t have access to dpkg.
If you’re really not sure what’s going on you can try to do this in a terminal:
ps -ef | grep apt or
ps -ef | grep dpkg
If you find that a process is running (ps looks for running programs) then you know somethings got it going.
The easiest way to kill this for a new user is to either do a ‘kill -9 (process ID)’ or simply reboot.
Let me know how it goes - although I’m going away for a long weekend so I may not be around to help more until Monday.
September 30th, 2006 at 10:00 pm
You’re too kind, ArsGeek! You were right - as I recall, I was running some software updates. BUT. . . I still don’t have this working. I’m sure it is my syntax - maybe there is a good primer on this somewhere?
I’m going to email you if that’s okay to prevent my further newb embarassment.
October 2nd, 2006 at 7:46 am
Hi Jessica,
It’s a wordpress theme called Barthelme.
October 3rd, 2006 at 1:16 pm
I tried this and I have the same problem as Michael (Post #8), both that I’m a Linux newbie and that I have the same error. It prints the following after I enter “sudo apt-get install libfuse2 fuse-utils libntfs8 ntfsprogs” :
Reading package lists… Done
Building dependency tree… Done
Package fuse-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package fuse-utils has no installation candidate
I am using Ubuntu 6.06 LTS. If someone could help, I would very much appreciate it.
October 3rd, 2006 at 1:22 pm
Good timing Goluxas. I just emailed another user who’s also having this problem. Here’s what I sent:
Here’s where I’m thinking you may not have all of the repositories available that you need. See here:
http://www.arsgeek.com/?p=502
Not every program is available through the default repositories. You’ll want to modify your sources.list file (as shown in the above article) to enable everything. Then you should be able to download fuse-utils.
October 28th, 2006 at 7:14 pm
THanks arsgeek,
I was getting this error:
And this suggested page fixed it: http://www.arsgeek.com/?p=502
November 11th, 2006 at 4:17 pm
ok, so I did everything on this thread, and it worked beautifully! except, I did something.. I right clicked
the the icon it put on my desktop and “Unmounted” it.. now when i rebooted, i can’t get to it anymore! How can I get it back?
November 21st, 2006 at 12:24 am
this is very difficult for some one who has never used Linux and is using xp. Y dont some ppl make a program like bootcamp for this… so many xp users wud b able to check this linux thing.
December 17th, 2006 at 5:33 pm
same problem as prophet #35
January 2nd, 2007 at 4:01 pm
prophet #35, open your terminal and write: “mount /dev/hda1″ if windows part. is located under /dev/hda1.
January 26th, 2007 at 5:03 am
hi 2 all.
hello world! It is nice site. Keep working!
best regards
i found you here http://google.com ^^
January 31st, 2007 at 11:16 am
Thank you. This worked perfectly.
Now can you help me get my network running? I have two PC’s running XP and one running Vista (no kidding) and have tried all of the howto’s on the begginer forum and all I can see is a Windows Network logo. All three PC’s are running behind McAfee firewalls.
Thanks.
Joe
January 31st, 2007 at 4:05 pm
this worked perfectly..thx arsgeek
February 18th, 2007 at 6:26 am
Wait, isn’t this article a copy-paste from here:
http://ubuntuguide.org/wiki/Dapper#How_to_mount_Windows_partitions_.28NTFS.29_on_boot-up.2C_and_allow_users_read_and_write_access ?
March 1st, 2007 at 10:43 am
Thanks arsgeek,
It works for me, as opposed to some other howto that didn’t.
I tried to create a link to a folder in my Windows partition, but I get the message
Error “Generic error” while creating a link to “/media/windows/D”
Is there a way to create such a link?
March 2nd, 2007 at 5:23 pm
( gluks in here….(
March 5th, 2007 at 2:12 am
Hi ArsGeek, noob here running edgy / beryl all running ok.
got this first:
Errhttp://givre.cabspace.com edgy Release.gpg
Could not connect to givre.cabspace.com:80 (65.175.85.100), connection timed out
Errhttp://givre.cabspace.com edgy/main Translation-en_GB
Could not connect to givre.cabspace.com:80 (65.175.85.100), connection timed out
99% [Connecting to givre.cabspace.com (65.175.85.100)]
then tried sudo get-apt update and it returned the same message.
tried to open the url but “problem loading page”
then got to:
admin@admin-desktop:~$ gksudo gedit /etc/fstab
returned:
(gedit:7328): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.
then got to:
admin@admin-desktop:~$ sudo rm /sbin/mount.ntfs-fuse && sudo ln /usr/bin/ntfsmount /sbin/mount.ntfs-fuse
rm: cannot remove `/sbin/mount.ntfs-fuse’: No such file or directory
reboot and no windows mount
sorry for long post. any help appreciated.
March 7th, 2007 at 6:44 pm
hope you can help
i have 2 hds 1 is split in to one half xp the other linux
the problem is that i cant seem to get to the other hd where all my music and vids are stored how do i get to it
March 7th, 2007 at 7:41 pm
Hey Strider,
Can you open up a terminal session, type:
cat /etc/fstab
And paste what you get here? I can take a look at it.
March 9th, 2007 at 10:21 am
Hi, this didn’t work for me; though it says the ntfs partition is mounted, when I go to /the media/windows directory I can’t see any files.
Also, how do I unmount the partition?
March 14th, 2007 at 2:47 am
i followed the steps and got the error:
used the force option to work a mounted filesystem
mount failed
April 10th, 2007 at 1:45 am
Thank you furrball for giving us the easy, most helpful answer. If more people answered like you, Kubuntu would have many more users.
April 12th, 2007 at 4:24 am
Hello, thanks for the really easy to follow walkthrough!!
I followed it and i think it must have worked, but I’m in the same boat as Bhavya:
Bhavya says:
March 9th, 2007 at 10:21 am
Hi, this didn’t work for me; though it says the ntfs partition is mounted, when I go to /the media/windows directory I can’t see any files.
I’m a newb so I’m sure there must be something i’m missing, any ideas/advice?
Thanks a lot
April 12th, 2007 at 7:20 am
Hi Chrismcollins,
When you go into /media and do an ls, what do you see?
Currently my NTFS drive is mounted as /media/sda1.
Let me know what you see. Also, fee free to post the results of a ‘mount’ command and ‘cat /etc/fstab’.
AG
May 12th, 2007 at 2:23 pm
I am having the same problem. I know what is causing it, but I’m not sure how to fix it. Ubuntu is automatically mounting my NTFS permissions into /tmp/some_directory (you can see it if you go to the gui disk manager). I’m just not sure how to get it to stop doing this. Any help would be appreciated
May 12th, 2007 at 2:24 pm
NTFS partitions, not permissions.
June 2nd, 2007 at 3:47 pm
Great looking site so far!! I’m just starting to look around it but I love the title page! Please visit my site too:
June 2nd, 2007 at 3:47 pm
Nice page greetings to all in this guestbook! Please visit my site too:
June 2nd, 2007 at 3:48 pm
Amazing artwork! This is spectacularly done! Please also visit my site:
June 2nd, 2007 at 3:48 pm
Nice page greetings to all in this guestbook! Would you please also visit my site?
June 14th, 2007 at 4:09 am
This one makes sence “One’s first step in wisdom is to kuesstion everything - and one’s last is to come to terms with everything.”
June 27th, 2007 at 11:24 am
Just tried this and I am getting the same problems as the others above, where you browse into the directory in media and there is nothing there, it also appears to be unwriteable as you cannot create anything in there either. The disk manager shows it as not having a mount point and not enabled and when you try to create mount point and enable it that way I get an error with Fuse-utils. This is one a USB removable HDD on Fiesty.
Any ideas?
July 29th, 2007 at 6:43 am
/index. /index.
October 8th, 2007 at 2:17 am
I tried same steps to mount NTFS file system. It did not work. Now it shows unknown file system for hdc6. Please help in resolving this.
November 1st, 2007 at 10:33 pm
Does not work;
Tutorial needs work, its not clear:
-Tutorial does not say what version of Ubuntu this was tested on.
-Example of fstab entries does not correspond to early example of fdisk output…if it does I do not know how “sda1″ should now be “hda1″
to the people trying to mount NTFS:
try this if you want but dont waste anytime trying to figure out what you did wrong.
Mike
January 5th, 2008 at 11:36 am
Worked fine for me.
January 30th, 2008 at 3:06 am
umm, i know this sounds retarded buuut… i just set up ubuntu in this room, but the ethernet cable from my wireless router wont reach the room… i am aware that i have a wireless router, but i dont have a wireless adapter in the computer and i don’t want to get one and spend forever getting it to work with ubuntu (p.s. i’m a newbie) anywho!… i’d rather wait until i get a long ethernet cable, BUT!… i don’t even want to wait until i get an ethernet cable… so i’m basically asking if i can do all of this without internet connected?
January 30th, 2008 at 9:04 am
Hi Andrew,
Sure, it’s possible. What you’d have to do is download the necessary programs as .debs (libfuse2 fuse-utils libntfs8 ntfsprogs) which a quick google search should be able to find for you.
Pop those onto a thumb drive or a cd and then install them on your not-connected ubuntu machine. Then continue on with the steps.
Also note, if you’re installing 7.10 you may not need to do this at all. The newest Ubuntu does a pretty good job of support NTFS.
Ben
May 21st, 2008 at 7:39 am
This is ALMOST the go, but thanks for getting me pointed in the right direction. What should be mentioned is that Ubuntu mounts the windows drive as “disk” naturally (I’m not sure where or why yet), but only AFTER you press on the “disk” button or icon. Then and only then can your self and programs etc use that disk.
Therefore what most people want to see in their /etc/fstab file is. . .
/dev/sda1 /media/disk ntfs-3g defaults,nls=utf8,umask=007,gid=46 0 1
This will mount it every time (pending ” sda1 “) so that all programs can access it without hickups, and any c:/ related bookmarks will show straight away from boot. ie, I have redirected my “pictures”, “video” etc @ “Places” to the equivalent files in my windows drive - ” /media/disk/Documents and Settings/Guy/My Documents/My Pictures “, saving me lots of headaches and leaving my ubuntu drive free of clutter.
August 23rd, 2008 at 7:05 am
i-v tried this tutorial but it do not work’s
it said “Cannot mount volume. You are not privileged to mount the volume ‘Disk’” ‘disk’ being the name of the partition
October 15th, 2008 at 6:11 am
Found you through blogmad.. As the kids say… “Thanks for the tut”
October 30th, 2008 at 9:33 pm
Damn spammers. Ruin stuff for everyone.
November 21st, 2008 at 8:29 am
nice tips! its’ work like a charm!
December 10th, 2008 at 5:34 pm
LOVE the HHGTTG references!!!!
December 23rd, 2008 at 5:33 pm
While I am tempted to try this just for giggles, I’m a tad afraid of screwing up my system. Can any commenters confirm this works?
February 11th, 2009 at 10:15 am
Oh my, its what I looking for.
Its help me to fix HDD when it infected by virus or windows boot problems
May 28th, 2009 at 4:49 am
I just installed ubuntu 9.04 using virtual box on winXP. I am not able to see my windows partition through ubuntu. The folder manager does not show any folder named “Media”. I have gone through the replies on this page, but haven’t found a case that matches mine (unless I have missed it - sorry if I have). fdisk -lu does not show and partition with ntfs
Here are the fdisk and /etc/fstab contents:
prashanth@ubuntu:~$ sudo fdisk -lu
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0×000f15f5
Device Boot Start End Blocks Id System
/dev/sda1 * 63 15952544 7976241 83 Linux
/dev/sda2 15952545 16771859 409657+ 5 Extended
/dev/sda5 15952608 16771859 409626 82 Linux swap / Solaris
prashanth@ubuntu:~$
prashanth@ubuntu:~$
prashanth@ubuntu:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use ‘vol_id –uuid’ to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=316f12f8-f752-4c0c-b3a2-3e0bdac82b96 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=a27cab89-ca2c-4eb1-9df1-70ab57761c80 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
prashanth@ubuntu:~$
prashanth@ubuntu:~$
Can someone please tell me if there is anything to be done to see the windows partition on fdisk tables?