(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to tag@lists.linuxgazette.net

There is no guarantee that your questions here will ever be answered. You can be published anonymously - just let us know!


(?) about a stubborn mount error

From Gabriel Florit

Answered By Heather Stern

Dear Linux Gazette,

I come to you hoping that I might finally solve this problem. I have extensively searched newsletters and IRC sessions, but nothing. Most users give up after an hour or so, telling me they have no clue. I hope you do... :)

(!) [Heather] Interesting. What suggestions have they offered that didn't work?

(?) I am running RH7. I have two hard drives, a 10G and a 40G. The 10G is the master one, no partitions, and it is where i have my win98 system. The 40G is divided into four, where I have a swap, two linux natives, and a dos partition, as storage for the win98 system. Now, when I am in Win, I see both C (the 10G) and D(the dos partition of the 40G). But when I am in linux, i only see hda1, that is, the 10G drive. sfdisk -l tells me that the dos partition in the 40G drive is hdb7, but when i try to mount it using


mount -t vfat /dev/hdb7 /mnt/win

or


mount -t msdos /dve/hdb7 /mnt/win

i get an error that says

mount: wrong fs type, bad option, bad superblock on /dev/hdb7,
       or too many mounted file systems
(!) [Heather] Let's investigate each of the three points.
You're certainly able to see the rest of /dev/hdbN, otherwise, your complaint would be about Windows making Linux not work.
Wrong fs type:
There are numerous partition types usable by Windows these days. You mention that sfdisk -l says /dev/hdb7 is your dos partition, but not which type that it is.
I've been hearing that WindowsME has slightly tweaked their partition type; this gave both Partition Magic and parted fits. So... while in most cases we here at the Gang wouldn't care... which flavor of Windows do you have, and do you have any Security updates or service packs? How did you make the D: drive?
Anyways I assume that you have the msdos and vfat filesystem support properly installed since you say that getting /dev/hda1 mounted isn't a problem. So my first guess would be that /dev/hda1 and /dev/hdb7 are different flavors of DOS partition.
Bad option:
Your command lines looked okay to me. Assuming /mnt/win exists.
Bad superblock on /dev/hdb7:
Well, I suppose there might be something subtle that really is wrong with your D: and Linux is just being extra super duper cautious. So perhaps you have run the Windows disk checker with all the "yes check everything thoroughly" options turned on. (As opposed to their normal mode, where they skip time consuming things like looking for bad spots on the drive.)
just curious, does /dev/hdb7 straddle the 1024 cylinder boundary? I've never heard of mount caring about that, but, it is in the middle of a huge drive, so...

(?) I have created the win dir in the mnt dir. (lots of people seem to ask me that).

(!) [Heather] :) I would have created /mnt/c, /mnt/d ... but that's just because, if my client is a serious dual booter, they continue to think of the windows parts as "drive letters" so this is good for keeping them from getting mixed up. (Simple enough: once it's mounted, it's a drive letter.) So, I often use /mnt/a for floppy access forced to vfat fs, in case I have any trouble with a DOS floppy.

(?) I up2dated everything but the kernel, as suggested.

(!) [Heather] So you have the current stock kernel for RH7, which version is that? I think it weird that you weren't given suggestions to rebuild a kernel and leave everything else alone - only the kernel, its modules, and mount should have anything to do with your problem.

(?) Still nothing. The odd thing is that I can access the hdb7 from windows. I can even write to it. But in Linux, RH7 using GNOME, I can't.

(!) [Heather] GNOME has nothing to do with it... or it shouldn't. Have your tried logging into a plain text console as root to do this?
If you come up in "linux single" (by typing that at your boot: prompt) you should be in the same state that the mounting mechanism from /etc/fstab is in when doing its original mounts.

(?) I have asked many different linux users. None can help me. Hope you have an idea of what's going on.

(!) [Heather] Well, first we have to discover what it is, then maybe we can figure out why it's doing it. If it's the mount command at fault, we'll have to look in mount's sources for its maintainer.
Hmm, here's an idea, if you have spare space on one of your other partitions equal or greater than the complaining partition, you can make a binary copy of it to a file:

dd if=/dev/hdb7 of=/usr/local/bigspace/D-driving-me-crazy
Yes, this will take a while. Might want to add bs=1024 or even bs=4096 on the end so it will grab things in chunks. I think that should work even if the partition image isn't an exact multiple of the blocksize... but one of the Gang who plays more with dd than I do should comment on that.
Then, you can ask file if it looks like what you think it is:

file /usr/local/bigspace/D-driving-me-crazy
And if it agrees that it's a filesystem image, then try to loopback mount the file:

mount -o loop -t vfat /usr/local/bigspace/D-driving-me-crazy
...which is not a good solution to your problem, but would pinpoint that mount can, or cannot, mount this flavor of DOS partition. If it can't, then factors to consider are its size, and what type it really is; having got this far it probably wouldn't be a cylinder problem, since the image is at a new location.

(?) Regards,

Gabriel Florit

(!) [Heather] Well, let us know if these thoughts shed any light on the matter!

(?) Dear Linux Gazette,
or The Gang,

Thanks very much for your prompt response! I will follow your advice and let you know as soon as possible.

Cheers,
Gabriel Florit
(the guy with the mount problem)


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 65 of Linux Gazette April 2001
HTML script maintained by Heather Stern of Starshine Technical Services, https://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29 [ Index of Past Answers ]