LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Accessing files from Windows Partition (http://www.linuxquestions.org/questions/linux-newbie-8/accessing-files-from-windows-partition-663162/)

ditto1958 08-16-2008 04:31 AM

Accessing files from Windows Partition
 
I have a laptop set up with Kubuntu and XP as a dual boot. My question is this: when I boot using Kubuntu, is there a way that I can see and access files that are on the Windows partition? For example, if I want to use the Open Office word processor, but I want to work on a file that is on the Windows partition, how can I get to it?

Nylex 08-16-2008 04:35 AM

You need to mount your Windows partition. If you don't know what the partition is "called" (e.g. /dev/hda1), then run "sudo fdisk -l" (that's a lowercase L) and you'll see a list of partitions with their filesystem types. You'll want to add an entry for your Windows partition to your /etc/fstab file so that it's mounted on boot. You'll probably want to read the man pages for mount and fstab ("man mount" and "man fstab", respectively).

ditto1958 08-16-2008 06:42 AM

Thank you. I don't know if I exactly understand how to do it, but now at least I know what I need to do.

GlennsPref 08-16-2008 07:15 AM

Hi, look for your windows partition under /mnt using a file manager like konqueror (kde) or something else.

The mnt directory is generally where you'll find other harddisks (not linux).

You may not have write privige/access to that drive if it is ntfs format(windows), but there is a way around this.

See how you go, Glenn

wabbalee 08-16-2008 10:03 AM

Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc /proc proc defaults 0 0
# /dev/sda4
UUID=7dbdaa36-0707-4871-98b2-69cfb4400a9c / ext3 nouser,relatime,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
# /dev/sda1
UUID=8be2778b-9c81-4844-bdf2-cc669273db94 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,utf8,atime,noauto,rw,dev,exec,suid 0 0
/dev/sda3 /storage vfat defaults,umask=000,uid=1000,gid=100,auto,rw,user 0 2

this a copy, for your perusal, of my fstab file. (k)ubuntu works with drive id's (UUID=7dbdaa36-0707-4871-98b2-69cfb4400a9c for example) which i find a little hard to interpret, but it works just as easy with '/dev/sdxy' (where x represents which physical drive and y represents the partition number).

the windows drive that I want to access in linux is called /dev/sda3

I created a folder in the root partition in a terminal with the following command: sudo mkdir /storage

the line in fstab that mounts this drive during boot with full access is:
Code:

/dev/sda3 /storage vfat defaults,umask=000,uid=1000,gid=100,auto,rw,user 0 2
this may be a security issue for some with regards to the fact that any user on the system can access and modify files on this system, but in most cases this it is what many of us home users want.

the syntax of fstab is not too hard to understand but i am no expert in this:

Code:

# <file system> <mount point>  <type>  <options>      <dump>  <pass>
where: 'filesystem' is the physical location of the drive

'mount point' is the folder you assign in which you can see the contents of this drive (you may use the already existing /mnt folder if you like)

'type' is the filesysystem type, in my case vfat (fat32) (never tried this with ntfs, though)

'options' is probably the most important one with regards to accessibility and i just copy that whole bit (defaults,umask=000,uid=1000,gid=100,auto,rw,user) over whatever ubuntu places there to make it work for me (like i said i am no expert may someone else can fill you in on this a bit better)

'dump' i have no idea

'pass' if set to 0 then the filesystem will never be checked for errors (if i am not mistaking), the next option is 1 but that may only be used for the root partition, and the last option is 2 and that should be assigned to the rest of the drives in the system that are mounted through fstab so they get periodically checked (every 30 mounts or so)

hope you can be creative with this and make yourself a nice fstab file

ditto1958 08-16-2008 09:32 PM

Wow, that was easy. I used Dolphin, found the partition and a window came up that said I couldn't mount the drive unless I entered my password. I entered it, clicked "ok," and it appeared.

wabbalee 08-18-2008 10:10 AM

Can you create and delete on it, without being the superuser i mean?


All times are GMT -5. The time now is 12:33 AM.