LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Reading Fat32 Hard Drive (https://www.linuxquestions.org/questions/mandriva-30/reading-fat32-hard-drive-88461/)

simplexr 09-02-2003 12:27 PM

Reading Fat32 Hard Drive
 
Hello all. I have recently installed Mandrake 9.1 as a dual boot with WinXP. After I had already installed Linux, I got a new hard drive (40 gig) and installed it as a second disk. I partitioned/formatted it in Windows to two 20 gig Fat32 partitions. I was under the assumption that Linux could read this, but I haven't been able to access anything on it via Mandrake. I opened Mandrake Configure (or whatever the management tool is called) and found that the drive was recognized in Linux and was denoted as "Windows" with "Win98 Fat32" partitions. Did I mess up here? Should I reformat. Or is there something else I need to "click" in Mandrake so that it can read it.

Thanks for your help.

jpbarto 09-02-2003 12:55 PM

so the new hard drive is installed as the slave of the primary IDE bus? (ie you have 2 hard drives)

if so then the two partitions are probably accessible via /dev/hdb1 and /dev/hdb2

to get a directory listing you will have to mount the drives...

'mkdir /mnt/win2'
'mount /dev/hdb1 /mnt/win2'
'ls /mnt/win2'

if all this works without a hitch (don't know if there's a mandrake gui for this ... prolly is) edit /etc/fstab to include these two new partitions so they are mounted at every reboot.

jpbarto

simplexr 09-02-2003 07:00 PM

ok, I did the

'mkdir /mnt/win2'
'mount /dev/hdb1 /mnt/win2'
'ls /mnt/win2'

thing (after fiddling around until I found the correct terminal) and it listed the contents of the first partition. Nothing about the second. Then you told me to

edit /etc/fstab

but the command 'edit' isn't recognized (I am using KDE Power User Terminal (or called something close to that)). I fooled around and finally used 'view /etc/fstab/' and (after figuring out what I was kind of doing) added the line

'dev/hdb1 /mnt/win2'
(and then a bunch of stuff that I copied from the "dev/hda1" line because it looked like it was used everywhere else (some font stuff etc.) )

Well, it did nothing. The /etc/win2 directory is empty when I reload linux, so I obviously guessed wrong.

Anyway, if you haven't guessed by now I am a linux nebie and probably shouldn't be screwing around with root privaleges on files which are important without more of a clue than I've got. So, if any of you could tell me what I should put in my /etc/fstab file that would be helpful.

Thanks.

quatsch 09-02-2003 07:45 PM

go to mandrake control center -> mount points and then click on disk drake. You will see all the drives and partitions that mandrake recognizes. Click on the two new ones and then choose a mount point for each. A mount point is a directory, btw. It should be an empty directory. That's what the
mkdir /mnt/win2
should have accomplished.

Hope this helps

Skyline 09-02-2003 11:36 PM

Quote:

edit /etc/fstab

but the command 'edit' isn't recognized.
The command you needed here would be

kedit /etc/fstab

That's why the command wasnt recognised.

To give us an idea of what youve currently got, open a shell and as root user.

cat /etc/fstab ; fdisk -l

(-l = hyphen small L )

and then post the results

Oddball79 09-02-2003 11:57 PM

ok.... here's a tip that all newbies need to know: man is your friend. If you don't know the syntax, options, or simply what a command does, type "man [command]" (man's short for manual). It may be thick at times, but you can figure just about anything out by looking at the man pages.

now, that said, read the man page for mount. It will probably help out alot. As for the other partition, that's fairly easy. You already know that the physical drive you're looking for is hdb. So, look in /dev for all the files that start with hdb. Chances are that the other partition is hdb2. Once you know what that is, then just create a new directory for the second partition and mount it there.

hope that helps.

simplexr 09-03-2003 11:11 AM

Thanks for all your help.

I read the man page for "mount" and after not too long got the two partitions to mount. Here is my /etc/fstab file

/dev/hda5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda7 /home ext3 defaults 1 2
none /mnt/cdrom supermount dev=/dev/hdc,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hda1 /mnt/windows ntfs iocharset=iso8859-1,ro,umask=0 0 0
none /mnt/zip supermount dev=/dev/sda4,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0
/dev/hdb1 /mnt/win2 vfat iocharset=iso8859-1,rw,umask=0 0 0
/dev/hdb2 /mnt/win3 vfat iocharset=iso8859-1,rw,umask=0 0 0

These last two lines are the ones I added. If there is anything wrong, please let me know. Also, I couldn't find anywhere what "umask=0 0 0" does, because I wasn't paying total attention when I edited this, I left it in. The mount seems to work, but does this umask thing do anything (or, rather, what is it supposed to do?)

Thanks again for all your guys' help.

Oddball79 09-03-2003 12:01 PM

yet another example of use the man page ;P

I'll help you out anyways though... umask is used to set the default of when you create a new file on that partition. You should also read the man page on chmod. It will be useful in the future (such as when you download a self-executable file and need to tell the system that it can be executed). You currently have the 2 windows partitions set so that all new files on them are defaulted to everyone being ablle to read, write, and execute them. The standard on *nix machines is to default to the owner can read and write, the group can also read and write, and everyone else can only read. This would be umask = 113. You should change it to this for security reasons.

And I know you will get confused when you read the chown, so I'll help you out there. Think about it like this, umask is set to block permisions, hence 1 = block exec, 2 = block write, 4 = block read. chmod is set to allow permisions, so 1 = allow exec, and so on. It does make sense once you bang your head enough times.

Again, hope that helps.


All times are GMT -5. The time now is 03:22 AM.