LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-24-2003, 07:16 PM   #1
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
mounting vfat fs


hi all,

i feel like i'm either missing something really simple, or there's actually an error with my hd. i'm trying to create a partition on my linux drive (hdb) with a vfat fs so i can access it from win98 (hda). all my other partitions are working fine, including hda itself, which is of course vfat. i've edited my fstab in any number of ways, using all of the following in some combination:

noauto, user, umask=000, owner, defaults

i don't know, maybe even a few more. every time i try to mount hdb2 it says:

mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
or too many mounted file systems


now an interesting thing i noticed is that as normal user i can see the files on the partition, but they're not recognized. this includes when i've unmounted the partition from a shell -- shouldn't this make the contents disappear? i'm beginning to think fdisk didn't do a proper job of creating the fs when i created the partition, but so far i haven't found a way to run fsck on a disk in use.....

can anyone help me??? please??

thanks!
 
Old 08-24-2003, 07:41 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Ok, first off check /etc/mtab to see if it's truly umounted. If it is, use:
mount -t vfat /dev/hdb2 /mnt/fat32 -o users,umask=000,noauto

As root, to mount the drive. If you get an error, post it up.

If the drive IS mounted, according to /etc/mtab, then, well, it's mounted. Umount it, and use the above to mount it again.

Make sure the mount point /mnt/fat32 exists (or use one that does..).

Post up what you get from typing:
/sbin/fdisk -l /dev/hdb

And tell us what distro (assuming Mandrake) you are running.

Finally, to run fsck on a mounted partition is suicide for most people, instead, login as root, and type:
telinit 1
To drop back to single user mode. Umount the device, then run fsck on it to check it out. After you are all finished drop back to your previous runlevel, assuming 3:
telinit 3
And startx backup (if you want) and mount the drive back up.

If all goes well, and you are happy with everything, edit fstab to have it reflect all your desires:
/dev/hdb2 /mnt/fat32 vfat users,umask=000,noauto,rw 0 0

HTH

Cool
 
Old 08-24-2003, 08:18 PM   #3
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Original Poster
Rep: Reputation: 33
ok, thanks for the response!

i'm running slackware 9.0, if that makes any difference...

i checked mtab to verify that it really was unmounted, then ran mount with your parameters, got the following message:


mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
or too many mounted file systems


i made sure the directory i'm trying to mount into exists, then ran fdisk, here's the result:


bash-2.05b# /sbin/fdisk -l /dev/hdb

Disk /dev/hdb: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 1926 15366172+ c Win95 FAT32 (LBA)
/dev/hdb3 1927 3649 13839997+ 5 Extended
/dev/hdb5 1927 2691 6144831 83 Linux
/dev/hdb6 2692 3456 6144831 83 Linux
/dev/hdb7 3457 3520 512000+ 82 Linux swap
bash-2.05b#


i tried those options in fstab, but got the same result, so now i'm dropping down to single user mode as you suggested, and will try running fsck. i'll let you know the results.

just to point out again, i had no trouble configuring my hda partition which is also fat32 - so i can't figure out why i'm having this problem!

anyway, running fsck now...brb

thanks,
 
Old 08-24-2003, 08:31 PM   #4
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Original Poster
Rep: Reputation: 33
i tried running fsck in single user mode on /dev/hdb2, and it gave me the following message:

fsck 1.32 (09-NOV-2002)
fsck: fsck.vfat not found
fsck: Error 2 while executing fsck.vfat for /dev/hdb2

just for fun i umounted my hda win98 partition (which is working fine and accessible) and got the same message.

what else can i try????
 
Old 08-24-2003, 08:44 PM   #5
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Original Poster
Rep: Reputation: 33
i searched around online and found that fsck.vfat calls dosfsck (or seems to anyway), so i tried that and it worked, but said logical sector size is zero -- what does that mean?
 
Old 08-24-2003, 08:55 PM   #6
Bensoft Kill MS
Member
 
