File: 2.html

package info (click to toggle)
lg-issue89 1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,804 kB
  • ctags: 80
  • sloc: xml: 106; makefile: 34; sh: 34; perl: 1
file content (784 lines) | stat: -rw-r--r-- 29,891 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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
<!--startcut  ==============================================-->
<!-- *** BEGIN HTML header *** -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD>
<META NAME="generator" CONTENT="lgazmail v1.4G.e">
<TITLE>The Answer Gang 89: The Journey to Journaling</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!-- *** END HTML header *** -->
<!--endcut  ==============================================-->
<!-- begin 2 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>The Journey to Journaling</H3>
<H4 ALIGN="center">pack your fs' diary seperately</H4>


<p><strong>From Licht B&uuml;lb 
</strong></p> 
<p></strong></p>
<!-- ::
The Journey to Journaling
~~~~~~~~~~~~~~~~~~~~~~~~~
pack your fs' diary seperately
:: -->

<p align="right"><strong>Answered By  Dolavimus the platypus, Pretzel, Virtual Beer, Konqi, Tuxedo T. Herring,
 Swirl, corncob Pipe, the Scissors, Amanda the Panda
</strong></p>
<P><STRONG>
Hi Gang.
</STRONG></P>
<P><STRONG>
I'm fiddling on my laptop again (almost all things are working) trying to
get s-video out working. In the course of this fiddling I'm raking wildly in
the bios which sometimes screws up the display (and I am still able to login
via ssh) or the machine freezes. Then I have to "push the button" and -
since I was forced to use ext2 (ext3 accesses the hd every 5 secs -&gt;
spindown and therefore power saving impossible) I have to wait quite some
time for the fsck to finish with my 10 GB root system (yeah, now I know why
to have multiple partitions..). So,
</STRONG></P>
<P><STRONG>
does any of you know a jounaling fs which plays nice with laptops? I googled
a bit, read stuff, but didn't find anything about it. I think I remember
someone here in the TAG saying that reiserfs had some patch to play nice?
Can someone confirm that?
</STRONG></P>
<P><STRONG>
Cheers and TIA
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dolavimus] 
I've been using rfs on my laptop since new two yrs ago with good results.
Although I haven't done anything in particular to address hd spin down for
power economy.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Amanda] 
I have actually used ext3 with a recently installed <A HREF="http://www.debian.org/">Debian</A> "testing"
distribution. The hdd access can be "reduced" by installing "noflushd".
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
noflushd doesn't work with any j-fs.  It says so on the web page.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Amanda] 
However, I confess that I haven't really had a chance to fully examine
this issue. As regards partitioning the disk the following works well:
<TT>/</TT>, <TT>/usr</TT>, <TT>/boot</TT> as ext2 mounted read-only. Of <TT>/tmp</TT>, <TT>/var</TT> and <TT>/home</TT> which
need to be writable only <TT>/home</TT> really is usually large enough to require
journalling ( and sometimes <TT>/var</TT> ).
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I have tried several things over time: only one root and a small boot, full
monty with all dirs on seperate partitions and some things in between. The
prob with several partition: when you need some large space (naturally) none
is there on a single partition. Across two or more there would be enough...
Disadvantage of only one <TT>/:</TT> you can not unmount anything beforehand if you
know you gonna crash the system now... And a crypto-fs is hard to make then
too.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pretzel] 
I think the very <EM>idea</EM> of a journaling filesystem makes "play[ing] nice"
impossible. Journaling filesystems <EM>have</EM> to access the hard drive on every
write. More accurately, they have to access the journal device each filesystem
write.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Well, it might be necessary for the j-fs to write to it's journal every fs
access, but ext3 writes to hdd <EM>every</EM> 5 secs, regardless of fs access or
not.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pretzel] 
I think most journaling filesystem in Linux have an option for
journaling device which is normally on-disk but can be on any block device, at
least with ext3 and reiserfs. Some non-volatile memory would do nicely, but on
a laptop, I think the chances of being able to do this are almost nil.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I (as a not-knower) would have two ideas: a compact flash card in the pcmcia
slot and  -  RAM! In case of the RAM the journal would then be written to
hdd when also a normal hdd access takes place. True, this would be bad if a
system outage would occur without the journal having been rewritten to disk
but <EM>I</EM> would take these chances...
In case of CF, dunno if you can plug them in straight away or if you need an
adapter, but 16MB are really cheap anmd if you can save some power (-&gt; time)
with it...
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pretzel] 
Doing it in RAM would effectivly make a journaling fs useless. What would be
the point then? That's the same effect as using a non-journaled filesystem.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Well, the journal would get written to disk with the data. If you use
noflushd then writes of the system (logging etc.) get postponed or get
written to RAM and then get written to hdd if a normal write (user
initiated) occurs. So, I dunno exactly how noflushd does this but when it
redirects the writes to ram the journal entries (if they need to be made in
that case) should be written to ram too.
</STRONG></P>

