Operating Systems > Linux and UNIX
mounting windows partition
trc3:
Im using mandrake 8.0 and I want to mount the partition i have winXP on but when i go to /mnt/windows its the C: partition, witch isint the partition with windoze on it. I have XP on G: and all my mp3's ect on C: How would i mount the G: partition instead of C:? Thanks to anyone with any suggestions...
Calum:
okay, the partitions on your first hard drive (your only one if this is the case) are numbered as so:
hda1 = first partition
hda2= second partition et c,
so if you had a setup as follows:
and you wanted to get to the last partition, it would be hda4, since the numbering counts the windows partitions and the linux partition. The file relating to this device would be /dev/hda4 and you would mount it like this:
--- Code: ---
--- End code ---
here you are making a directory to mount it to, you can put this directory anywhere, it doesn't matter
--- Code: ---
--- End code ---
This means you are mounting partition hda4 of type 'fat32' (vfat) at the point '/mnt/windows2' which you just created.
If it's drive G: and you have a linux partition before it on the drive, then you need to substitute hda4 with hda6, and if the linux partition is after the G: drive on the physical disk, then it's hda5.
If you don't want to type all this in, and you want it to mount it automatically then you need to put a corresponding line in your /etc/fstab file, you can probably just copy the line for your C: partition which will already be in there and change the numbers.
I found this article invaluable in writing my /etc/fstab file, you should also do a 'man mount' to familiarise yrself on the strings you can add to the fstab file to specify the permissions of your newly mounted fat32 drive. And do 'man fstab' as well, it can't hurt!
edit - if your G: partition is on a different drive, it will be hdb or hdc instead of hda. The numbering of those drives is equivelant to the numbering of hda1, eg: hdb2 is the second partition on the second hard drive.
[ July 01, 2002: Message edited by: Calum ]
trc3:
Ok, i have two questions, you said if mounting fat32 the command is vfat, but winXP is ntfs what would i put in place of vfat? Is their a diffrence between the two?. Also you said "put a corresponding line in your /etc/fstab file, you can probably just copy the line for your C: partition" this is what i would like to do, but i have no idea what to change?
--- Code: ---
--- End code ---
i suppose this would be the line, but as i said i dont know what to change. Im not 100% sure but i think my linux partition is after the xp one, if that makes a diffrence...Thanks for the help...
[ July 01, 2002: Message edited by: trc3 ]
Calum:
okay,
--- Code: ---
--- End code ---
shows me that this /mnt/windows is mounted as fat32, and is on the fifth partition of the second hard drive, yes? (hdb5) so i have not got a clue where your G: partition will be physically, if that's where your C: partition is!
try typing "ls -al /dev/hd*" to see what choices you have, then mount each one and see what's in it, until you find out which one you are looking for.
Read this too, You need to recompile the kernel to add support for NTFS filesystems. Careful because NTFS support in linux is a lot more unstable than fat32 support, and the ability to write to a file is not guaranteed, while reading files is more or less okay, or so i have heard.
Recompiling the kernel is pretty easy, as it says, you should run either xconfig, menuconfig, or config. You will prefer xconfig i think, i have not used it, having used menuconfig which is pretty easy. It's a program that recompiles your kernel for you using a GUI, either point and click or menu based, depending on which program you are running, you then save the new kernel (don't overwrite your old one!) and when you boot up, use the new kernel and you should have ntfs support, so long as you added it when you recompiled. To boot into your new kernel, you might have to run whatever bootmanager program you use and add the new kernel to it. (lilo, or grub per example, i have not used grub, so master of reality, voidmain or somebody else would have to help you if you had questions about that)
Now, back to that fstab line, i think you need to read 'man mount' and 'man fstab' to know all the other options, i think you can just replace vfat with ntfs, but i have not done it, so best check the man pages before you go ahead. You might, as i say, want to change some of the other options too, the info required can be found in the same man page, but get it working before you do that.
trc3:
Thanks for the help Calum...
Navigation
[0] Message Index
[#] Next page
Go to full version