Registered: Jul 2003
Location: KY
Distribution: Red Hat 9
Posts: 65

Rep: Reputation: 15
do this....

I Improvised and did this....

Log in as root, then under /, make a folder called dosc [or whatever you want]. Then put this in: /dev/hda1 /dosc auto root
0 0

Lemme know if that works
 
Old 08-24-2003, 09:50 PM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
How did you create the filesystem that's on that partition?

I'm guessing that you just created a partition, and gave it the partition ID of Fat32, but never actually created a filesystem on it?

Post back the steps that you took to create that specific partition.

Cool
 
Old 08-24-2003, 11:13 PM   #8
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Original Poster
Rep: Reputation: 33
that's right, and i just tried mkfs -t vfat, and it says mkfs.vfat command not found. so that's probably my problem...but where can i find that?

i do have mkfs.msdos, but that's not the same is it?

i'm lost....
 
Old 08-24-2003, 11:40 PM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Actually, the best way to do this is to create it from windoze. That way you can ensure that windoze can read/write to it, Linux won't have a problem dealing with it at that point as long as when you do create it make sure it's fat32..

Otherwise, you can download/install dosfstools:
http://http.us.debian.org/debian/poo....9.orig.tar.gz (first link I found you may wanna search for the actual homepage..)
And it should contain info on setting up a fat32 partition. IIRC it's along the lines of:
mkfs -t vfat -F /dev/hdx

But that should all be covered in the application's docs.

Cool
 
Old 08-24-2003, 11:46 PM   #10
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Original Poster
Rep: Reputation: 33
in the past, windows wouldn't even recognize that i had a second hard drive if it had linux on it, although i've noticed that now it recognizes something it calls D: but whether that refers to this partition or the unused space on the hdb, i don't know. any advice on how to partition in windows? should i create an msdos partition first so windows can recognize it in the first place?
 
Old 08-24-2003, 11:57 PM   #11
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
If this is XP pro you have a tool in the Administrator Tools that can read even 'unknown' partitions so you can format them with Windoze filesystems.

Other options are the obvious Partition Magic, or Ranish Partition Manager...

Cool
 
Old 08-25-2003, 09:51 PM   #12
Bensoft Kill MS
Member
 
Registered: Jul 2003
Location: KY
Distribution: Red Hat 9
Posts: 65

Rep: Reputation: 15
Quote:
Originally posted by MasterC
How did you create the filesystem that's on that partition?

I'm guessing that you just created a partition, and gave it the partition ID of Fat32, but never actually created a filesystem on it?

Post back the steps that you took to create that specific partition.

Cool
I used Data lifeguard tools that came with my new hdd and made one partition that was fat32 on each drive (I have a 2.5 gig hdd that I made my swap) I made ONE partition on each hdd, and installed windows. I set up my swap in windows as D:, and then installed RH9 and used disk druid. I used the free space that was big as my /, and then used the free space one my 2.5 gig as my swap. I now have a 1.25 swap in windows and linux.....nice, no? I had to put win 98 on first for some reason, and install xp over 98 while running 98. I kept the boot disk and booted up linux and when trying to mount my hda1 [xp] I got an error that said my fstab file didn't have hda1. In root, I made a dosc folder under /, and then edited my fstab file as I mentioned above. I am really new to linux and got lucky trying out stuff I guess. Sorry about the spamming......it seemed to fit under all of tehm , and I figured someone had to know somewhere what my problem was.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vfat Mounting Problems Altec_ Linux - Hardware 0 02-07-2005 12:54 PM
Need help mounting a VFat partition r/w frandres Linux - Newbie 7 01-17-2005 07:31 AM
Mounting Vfat paradoxlight Linux - Software 4 01-15-2002 06:29 PM
Mounting with Vfat garr71 Linux - General 4 11-29-2001 04:19 AM
Mounting a vfat filesystem in RH 7.2 M.I. Linux - General 8 11-28-2001 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration