Whilst helping one of my readers install Ubuntu I came across a link on how to access information on a Windows hard drive from Ubuntu.
The link is specifically for people whose Windows installation has crashed and need to recover information via Ubuntu, but is equally useful for people who have a working Windows installation and need to share data between Ubuntu and Windows.
The instructions to follow in Ubuntu are as follows:
1. Open a Terminal window. From the menus at the top of the screen, choose Applications | Accessories | Terminal
2. Enter the following inside the Terminal window to create a folder which maps to your Windows hard drive. Be careful to ensure that you replace the reference to /dev/hda1 below with the device name of your Windows hard drive. I used the GNOME Partition Manager to find out the device name. You will also need to replace the reference to ntfs if your Windows hard drive uses another file system.
- cd /mnt
- sudo mk.dir windrive (remove the dot between mk and dir – I had to enter that here to get round a mod_security rule whilst creating this post!)
- sudo mount -t ntfs /dev/hda1 /mnt/windrive -o “umask=022″
- ls windrive
3. You should now a list of files from your Windows hard drive in the Terminal window. If you want a more graphical view of the files then do the following:
4. From the menus at the top of the Ubuntu screen Select Places | Computer
5. Double-click on the Filesystem icon
6. Double-click on the mnt folder we created earlier
7. You should now see a folder called windrive with all your Windows files inside
The complete post goes on to show how you can create a shared drive using Samba. Full credit to the original author. You may already know this information, but if not, I hope you find it useful.
- Leave a comment
- Subscribe
- FREE Newsletter
- del.icio.us
- Stumble it!
- Digg It

