-   Linux - Newbie (
-   -   Mounting a logical partition... (

J_Bone 08-17-2003 01:39 AM

Mounting a logical partition...
Greetings from an uber-newbie....

Pretend you know nothing about Linux, but just installed Red Hat 9.0 (like me :D). Now, I also have Windows XP on the same hard drive (NTFS), as well as a logical (FAT32) drive. XP recognizes the logical drive, but for the life of me I can't figure out how to mount it in Linux; my goal is to use that logical partition for both OS's.

I've looked through these forums quite extensively but I'm afraid I really need to know every detail: for instance, I think I open the terminal (or press control+alt+1?)... is this where I start? And then what code need I enter?

Sorry if my explanation seems a little convoluted, but I am still a little lost:confused:

Thx in advance.....


slakmagik 08-17-2003 01:47 AM

Open a terminal or get to a prompt (ctrl-alt-F1) and do 'fdisk -l'. You should see a reference to, say, an /hda5 that's formatted as fat. If so, do 'mount /dev/hda5 /mnt/whatever mount point you have handy'. And this fdisk (and probably mount) will need to be done as root. It sounds like what you're confused about is the Linux partition-naming system. Extended partitions start at 5. :)

J_Bone 08-17-2003 01:53 AM

Hmmmm OK I know which "hda" it is (5 as a matter of fact, but I'm at work right now can't check :p ), and I can sign in as root..

What do you mean by "whatever mount point you have handy"? Don't I type "FAT32" or something there?

And I read somewhere about having to alter fstab in order to have the drive remounted each time I log in.... now I found fstab (via search, a read-only file), but it wouldn't let me change it.... how do I change it, and what need I put in?

Thanks for your help,


slakmagik 08-17-2003 01:57 AM

Oh. Oops. :) Okay, then it's just 'mount /dev/hda5 /mnt/whatever'. You shouldn't need a -t option (for fstype) but you do need a mount point - an empty directory to incorporate the drive into the root filesystem. It may just be /mnt or it may be /mnt/hd or something of the sort. And fstab shouldn't be read-only. If it is just chmod it and add a line about the partition and it'll automatically mount on boot. I'll come back and post the line shortly if someone else doesn't before me - I have to run to another site real quick first. :)

J_Bone 08-17-2003 02:06 AM

OK thanks! I'll wait :D

slakmagik 08-17-2003 02:45 AM

Sorry about that - I think it's 'chmod 644 /etc/fstab' - it should have

-rw-r--r-- 1 root root

anyway. And then fstab should say something like

/dev/hda5 /mnt/shared vfat auto,users 1 0

My mount point's called 'shared' so modify that to whatever yours is. :)

J_Bone 08-17-2003 02:47 AM

Thanks, I'll try it when I get home (one hour :D)

I'll post after I try it :D

Skyline 08-17-2003 07:42 AM

Hi J_Bone

To mount your FAT32 "logical partition" automatically on Boot-up

First - Create a mount point :

Open a shell and type :

Then type you root password then type :

mkdir /mnt/windows

Then - open /etc/fstab with:

kedit /etc/fstab

Then - put an entry at the bottom of your /etc/fstab file on a new line - (just substitute in your Partition and Mount point in place of my example ones)

/dev/hda1 /mnt/windows vfat defaults,umask=000 0 0

J_Bone 08-17-2003 01:52 PM

Thanks Digiot and Skyline!!

It's working now :D!

I blundered my way upon it.

One note: I used gedit /mnt/window, not regid /mnt/window (still works).

I can now use the gimp to upload the Jpeg in the folder!!

Thanks very much!

One question: I believe I mistakently created a couple of directories by accident, called /fat and /fat/?

Should I delete them, and if so, how? They may have deleted upon restarting because I can't find them....

I have many more questions about Linux but I am happy for now!

slakmagik 08-17-2003 08:09 PM

That's strange. If they disappeared I guess it's not an issue. :) If you do come across them maybe you did accidentally create them or they might have been the default mount points for RH - I can't think of any reason Linux would *need* them so they should be safe to delete. 'cd path one level above fat' + 'rmdir -p fat/fat'. That's assuming they're newly created directories or unused mountpoints, so empty, and that I understood correctly that a second 'fat' was a subdirectory of the first. Or just use a TUI/GUI file manager like mc or - are you using Gnome? - Nautilus.

J_Bone 08-17-2003 08:26 PM

Well, (and once again forgive me, the terminology is all a little new to me, ) what happened was I had been trying to mount the drive by following another thread, but it wasn't working for me.

In the process of trying to mount it, I created the directories /mnt/fat, /mnt/fat32, /mnt/window and /mnt/windows. The problem was, I couldn't figure out how to edit the fstab, but Skyline's method worked for me (although I had to change the line kedit /etc/fstab to gedit /etc/fstab..)

I started another thread asking how I delete these directories (yes I am the UBER-newb) and MasterC showed me how to rm -r them....

All is great now! Now for this offline message thing (see other thread :p )

Thanks for the help digiot.

slakmagik 08-17-2003 08:35 PM

Ah, I see. :) Sorry for not specifying that - it's just one those 'text file with your favorite editor' things. Glad MasterC had you covered. And somebody will get to your gaim issue - I've used it a couple of times but never paid any attention to the offline messages part. Anyway - no problem, glad to help what little I can. :)

All times are GMT -5. The time now is 12:08 PM.