File: 27.html

package info (click to toggle)
lg-issue65 2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,780 kB
  • ctags: 230
  • sloc: sh: 201; perl: 133; makefile: 34
file content (348 lines) | stat: -rw-r--r-- 13,101 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3E.t">
<TITLE>The Answer Gang 65: about a stubborn mount error</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
	LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P> <hr> 
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
	<img src="../../gx/dennis/qbubble.gif" alt="(?)" 
		border="0" align="middle">
	<font color="#B03060">The Answer Gang</font>
	<img src="../../gx/dennis/bbubble.gif" alt="(!)" 
		border="0" align="middle">
</A></H1> 
<BR>
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang,
	the Editors of Linux Gazette... 
	and You!
<br>Send questions (or interesting answers) to
	<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
</H4>
<p><em><font color="#990000">There is no guarantee that your questions
	here will <b>ever</b> be answered.  You can be published anonymously 
	- just let us know!
</font></em></p>
</center>

<p><hr><p>
<!--  endcut ======================================================= -->
<!-- begin 27 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>about a stubborn mount error</H3>


<p><strong>From Gabriel Florit
</strong></p> 
<p align="right"><strong>Answered By Heather Stern
<br></strong></p>

<!-- sig -->

<P><STRONG>
Dear Linux Gazette,
</STRONG></P>
<P><STRONG>
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... 
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
Interesting.  What suggestions have they offered that didn't work?
</BLOCKQUOTE>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
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
</STRONG></P>

<code><strong><font color="#000033"><br>mount -t vfat /dev/hdb7 /mnt/win
</font></strong></code>
<P><STRONG>
or
</STRONG></P>

<code><strong><font color="#000033"><br>mount -t msdos /dve/hdb7 /mnt/win
</font></strong></code>
<P><STRONG>
i get an error that says
</STRONG></P>

<pre><strong>mount: wrong fs type, bad option, bad superblock on /dev/hdb7,
       or too many mounted file systems
</strong></pre>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
Let's investigate each of the three points.
</BLOCKQUOTE>
<BLOCKQUOTE>
You're certainly able to see the rest of <TT>/dev/hdbN</TT>, otherwise, your complaint
would be about Windows making Linux not work.
</BLOCKQUOTE>
<BLOCKQUOTE>
Wrong fs type:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
There are numerous partition types usable by Windows these days.  You mention
that sfdisk -l says <TT>/dev/hdb7</TT> is your dos partition, but not which type that
it is.
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
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?
</BLOCKQUOTE>
<BLOCKQUOTE>
Anyways I assume that you have the msdos and vfat filesystem support
properly installed since you say that getting <TT>/dev/hda1</TT> mounted isn't a
problem.  So my first guess would be that <TT>/dev/hda1</TT> and <TT>/dev/hdb7</TT> are
different flavors of DOS partition.
</BLOCKQUOTE>
<BLOCKQUOTE>
Bad option:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
Your command lines looked okay to me.  Assuming <TT>/mnt/win</TT> exists.
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
Bad superblock on <TT>/dev/hdb7:</TT>
</BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
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.)
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE>
just curious, does <TT>/dev/hdb7</TT> 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...
</BLOCKQUOTE>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
I have created the win dir in the mnt dir. (lots of people seem to ask me
that).
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="bottom">   I would have created <TT>/mnt/c</TT>, <TT>/mnt/d</TT> ... 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
<TT>/mnt/a</TT> for floppy access forced to vfat fs, in case I have any trouble with
a DOS floppy.
</BLOCKQUOTE>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
I up2dated everything but the kernel, as suggested.
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [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.
</BLOCKQUOTE>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
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 <A HREF="http://www.gnome.org/">GNOME</A>, I can't.
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [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?
</BLOCKQUOTE>
<BLOCKQUOTE>
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 <TT>/etc/fstab</TT> is
in when doing its original mounts.
</BLOCKQUOTE>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
I have asked many different linux users. None can help me. Hope you have an
idea of what's going on.
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [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.
</BLOCKQUOTE>
<BLOCKQUOTE>
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:
</BLOCKQUOTE>

<blockquote><code><font color="#000033"><br>	dd if=/dev/hdb7 of=/usr/local/bigspace/D-driving-me-crazy
</font></code></blockquote>
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
<BLOCKQUOTE>
Then, you can ask file if it looks like what you think it is:
</BLOCKQUOTE>

<blockquote><code><font color="#000033"><br>	file /usr/local/bigspace/D-driving-me-crazy
</font></code></blockquote>
<BLOCKQUOTE>
And if it agrees that it's a filesystem image, then try to loopback mount
the file:
</BLOCKQUOTE>

<blockquote><code><font color="#000033"><br>	mount -o loop -t vfat /usr/local/bigspace/D-driving-me-crazy
</font></code></blockquote>
<BLOCKQUOTE>
...which is <EM>not</EM> 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.
</BLOCKQUOTE>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Regards,
</STRONG></P>
<P><STRONG>
Gabriel Florit
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Heather]
Well, let us know if these thoughts shed any light on the matter!
</BLOCKQUOTE>
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Dear Linux Gazette,
<br>or The Gang,
</strong></p>
<p><strong>
Thanks very much for your prompt response! I will follow your advice and let you know as soon as possible.
</strong></p>
</strong></p>
<p><strong>
Cheers,
<br>Gabriel Florit
<br>(the guy with the mount problem)
</strong></p>

<!-- end 27 -->
<!--startcut ======================================================= -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
        of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
        >Copyright &copy;</a> 2001
<BR>Published in issue 65 of <I>Linux Gazette</I> April 2001</H5>
<H6 ALIGN="center">HTML script maintained by
        <A HREF="mailto:star@starshine.org">Heather Stern</a> of
        Starshine Technical Services,
        <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<P> <hr> 
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
	><IMG ALT="" SRC="../../gx/navbar/left.jpg"
        WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="..//"
	><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
              ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer65.html"
	><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
              ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer65.html#greeting"><img align="middle"
	src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
  <A HREF="1.html">1</A> &nbsp;
  <A HREF="2.html">2</A> &nbsp;
  <A HREF="3.html">3</A> &nbsp;
  <A HREF="4.html">4</A> &nbsp;
  <A HREF="5.html">5</A> &nbsp;
  <A HREF="6.html">6</A> &nbsp;
  <A HREF="7.html">7</A> &nbsp;
  <A HREF="8.html">8</A> &nbsp;
  <A HREF="9.html">9</A> &nbsp;
  <A HREF="10.html">10</A> &nbsp;
  <A HREF="11.html">11</A> &nbsp;
  <A HREF="12.html">12</A> &nbsp;
  <A HREF="13.html">13</A> &nbsp;
  <A HREF="14.html">14</A> &nbsp;
  <A HREF="15.html">15</A> &nbsp;
  <A HREF="16.html">16</A> &nbsp;
  <A HREF="17.html">17</A> &nbsp;
  <A HREF="18.html">18</A> &nbsp;
  <A HREF="19.html">19</A> &nbsp;
  <A HREF="20.html">20</A> &nbsp;
  <A HREF="21.html">21</A> &nbsp;
  <A HREF="22.html">22</A> &nbsp;
  <A HREF="23.html">23</A> &nbsp;
  <A HREF="24.html">24</A> &nbsp;
  <A HREF="25.html">25</A> &nbsp;
  <A HREF="26.html">26</A> &nbsp;
  <A HREF="27.html">27</A> &nbsp;
  <A HREF="28.html">28</A> &nbsp;
  <A HREF="29.html">29</A></td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
	><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
              ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
        WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<P> <hr> 
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->