43 responses so far ↓
1 How To Access Your Windows Hard Drive From Ubuntu « Technical Itch // Nov 6, 2006 at 8:15 pm
[...] How To Access Your Windows Hard Drive From Ubuntu Posted November 6, 2006 [...]
2 Ethel // May 18, 2007 at 4:14 am
Thank you for this post! Just saved me a chance at a job – I need to update my resume on our computer that will no longer run Windows, and for some reason my husband who normally deals with this kind of stuff couldn’t figure out how to access Windows files in Ubuntu – he got stuck at how to mount the hard drive. And for some reason his Google search for directions didn’t turn up this page.
3 Dean // May 18, 2007 at 7:20 am
Glad I could help out!
4 Ben // Jul 21, 2007 at 7:58 am
hello, maybe you can answer my question, i guess i already had my hard drive mounted, im new at this by the way, i followed your instructions but i still have what i already had, a “read-only” disc. I need to be able to save file and what not to that drive. Any knowhow on how i might do that. Any help would be greatly appreciated, Thankyou
5 Dean // Jul 22, 2007 at 9:27 am
Hi Ben,
Can you confirm what you want to do. Are you trying to save a file to your Windows hard drive from Ubuntu?
6 Dean // Jul 22, 2007 at 6:44 pm
Here are a couple of links which I think might help:
http://onlyubuntu.blogspot.com/2007/03/widows-ntfs-partitions-readwrite.html
http://www.arsgeek.com/?p=585
Let me know if this works.
7 Access Windows Files booted from Kubuntu Disc (help meeeeeee!) - Linux Forums // Oct 21, 2007 at 8:04 pm
[...] How To Access Your Windows Hard Drive From Ubuntu Or this guide seems like it would be perfect but as soon as I get to this step…. ubuntu@ubuntu:/mnt$ sudo mount -t ntfs /dev/sda /mnt/windrive -o "umask=022" mount: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or other error In some cases useful info is found in syslog – try dmesg | tail or so that happens! whats going on? [...]
8 Installation Notes « Projects 2008 // Aug 10, 2008 at 8:08 am
[...] How to access your Windows hard drive from Ubuntu http://technical-itch.co.uk/2006/11/06/how-to-access-your-windows-hard-drive-from-ubuntu/ [...]
9 Matt // Sep 29, 2008 at 10:30 pm
I have done this and i can see my windows files but i cannot see any of my music, videos or pictures that are saved in the music, videos and pictures folders in my documents. It will just open as a blank folder. Any ideas?
10 Joe // Oct 11, 2008 at 4:08 am
Hi, after I enter udo mk.dir windrive into the Terminal i am asked by the terminal for the sudo password, i type in the next line of command and i dont know what the sudo password means
can you help me out?
11 Dean // Oct 11, 2008 at 9:04 am
Sudo is a Linux command which allows you to run programs which require special security privileges. More information here.
12 Joe // Oct 11, 2008 at 1:04 pm
ok, thanks
13 odnode // Oct 28, 2008 at 1:09 am
Thanks for this.
My Windows drive crashed (blues Screen of Death)
Trying to get at some data files via Ubuntu bu tit appears Ubuntu wants a Windows drive with clean shutdown. Please advice!~
$LogFile indicates unclean shutdown (0, 0)
Failed to mount ‘/dev/sda1′: Operation not supported
Mount is denied because NTFS is marked to be in use. Choose one action:
Choice 1: If you have Windows then disconnect the external devices by
clicking on the ‘Safely Remove Hardware’ icon in the Windows
taskbar then shutdown Windows cleanly.
Choice 2: If you don’t have Windows then you can use the ‘force’ option for
your own responsibility. For example type on the command line:
mount -t ntfs-3g /dev/sda1 /mnt/windrive -o force
Or add the option to the relevant row in the /etc/fstab file:
/dev/sda1 /mnt/windrive ntfs-3g force 0 0
14 Dean // Oct 28, 2008 at 9:17 am
odnode,
Is it an internal or external hard drive?
15 xkristx // Nov 15, 2008 at 4:50 am
hey… thanks for this post. i’m saving files now from dead vista… any tips on reinstalling vista x64 without making changes to ubuntu & still keep the dual os booting? thanks again. you’ve saved us lots of troubles. thanks!
16 audrey // Dec 6, 2008 at 9:33 pm
Thank you! This was very helpful for me. I’m a total newb.
17 Playing with Ubuntu at I Hate Google.org - Search Engine Optimization News and Tidbits (a.k.a. I Love Google.org) // Jan 21, 2009 at 1:55 am
[...] http://technical-itch.co.uk/2006/11/06/how-to-access-your-windows-hard-drive-from-ubuntu/ [...]
18 Tom // Apr 2, 2009 at 8:23 am
Thanks! That worked perfectly well
19 Naz // Apr 23, 2009 at 12:39 pm
Hi, first of all superb tutorial and thank you very much.
However whenever I reboot it just demounts. Anyway I can get it to automount when I log in?
20 Dean // Apr 23, 2009 at 4:05 pm
Naz,
The Ubuntu Forums should be able to answer your question. I found this thread which may steer you in the right direction.
21 Oky // Jul 20, 2009 at 5:09 pm
Dean,
Thanks for the tutorial. I can see the files but when I try to open and change them with gedit, I get the following error:
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details – 1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
Any ideas? Thanks.
22 Dean // Jul 20, 2009 at 8:06 pm
Hi Oky,
I’m not familiar with that error message so can’t offer much help. Searching on Google returned a number of results so that might be worth doing first.
Also, are you able to copy the files from Windows to Ubuntu and then edit them in Ubuntu without getting the error? Might help to narrow down where the problem is.
23 Dustin // Jul 22, 2009 at 9:59 pm
Thanks Alot!! It actually worked..Thank You
24 Ken // Aug 10, 2009 at 12:03 am
The hard drive I’m attempting to salvage is from an XP machine that mysteriously crashed several years ago. I had the os and all related applications on one drive and all of my media and files on a second slave drive, the latter of which I’m attempting to save. For one reason or another when the master went, it took the slave with it.
I’m having an issue with the “sudo mount -t ntfs /dev/hda1 /mnt/windrive -o “umask=022″” command.
I replaced dev/hda with the name of my drive, however the command only prompts my machine to refer me to the mount man pages.
It’s not listing any particular error though.
So now I’m a little stuck as to where to go from there
Any assistance would be greatly appreciated.
25 Dean // Aug 10, 2009 at 9:00 pm
Hi Ken,
Not sure what else to suggest. You could try the mount man page for possible ideas.
26 Prasad // Aug 25, 2009 at 7:34 pm
This was cool. Thanks a lot
cheers
Prasad
27 Ken // Aug 25, 2009 at 8:30 pm
Thanks Dean.
Actually many hours later, after running some other diagnostic software, I’ve come to the conclusion that something is physically wrong with the drive. It spins up, but I cannot read or write to it. The pcb doesn’t show any signs of shorts though. I’ve pretty much accepted that there’s a problem which I don’t possess the means to fix. So now I’m just debating whether or not to bother sending it out to attempt to salvage anything left on the platters.
Again, thank you for your assistance. I do appreciate it.
28 Snakebitezz // Aug 26, 2009 at 6:39 am
holy crap man u just saved me from having to redo everything i installed ubuntu from inside windows and this worked perfect because for some reason it installed on the same partition which i dont mind cuz i can just delete at anytime.. the linux… soooo yeah def keeping it cuz ubuntu has saved my @$$ soo many times cuz for some reason my old compy would just not start after xp sp3 installed and it would only happen sometimes so i just pop in the ubuntu live cd and bada bing linux saved the day!!!!
29 Tim // Sep 9, 2009 at 4:00 pm
OK, I tried it (for the umpteenth time). My computer sees the drive (DRV2_VOL1), but after I follow the steps, it still says unable to mount.
I am worried I made a mistake in loading Ubuntu on my clean drive and may have contaminated my Windows Drive.
The other problem is, I have no idea how to access Gnome Partition Manager. I looked and looked….
30 Vik // Oct 18, 2009 at 12:45 am
Hey, thank you very much. The command works perfectly but when I restart my computer I can’t access the drive. Windrive is empty until I run the command again. Any ideas how I can make this permanent?
31 Dean // Oct 19, 2009 at 9:57 pm
Hi Vik,
I’m sure there must be a way to do this but don’t know the answer. I’d have a look on the Ubuntu Forums. Here is one thread that may help.
32 Tim // Oct 19, 2009 at 10:04 pm
Heck, I pulled the Windows drive, bought an external enclosure and put it in that, and now access the drive as a USB mass storage device. It was a lot less trouble for an old un-techie preacher.
33 printing belfast // Dec 10, 2009 at 9:40 am
my hard drive are shut down and i need to recover some files cause its too important for me, and i find your blog very interesting on how do i recover it.
34 ashok khatana // Dec 14, 2009 at 8:06 am
hi Dean,
i am getting the below error while mounting the hard drives on UNIX , could you please help ?
————————————————–
khatana@khatana-desktop:/mnt/windrive$ sudo mount -t ntfs /dev/hda1 /mnt/windrive -o “umask=022″
ntfs-3g: Failed to access volume ‘/dev/hda1′: No such file or directory
ntfs-3g 2009.4.4 external FUSE 27 – Third Generation NTFS Driver
Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2009 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson
Usage: ntfs-3g [-o option[,...]]
Options: ro (read-only mount), remove_hiberfile, uid=, gid=,
umask=, fmask=, dmask=, streams_interface=, syncio.
Please see the details in the manual (type: man ntfs-3g).
35 Dean // Dec 14, 2009 at 6:07 pm
Ashok,
Not sure about that error. Try posting your question on the Ubuntu forums. You should get a reply there.
36 Swati Yelgulwar // Jan 25, 2010 at 1:28 am
My windows crashed and couldn’t be recovered by the systems tools. My saving grace is having Ubuntu dual booted and your blog. Thank you!
37 Michael King // Feb 9, 2010 at 7:09 pm
Thank you very much for posting, extremely helpful information!
38 Dan // Apr 29, 2010 at 5:06 pm
Hey um I don’t know my hard drive name and I can’t seem to download the Gnome Partition Manager! Any ideas on another way of finding the name of my HDD?
39 Web Design Portadown NI // Jul 26, 2010 at 1:44 pm
Unbelievable – been using ubuntu but tried this method and it worked first time. Should’ve checked the net before attempting on my own!
40 supertuxy // Jul 29, 2010 at 5:59 pm
Great thank you. i used it in ubuntu 10.04
41 minh // Aug 8, 2010 at 12:13 am
you should get some kind of internet reward for this! thanks for the good information
42 rebecca // Sep 2, 2010 at 12:06 pm
dean,
i need help.. i have a virus on my memory card from my summer trip. the pictures are quite important to me. the (damn) recycler virus wouldn’t let me transfer the pictures in windows, so i tried with ubuntu. with ubuntu, i imported all the pictures and transferred them to an external harddrive. the thing is, windows says the folder is empty when i try to open it. how can i make the files windows compatible?
43 Ken // Sep 2, 2010 at 1:16 pm
Rebecca,
The image files themselves should already be in a standard format usable by all platforms. It may by an issue of filesystem type on the external drive you’re using. (ie: a linux compatible filesystem like ext4, instead of something more versatile like ext3)
However, before you go formatting that drive, I’d suggest checking out WinSCP. It’s free. Installs on your windows machine. And has a user friendly interface to connect to your linux box, explore the filesystem, and transfer files directly to your windows machine (or visa versa).
Burning the files to cd or dvd should also work, with the added benefit of having a backup.
Leave a Comment