LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Accessing FAT32 drives in RH9 (https://www.linuxquestions.org/questions/linux-newbie-8/accessing-fat32-drives-in-rh9-142605/)

jamyskis 02-05-2004 08:45 AM

Accessing FAT32 drives in RH9
 
Does anyone know if it is possible to access a FAT32 Windows drive in RH9 either from the terminal or (preferably) to create a mount point so I can just use it in X? Thanks.

acid_kewpie 02-05-2004 08:52 AM

easy:

mount -t vfat /dev/hda1 /mnt/windows

this will then give you access at /mnt/windows. if this works you can then easily create a permanent entry in /etc/fstab

Demonbane 02-05-2004 08:56 AM

to mount a fat32 partition:

mount -t vfat /dev/hdXX /some/mount/point

of course you have to figure out where your partition is(eg. /dev/hda2) and actually create a directory for the mount point.

jamyskis 02-05-2004 09:06 AM

So basically it goes...

mount : Obvious really - to mount a file system
-t : Dunno, the command itself will probably explain all the switches
vfat : Meaning "virtual FAT" (something which overweight people would find bemusing :-p )
/dev/devicename/ : Where the device tag is actually located like /dev/cdrom/ being the first CD-ROM drive.
/mnt/whereever/ : To say where I want the filesystem to point to.

...right?

I'd been seeing mentions of /etc/fstab and I was guessing it meant "file system table". I'll take a look at that.

Cheers acid_kewpie and Demonbane!

bnice 02-05-2004 12:42 PM

IF you have vfat & msdos fs support in your kernel (built in or module):
assuming windows is on the first drive / first partition

code{

mkdir /mnt/windows

mount -t vfat /dev/hda1 /mnt/windows

} /code

the -t flag is for filesystem type

if you don't have support in the kernel, it'll never fly

bnice 02-05-2004 12:45 PM

if it works, add the following line to /etc/fstab:

/dev/hda1 /mnt/windows vfat defaults 0 0


then it will automagically mount every time you boot

Cheers
b

wgroom 02-05-2004 02:50 PM

I have a question in reference to the to 0's at the end of the line, what are they for and I have seen other numbers on other lines like 1 2

bnice 02-05-2004 05:21 PM

clipped output from `man fstab`:



The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in
which filesystem checks are done at reboot time. The root filesystem should be speci-
fied with a fs_passno of 1, and other filesystems should have a fs_passno of 2.
Filesystems within a drive will be checked sequentially, but filesystems on different
drives will be checked at the same time to utilize parallelism available in the hard-
ware. If the sixth field is not present or zero, a value of zero is returned and fsck
will assume that the filesystem does not need to be checked.


In other words, 0 0 means "do not run fsck on this drive"

Checking a vfat drive would probably make fsck barf all over your screen

wgroom 02-05-2004 08:24 PM

Thanks very much.

eaglesfan17 02-10-2004 07:54 AM

Is this the same process with NTFS drives? Or is the command different?

bnice 02-10-2004 01:53 PM

Quote:

Originally posted by eaglesfan17
Is this the same process with NTFS drives? Or is the command different?
since write support is limited on ntfs, I would use:

Code:


/dev/hda1      /root/xp          ntfs        ro,auto,nouser,async  0  0

this is my setup, you will need to change `/dev/hda1` to point to your ntfs drive, and change `/root/xp` to point to your mount point.


so, assuming your ntfs drive is first partition, first drive(typically C:\) if you do:


Code:


mkdir /mnt/xp
mount -t ntfs /dev/hda1 /mnt/xp
ls /mnt/xp


you should see the contents of your C drive.


to automount at boot, add the following line to your /etc/fstab:

Code:


/dev/hda1      /mnt/xp          ntfs        ro,auto,nouser,async  0  0


ZEPP 02-12-2004 08:41 AM

Quote:

Originally posted by bnice
IF you have vfat & msdos fs support in your kernel (built in or module):
assuming windows is on the first drive / first partition

code{

mkdir /mnt/windows

mount -t vfat /dev/hda1 /mnt/windows

} /code

the -t flag is for filesystem type

if you don't have support in the kernel, it'll never fly

I have RH9 running, and have properly mounted my CD ROM and Floppy drives. But, I have created a single FAT32 partition on a 2nd hard drive which XP properly recognizes and uses as "D:"

When I use the above commands (as: mount -t vfat /dev/hdb1 /mnt/hdb1), I receive the error:
wrong fs type, bad option, bad superblock on /dev/hdb1,
or too many mounted file systems

An attempt to mount the drive via fstab produces exactly the same message on boot.

Help! Any ideas?

TIA,
ZEPP

michaelk 02-12-2004 09:24 AM

Is your drive really connected to 1st controller slave?
Make sure its really hdb1 and really FAT32
log in as root
fdisk -l /dev/hdb (that is a small L)

Did RH configure the drive for you? Check /etc/fstab for an entry and mount command to see if it is really mounted.

ZEPP 02-12-2004 09:35 AM

Fdisk returns:

[root@rdu57-241-252 root]# fdisk -l /dev/hdb

Disk /dev/hdb: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 9726 78124063+ c Win95 FAT32 (LBA)


Mount returns the error I cited above. I entered the line:
/dev/hdb1 /mnt/hdb1 vfat ro,auto,nouser,async 0 0
directly to fstab, which produces the same error on boot.

argh.

Thanks for your help.
ZEPP

ZEPP 02-13-2004 01:44 PM

Well--solved the problem, thanks to a friend who stopped by last night.

The problem was really quite simple--this version of Linux does not support a FAT32 partition greater than 32 mb. As soon as we re-partioned the drive, everything works fine.

Cheers,
ZEPP


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