PDA

View Full Version : Access Windows partitions from Linux



Mike
19-01-2005, 10:24 PM
I just installed FC3 (I found some spare CDs ;)), and created a Openoffice document which I wanted to save to one of my Windows partitions, however I couldn't find any. I ended up having to email it to myself...

Where do I look for Windows partitions while in Linux? I thought I had to mount them or something, but nothing I tried worked.

I have 3 Windows partitions - 2x NTFS (both 40gb) 1x FAT32, plus Linux on 12gb (3 partitions I think?)

Any help appreciated :)

Mike.

beama
19-01-2005, 10:49 PM
Mike
I take it you can ping the machines
You also need Samba installed
Im not sure about FC3 but FC2 was easy to setup. Once Samba was installed and configured I just used unc pathing ( \\computername\sharename) in the properties of a what technically in linux speak is a symbolic link, on my desktop (shortcut) to access the windows share.
Jen or Chill will hopefully see this as Im still learning about Samba (the hard way :D)

johnd
19-01-2005, 10:57 PM
As I read it - SAMBA is not needed since all partitions are on the same PC are they not?

As root, use fdisk -l /dev/hda (assuming all partitions are on the same (primary) drive). This will tell you which partitions are which.

I think you need to install extra software to mount and use a NTFS partition. FAT32 is out of the box.

If you have a directory called (say) /mnt/fat32, and the FAT32 parition is (say) /dev/hda5, then as root issue this command:

mount -t vfat /dev/hda5 /mnt/fat32

Hope that helps.

John

johnd
19-01-2005, 10:59 PM
[QUOTE=johnd]
I think you need to install extra software to mount and use a NTFS partition. FAT32 is out of the box.

/QUOTE]
See:
http://linux-ntfs.sourceforge.net/rpm/index.html

vinref
19-01-2005, 11:05 PM
A good brief guide for NTFS is here (http://www.linuxforum.com/linux_tutorials/1/1.php) . Read the warning regarding to writing to NTFS at the bottom, especially as it regards RedHat. Fat32 write access is straightforward and is as per the instructions in the guide.

beama
19-01-2005, 11:16 PM
Mike
I take it you can ping the machines
You also need Samba installed
Im not sure about FC3 but FC2 was easy to setup. Once Samba was installed and configured I just used unc pathing ( \\computername\sharename) in the properties of a what technically in linux speak is a symbolic link, on my desktop (shortcut) to access the windows share.
Jen or Chill will hopefully see this as Im still learning about Samba (the hard way :D)

my bad, should have read the question again missed the partition bit

Chilling_Silence
19-01-2005, 11:21 PM
Try googl'ing for captive-ntfs if you want to write to your NTFS partitions.

Beama:
Why not just ask?
http://nzlinuxfaq.orcon.net.nz/networking/networking_samba.html
^^ I drew that up ages ago, but it should still be relevant

beama
19-01-2005, 11:32 PM
Beama:
Why not just ask?
http://nzlinuxfaq.orcon.net.nz/netw...king_samba.html (http://nzlinuxfaq.orcon.net.nz/networking/networking_samba.html)
^^ I drew that up ages ago, but it should still be relevant

cause Im stubbon :D
I use linux howtos linux forums alot

Chilling_Silence
19-01-2005, 11:38 PM
Search PressF1 too... Especially for Samba stuff.. Ive posted things like how to run it from old knoppix's etc and a million and one other things ;)

hamstar
20-01-2005, 12:44 AM
To mount your hard drives, simply type su - and type in your root password,

then type mount to see wats mounted.

If you want to mount something type mount --help to get the syntax for it.

johnd has told you correctly in saying


mount -t vfat /dev/hda5 /mnt/fat32


however if you don't have /mnt/fat32 made already you'll get an error...

Also, if you're in root (which you have to be, for this method) that drive will only be available to root.

So on the end of mount -t vfat /dev/hda5 /mnt/fat32 you'll have to add:
-o auto users,nohide 00 so it'll be:

mount -t vfat /dev/hda5 /mnt/fat32 -o auto users,nohide 00

Then you must cd to /mnt and run this command:
chmod -R 777 fat32

I'm pretty sure thats how chill told me to do it a while ago....

Also another link for ya NTFS: http://www.jankratochvil.net/project/captive/

Mike
20-01-2005, 08:01 AM
however if you don't have /mnt/fat32 made already you'll get an error...

My /mnt is empty... so how do I get things in there first?

Mike.

johnd
20-01-2005, 08:55 AM
From a root terminal type:

mkdir /mnt/fat32 (or whatever you want the new directory name to be).

Graham L
20-01-2005, 01:27 PM
And, of course, it won't work if the Windows partition isn't hda5.;) In fact, if Windows existed before you loaded the Linux, it's probably hda1.

The /mnt location is part of the new standard linux file system layout. I usually put /floppy, /cdrom, and /MSWindows,etc, mount points at the top level "/". Makes less typing because I do most things with command line.

johnd
20-01-2005, 02:36 PM
And, of course, it won't work if the Windows partition isn't hda5.;) In fact, if Windows existed before you loaded the Linux, it's probably hda1.


True - but from the original post there are two NTFS partitions both (probably) before the fat32 one so the partition in question won't be hda1.

Chilling_Silence
20-01-2005, 02:47 PM
cat /proc/partitions

Mike
20-01-2005, 05:00 PM
I usually put /floppy, /cdrom, and /MSWindows,etc, mount points at the top level "/". Makes less typing because I do most things with command line.

How do I do that Graham? Do I just leave off the /mnt when creating and associating the mount points?

Mike.

Chilling_Silence
20-01-2005, 06:52 PM
Correct :)

Be sure to be doing this all as root thou!

Mike
20-01-2005, 09:54 PM
Right, well that all seemed to work... however after a restart I lost the mount point - do I have to type all that in everytime I boot up?

Mike.

johnd
20-01-2005, 10:50 PM
YOu need to add an entry to the /etc/fstab file to enable mounting at boot time. Follow the syntax for other hard disk partitions mounted at boot time.