<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Scissors] This isn't so much "writtem to RAM" like scribbled in a ramdisk - it's
more like being hidden in the RAM of a caching controller.  That's all
noflushd does, is allow some buffering at the filesystem-driver level.
So if something really does have content for the disk - and yes, that
includes its journals - it's either got to hit the disk eventually, or
you get to bear the risk that something might fail before it does.
</blockquote>
<blockquote>But the whole point of having a journal is to have it still be present
after a reboot event made something which normally isn't volatile space,
lose its cookies.  Having a journal that isn't allowed to do its job
just complicates matters.  Ergo, it shouldn't be put on volatile RAM.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pretzel] 
Another possiblily compiling a kernel with magic sysrq support, if the machice
isn't totally frozen, you could do an emergency Sync/Unmount/Reboot.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
OK, now I have to admit it: HOW THE HECK DOES THIS WORK? I read the stuff in
<TT>/usr/src/linux/docs/</TT> but as much as I gathered Alt-Print d should do
something? It doesn't in my case. I compiled this in (if it's only the Magic
SysRq key in Kernel hacking) some time (not in my current kernel I see now)
but then (I tested it) it didn't work.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pretzel] 
Worked for me. (I say worked because at the moment I don't have it compiled
it.) Try Alt-Sysrq-&lt;magic sysrq command&gt; (all three at the same time.) I don't
remember if it needed all three at once or not. sysrq probably only says
"print screen" on some keyboards.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Yeah, the prob was all at the same time... Now it works.
</STRONG></P>

<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Scissors] At least part of the confusion is with SysRq - on some keyboards the
SysRq lives as a subfunction on another key.  Thus for such keyboards
you'd also need the extra key that invokes the secondary keycode.  Fn
maybe.
</blockquote>
<blockquote>When it works then you should be able to (for instance) press Z and get
a little help list.  In fact any character that doesn't do something is
supposed to show the little list.  What I'm not clear on is "get outta
sysrq mode"...
</blockquote>
<blockquote>I've sometimes seen a console get into a state where it would respond to
Magic SysRq, but it couldn't get out of that mode anymore.  So I hope
you have some spare virtual consoles, if you are just using it to settle
something simpler than "telinit 6 doesn't work".
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pretzel] 
So, in summary: No.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
A No? &lt;shout&gt; I DON'T ACCEPT NO "NO" ! &lt;/shout&gt; (yes, I've been in the
army..) 
<IMG SRC="../../gx/dennis/smily.gif" ALT=";-)" 
		height="24" width="20" align="middle">
