Access Windows partitions under Kubuntu
As I noted earlier, I installed Kubuntu on a 15gig partition on my drive. One of the things I wanted to do was be able to access my Windows partitions from my Kubuntu desktop. I have 3 windows partitions on my drive:
- C Drive - For XP and Application
- Audio - for Mp3s and music videos
- Media - For Videos
To automate the process of mounting these partitions on boot time; we are going to edit the fstab file located in ‘/etc/fstab’. fstab is a configuration file that contains information of all the partitions and storage devices in your computer. Before we continue any further; please make a backup of your existing fstab file.
% cp /etc/fstab ~
Now lets find out where my Windows partitions are. We are going to use the ‘fdisk’ command
navdeep@shergillpc:~$ sudo fdisk -l
Disk /dev/hda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 7649 61440561 7 HPFS/NTFS
/dev/hda2 7650 18345 85915620 f W95 Ext'd (LBA)
/dev/hda3 * 18346 19929 12723480 83 Linux
/dev/hda5 7650 12748 40957686 7 HPFS/NTFS
/dev/hda6 12749 17847 40957686 7 HPFS/NTFS
/dev/hda7 17848 18273 3421813+ b W95 FAT32
/dev/hda8 18274 18345 578308+ 82 Linux swap / Solaris
Reading that output; I was able to figure out that my audio/media drives were listed as ‘/dev/hda5′ and ‘/dev/hda6′. It helps to know that both of those partitons were 40gig.
Now we will edit the fstab file to mount them. Typically; you would want to mount them under the ‘/mnt’ directory. Thats where I will mount them. Lets go ahead and set up the ‘/mnt’ area. I will create two directories there.
% sudo mkdir /mnt/audio
% sudo mkdir /mnt/media
Now we are ready to mount the drives. I am going to edit the fstab file and enter these two lines
/dev/hda5 /mnt/audio ntfs ro,nls=utf8,umask=0222 0 0
/dev/hda6 /mnt/media ntfs ro,nls=utf8,umask=0222 0 0
Now these drives will mounted at boot time; but we can mount them right now if we wanted by running this command.
% sudo mount -a
You can ‘cd’ to the /mnt directory to verify that your drives were mounted. What I am going to do next is create a link to them on my desktop. ‘Right-click’ on the desktop; and choose ‘Create New->Link to Location’. You will see this dialog box; enter in the link information.

This will give you a generic looking icon on the desktop. What we want is something that actually looks like it contains Audio files. Thats easy to fix. Right-click on the newly created Icon and choose ‘Properties’. In the Properties window; click on the ‘icon’ and it will bring up a list of icons to chose from. I chose the ‘Audio CD’ one under the ‘Devices’ category. You can also see what my Desktop looks like now.
|
|
|
Update As some people pointed out; this will make the mounts ‘read only’. If you wish to write to NTFS partitions; use this Link .
If you liked this guide; please digg it.
very nice
Great guide, new Linux users generally have a Windows partition they’d like to access. The only thing I’d add is that doing it the way the article says makes the entire Windows partition readable by every user, as Windows access permissions don’t do anything on Linux. On a multi-user system, this may not be what you want, so what I put in my /etc/fstab was this:
/dev/hdb1 /mnt/windows ntfs uid=username,gid=groupname,umask=227 0 0
thus giving the user “username” and the group “groupname” read and execute permissions, and none to everybody else. Note that the umask is like a chmod value, except it lists the permissions that are NOT enabled. so 027 would give the owner full access, the group read and execute access, and everyone else no access.
awesome, just what i needed. The same process should work on regular Ubuntu too right?
thanks
An alternative is to make the mount points under /media instead of /mnt. (K)Ubuntu will then automatically make desktop shortcuts for all drives mounted in /media (this is ohw it works for USB drives, etc).
Cómo tener acceso a la partición de Windows desde Kubuntu…
Para los novatos como yo. Un mini-tutorial con imágenes sobre cómo tener acceso a la partición de Windows desde Kubuntu. Ignoro si hay otra vía más sencilla. Vía Digg. En inglés….
But you still need to be in administrative mode to get access to those files (well, the ones on an NTFS drive).
How do you automate that so that you can browse with the file manager rather than using terminal to Command-Line navigate?
[...] A short guide with pictures on how to put windows partitions on your desktop.read more | digg story [...]
How it works for me:
$ sudo su
$ mkdir /media/ntfs
$ chmod 0755 $!
$ exit
then put in /etc/fstab
/dev/sda1 /media/ntfs ntfs auto,users,umask=0 0 0
where the /dev entry is your windows partition. No I can mount/unmount the partitions from any user desktop.
Have a nice day
It’s worth mentioning to your readers (especially since your write-up has been linked on Digg) that the mounts are read-only — using the procedure you outline readers will be able to read files off the drives but not write files back. That’s likely to confuse some beginning users.
I thought writing to ntfs partitions was still a bit dodgy, hence the ‘ro’ on the mount options in the article. However, I note that posts mount the partitions without this option. Asking for trouble, or am I just out of date?
the other thing that might help is a step on how to “edit the fstab file.” Maybe a command for us n00bs.
Another thought - in Ubuntu, right clicking on the desktop doesn’t give the “create link to file” option. Is that a KDE thing?
I guess it was a ‘KDE’ (Kubuntu) only option. Maybe someone can help you figure out what the corresponding thing is in Ubuntu.
As far as editing your fstab file; you can use any of the command line editors (like emacs/vi); or use a GUI editory. I believe there is a ‘gedit’ in Ubuntu.
% sudo gedit /etc/fstab
should work…
[...] Wow; I never thought that this day would come. I have been averaging about 100 visitors a day; so it was a big shock for me when I logged into my Performancing Metrics and saw that I had over 1700 visitors. This was around 12pm this afternoon. Well; turns out that my Guide on how to access windows partitions from Kubuntu made it on the first page of Digg. A big welcome to all the new surfers… [...]
Doh! If only I had known this 3 weeks ago.
[...] A short guide with pictures on how to put windows partitions on your desktop. [...]
[...] read more | digg story [...]
How to access Windows partitions in Linux…
When you’re in linux, and dual booting, one of the biggest concerns is accessibility of your data. Never fear. You can always access Windows partitions within Linux. Here, the tutorial concentrates on the Kubuntu flavor, but the idea behind it……
[...] Guide to access your Windows Partitions [...]
[...] So, for anyone who needs help accessing an NTFS partition using, here’s Navdeep Shergill’s guide to mounting Windows partitions under Kubuntu. This works well under the Kubuntu Dapper Drake release. Tags: Hacks, Kubuntu, Linux, NTFS, WindowsShare and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages. [...]
Something I found shortly after your page was this… full Read/Write support for NTFS that so far appears quite stable although its still considered beta/expiremental.
Thanks for the info though! It was helpful.
-Karl
perfect, thanks!
Dear Shergill,
I am facing problem during accessing NTFS partition by GUI in Ubuntu 6.06, its working in readable with CLI mode. Can you help me how can i access NTFS partition with GUI.
if possible, reply at juneja.dinesh@gmail.com
Hi, does it make a difference if your windows partitons are in fat and not ntfs? I’m facing a problem , unable to mount them sucessfully.
[...] A short guide with pictures on how to put windows partitions on your desktop.read more | digg story [...]
Awesome guide mate, thanks heaps it solved exactly what i needed to do. I was having permissions problems accessing an ntfs partition mounted on dev/sda# and this fixed it totally.
Cheers,
Timski
I use Kubuntu. When i start it, i can see all hd in my system and i can access to them in read mode. The problem is, no write is possible in other hd. I write only in my /home/ali directory.
What’s wrong? I don’t have installed any thing like ntfs package utility.
Bhaji,
tusi great ho.
comments no u looking very nice da navdeep u i am dream boy chellam replay plssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ok va