</STRONG></P>
<HR width="10%" align="left"><blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Beer] 
Why not plug one of these USB memory sticks and keep the journals there? That
way the immediate access is only required for the USB device and not for the
actual HD.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Cool idea, hadn't thought of this one, although I recently bought one! &lt;me
stupid&gt;
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Beer] 
Which one? I've seem that Sony ads -- but they tell a lot about some strange
cruft with user mangerment and cryptosoftware which suggest custom WinXX
drivers to my suspicious ears.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
The cheapest one I could find. It was 49 Euro, super slim and works like a
charm. I think I will use gpg to encrypt files on the thing and simply put a
win gpg version on the stick too.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Beer] 
If I ask for a drive give me drive and not an encryption device where I can't
trust the encryption anyway....
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
True, true...
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Beer] 
Might still need patches, but if the journal keeping actually
needs only access to the journmal file and is not accessing the HD
where the data are finally going anyway -- It might even work with existing
journal/kernel code.
</blockQuote>
<blockQuote>
Then on the other hand you want journaling for some testing period -- why is
power saving durting that time so important? You could always switch back to
unjournaled if power saving is important. ext2/3 in that case would be
easiest as a cleanly unmounted ext3 is mountable as ext2 without problems.
The switching between ext3 and ext2 might be done by boot options I guess.
(can you ask in a init.d script for boot options ?)
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Well, the case is pressing just now in this testing period. I just rebooted
and had a full fsck (with Ctrd-d at the end) just now and I really need a
j-fs NOW. But I like the idea of j-fs's generally so I would like to keep it
after the fiddling too. You are right that ext2|3 would work now but I am a
little bit burnt with that since I had ext3 in the very beginning, installed
the system (a lot) and then wanted to switch to ext2 (with removing the
journal) according to manual. But the ext-tools weren't current at that time
in testing|sid so this broke (!) the fs with FULL reinstall (some bad things
occured at the same time leading to this). But ext2|3 would be an option.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Beer] 
I never tried to completely switch back to ext2 and delete the journals, but
I <EM>did</EM> mount ext3 as ext2 and nothing bad happened.  I made sure they are
clean so.
</blockQuote>
<blockQuote>
On Laptop power save is only a real issue on battery -- then the sudden
crashes should not be that frequent unless you insist of fiddling around in
kernel space on the train.... So for some normal usage running on battery and
ext2 might be sufficient, but when you are on mains power you can switch back
to ext3. There must be a way to make this decission in lilo by some option
which is evaluated in init.d/boot*
</blockQuote>
<blockQuote>
Or check if you are on battery and make the decision based on that. Frequent
sleep/resume inbetween are then not that practical so.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Konqi] 
For those living in Germany: Aldi has an 128 MB USB memory stick for 49.99
Euro next week, I read in an Heise announcement.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
And for those who want to know something about mine:
<A HREF="http://www.computer-cash-carry.de/ccc/index-ns.html"
	>http://www.computer-cash-carry.de/ccc/index-ns.html</A>
see Festplatten IDE, there at the bottom (all german, just for the curious)
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Tux] 
Any of you guys want to write up an article on what it takes to get one
working, or is it simple enough to describe in a 2-cent tip? I'd be very
curious.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
</STRONG></P>

<pre><strong>modprobe sd_mod
modprobe usb-storage
mount /dev/sda1 /mnt/usbstick
</strong></pre>
<P><STRONG>
<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"
	> [Tux] 
Wow. Mondo cool. I love Linux. 
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
I think that there's a USB memory stick in my near future...
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I wonder if what I have
<A HREF="http://linuxmafia.com/~rick/linux-info/easydisk-memorystick"
	>on my website</a>
is sufficient for a 2-cent tip?  I can re-write it, if it's considered too
half-assed.  Here's the relevant excerpt:
</blockQuote>
<blockQuote>
USB on Linux seems a bit... different, especially since I'm not really
used to devfs-type things.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Beer] 
The only thing I ever tried was a digital camera (Olympus C100 zoom) and it
needed a kernel patch (usb-driver) to be properly recognised. Apart from that
the camera works as a disk as expected.
I mount <TT>/dev/sda1</TT>, it will be rw right on the first mount, no need for
remounting.
</blockQuote>
<blockQuote>
So if you really <EM>have</EM> to go through all this remounting, you can't fdisk
the thing into partitions, etc. It really seems strange.
</blockQuote>
<blockQuote>
I do remember that zip-drive "problem" -- the win programs to access it
partition it to use sda4 instead of sda1. So this might all be very specific
to the hardware and drivers used (or used the first time the disk was
partitioned).
</blockQuote>
<blockQuote>
But basically these memory sticks seem to work, then I'll keep my eyes open
for one.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I've been figuring out how best to deal with
it on my laptop, since my wife gave me a 32 MB Easy Disk "memory stick",
a cute little plastic thing on a keychain fob.
</blockQuote>
<blockQuote>
I'm still working it out, but it looks like I need the usb-uhci and
usb-storage drivers (impliedly also usbcore), at which point I can do:
</blockQuote>

<blockquote><code><font color="#000033"><br>   # mount -o rw,uid=1000,gid=1000 -t vfat /dev/sda /mnt/fob/
</font></code></blockquote>
<blockQuote>
(where 1000 is my own login account's UID and GID).[1]
</blockQuote>
<blockQuote>
The bizarre thing is:  That command (or anything like it) always
returns:
</blockQuote>

<blockquote><code><font color="#000033"><br>   mount: block device /dev/sda is write-protected, mounting read-only
</font></code></blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [corncob Pipe] 
I believe that this error is more of a "fail-safe"
than it is an annoyance...
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I banged my head up against that problem for a couple of days, and
"fdisk <TT>/dev/sda</TT>" kept insisting...
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Um, my usb stick has a small switch on it's side to make it write-protected.
You don't have by chance missed that one?
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
That was part of what I spent some part of a couple of days, looking for.
No, there's no hardware switch.  Moreover, doing a remount entirely via
software <em> _does</em> succeed in making it writeable, following the initial
mount.  If the obstacle were a hardware switch, that would not have
happened.
</blockQuote>

<blockquote><code><font color="#000033"><br>   # fdisk /dev/sda
<br>   You will not be able to write the partition table.
</font></code></blockquote>
<blockQuote>
...until it finally occurred to me to do...
</blockQuote>

<blockquote><code><font color="#000033"><br>   # mount -o rw,remount /mnt/fob
</font></code></blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
Does it? To me, the mount command references
"<TT>/mnt/fob</TT>" (unless of course, "<TT>/mnt/fob</TT>" points to
"<TT>/dev/sda</TT>"???)
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
The point is that the <em> _original</em> mount command, which gets re-mounted
here, uses <TT>/dev/sda</TT>, <em> _not</em> <TT>/dev/sda1.</TT>  I'm trying to stress that at
least <em> _some</em> memory sticks must be addressed as if they were SCSI-based
<em>floppy</em> drives.  No partition numbers, you see?  This was non-obvious
point #1.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
What you have done here it to re-mount in in "rw"
mode, yay!
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
Um, yes.  That's exactly my point.   The necessity to do so was
non-obvious point #2.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
Notice that the mount command references <TT>/dev/sda</TT>, instead of <TT>/dev/sda1.</TT>
That's the other odd thing:  I kept had no luck until I happened to try
/dev/sda.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
I think this is as a result of the way in which device
files are referenced under Linux
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
Well, where were you when I was trying to mount the device, the first
time?  
<IMG SRC="../../gx/dennis/smily.gif" ALT=";-&gt;" 
		height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
I'm saying _the point is non-obvious_ because many other instructions
one finds for mounting similar devices tell you otherwise, because
intuition suggests that a memory stick ought to be addressed like a hard
drive, such that it can have multiple partitions, and because it's the
first time in a decade of addressing SCSI devices on Linux that I've
<em>not</em> put a number after <TT>/dev/sda.</TT>
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
Oh, <EM>now</EM> I see what you meant. I mis-interpreted you
the first time.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
My guess is that the Easy Disk is being addressed as if it were a floppy
disk instead of a hard drive partition, which is why it's sda instead of
sda1.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
Hmm, I don't quite follow you here. Why would a HD
partition not utilise "sda1" if told to do so?
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I'm not sure what's the nature of your confusion:  Are you willing to
simply take my word for it that addressing <TT>/dev/sda1</TT> on the memory stick
absolutely does not work, and that addressing <TT>/dev/sda</TT> does?  That would
make this conversation a great deal easier.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
Oh, I'm not doubting you one bit, I just mis-read your
sentence, I'm sorry, Rick.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
And I believe you're missing my point:  Because the Easy Disk is (it
seems) classed as functionally the same as a floppy disk, there is no
concept of partitioning, and thus no partition numbers.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
And if
Easy Disk were being addressed as a floppy then it
ought to use "<TT>/dev/fdx</TT>" in this case, surely?
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I beg your pardon, but no.  That wouldn't be SCSI then, would it?
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
It would, it would.
</blockQuote>

<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Scissors] I seem to recall that normal floppy disks used in an IDE-chain LS-120
bay are still accessed by the fdx mechanism.  However the one around
here lost a pin so I can't check.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I hope you're not under the impression that there aren't all Linux
floppy disks must be addressed as <TT>/dev/fdx?</TT>  SCSI ones are <TT>/dev/sdX</TT>,
and parallel-port ones are <TT>/dev/pfN</TT> .  Neither supports partitioning.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
!
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I have no idea why Linux always mounts it read-only, though.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
Me neither.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I have no clue what it is recognised or attached like, but in my case I have
to use <TT>/dev/sda1</TT>, else it will make trouble.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
Yes, I've heard such reports.  That is why I have concluded that some
USB memory sticks are recognised as quasi-floppies, and some as
quasi-hard disks.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
I guess there are two (or more) controller producers and there comes this
trouble.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
If by "controller" you mean the USB chipset on the motherboard, I very
much doubt that, because the difference seems specific to the add-on USB
storage device, not the USB host.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
No, I didn't mean the host, I meant the usb controller in the sticky. These
need some controller too, don't they?
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
They need some sort of USB circuitry, and, to be sure, differences in
such circuitry seem to have caused these differences in mode of
operation between memory sticks.  Whether it's common to call that
circuitry a "USB controller", I am unsure, but such was not my
impression.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> 
Maybe there are even patents involved so that the other producer
had to take a different approach (and maybe this also helped in case of
"booting off floppy -&gt; off usbstick).
Anybody anything about the subject? 
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</STRONG></P>
<P><STRONG>
But there is a strange thing:
sometimes there comes a error message saying that there is (can't rememeber
what) wrong, then I try to mount <TT>/dev/sda</TT>, this will fail, and then I can
mount <TT>/dev/sda1</TT> - So much for deterministics.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Pipe] 
Unless of course this is as a result of
the Kernel's divine intervention??? Va savoir??
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Swirl] 
I'm ultimately less interested in kernel psychoanalysis than in making
it do what I want, thanks.  
<IMG SRC="../../gx/dennis/smily.gif" ALT=";-)" 
		height="24" width="20" align="middle">
</blockQuote>

<!-- end 1 -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
<h5>
<br>Copyright &copy; 2003
<br>Copying license <A HREF="">http://www.linuxgazette.com/copying.html</A>
<BR>Published in Issue 89 of <i>Linux Gazette</i>, April 2003</H5>
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->

<SMALL><CENTER><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></SMALL></CENTER>
<HR>
<!--startcut ======================================================= -->
<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="../index.html"
        ><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
              ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.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_answer.html#greeting"><img align="middle"
        src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
  <A HREF="../../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
  <A HREF="1.html">1</A> &nbsp;
  <A HREF="2.html">2</A> &nbsp;
  <A HREF="3.html">3</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 ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
</BODY></HTML>
<!--endcut ========================================================= -->