annotate docs/articles/diskcrash.article @ 691:ddf512f635d2

Ever so closer
author boisy
date Mon, 30 Dec 2002 03:52:24 +0000
parents 1fa5fc8256cd
children 1e04ad1dfdce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
642
1fa5fc8256cd XMLify. Added makefile
roug
parents: 471
diff changeset
1 <?xml version="1.0" ?>
1fa5fc8256cd XMLify. Added makefile
roug
parents: 471
diff changeset
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
1fa5fc8256cd XMLify. Added makefile
roug
parents: 471
diff changeset
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
1fa5fc8256cd XMLify. Added makefile
roug
parents: 471
diff changeset
4 <!--
1fa5fc8256cd XMLify. Added makefile
roug
parents: 471
diff changeset
5 The author has not been contacted about adding this article to the
1fa5fc8256cd XMLify. Added makefile
roug
parents: 471
diff changeset
6 documentation set.
470
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
7 -->
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
8 <article>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
9 <articleinfo>
642
1fa5fc8256cd XMLify. Added makefile
roug
parents: 471
diff changeset
10 <author><firstname>Dave</firstname><surname>Gantz</surname></author>
470
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
11 <title>Arrgh!!!!! My disk crashed, now what do I do?</title>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
12 </articleinfo>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
13 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
14 Fixing crashed disks or at least recovering data from crashed disks can
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
15 be a time consumming ordeal which is why the best recommendation is to
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
16 ALWAYS keep current backups or DON'T use the disk at all if it is your
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
17 only copy. However, crashed disks do not have to mean lost data if you
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
18 know how to go about recovering the data.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
19 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
20 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
21 Thats what this article is all about and comes as a result of the
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
22 three crashed disks I've had this past week as well as Chris Spry's
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
23 current predicament. I have co-written one other article on this
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
24 topic, but that pertained more specifically to boot disk problems.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
25 (See the OS9 Newletter, Volume III Issue 11B, November 30, 1992)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
26 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
27 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
28 You'll be needing a few tools handy to follow along with this article
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
29 and if your planning to just practice for the eventuallity of a
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
30 crashed disk then for God sakes use a backup of something.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
31 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
32 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
33 ------------------------------Tool List--------------------------------
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
34 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
35 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
36 OS9 Level II Manual, the big thick one that comes with the OS9 Level II
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
37 disks.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
38 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
39 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
40 DED -- Copyright 1987 by Doug DeMartinis -- preferably the edition below
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
41 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
42 <screen width="80">
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
43 Header for: dEd This edition has a patch made to it
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
44 Module size: $17A2 #6050 so that it will recognize and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
45 Module CRC: $299A3F (Good) identify the Bit Allocation Map or
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
46 Hdr parity: $8F BAM for short. The BAM is also
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
47 Exec. off: $0665 #1637 sometimes called DAM or Disk
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
48 Data Size: $0316 #790 Allocation Map....
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
49 Edition: $05 #5
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
50 Ty/La At/Rv: $11 $82 Besides its the one I use. You could
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
51 Prog mod, 6809 obj, re-en, R/O also use Qtip, but displays will differ
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
52 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
53 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
54 A screen dump utility of some sort would also come in handy for this
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
55 exercise in avoiding futility. See the end of this article for
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
56 suggested files and source(s).
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
57 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
58 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
59 Now to dive in there and rescue Data &lt;Grin&gt;.........
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
60 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
61 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
62
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
63 The first thing will cover is the breakdown of Logical Sector Number
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
64 zero on any OS9 disk, as well as the invocation of DED. All numbers
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
65 with a preceding $ are in hexadecimal (base 16) and others will be
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
66 in decimal (base 10).
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
67 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
68 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
69 To invoke DED for this excercise type the following from any OS9
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
70 prompt on any 80x24 or 80x25 text screen or graphics screen with
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
71 stdfonts merged.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
72 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
73 <screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
74 OS9: DED /Dx@ (where x = the drive number with the disk
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
75 to be worked on in it.)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
76 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
77 <note>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
78 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
79 The @ in the above command allows us to open any disk just as
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
80 if it were a file by itself, thus allowing us to work with
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
81 any and all data the disk contains with the exception of
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
82 high density disks in most cases.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
83 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
84 </note>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
85 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
86 Here is an example of my LSN $00. Offsets (Relative Addresses) are
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
87 read as LSN+left most column+top row. See the ** in the last row?
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
88 This would be read as LSN or $00+column or $70+top row or $04 or a
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
89 total offset of $0074. If we were on sector 1 then it would be $0174.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
90 The definitions of the important bytes follow the excerpt. Also see page
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
91 5-2 in the technical reference section of the OS9 Level II manual.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
92 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
93 <screen width="80">
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
94 ------------------------------------------------------------------------
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
95 LSN=$00 00
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
96
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
97 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
98 00: 00 0B D0 12 01 7A 00 01 00 00 03 00 00 FF D4 E3 ..P..z....... Tc
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
99 10: 07 00 12 00 00 00 00 00 00 00 5D 03 08 10 2D 52 ..........]...-R
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
100 20: 69 42 42 53 20 43 6F 6D 6D 61 6E 64 73 20 44 69 iBBS Commands Di
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
101 30: 73 EB 00 00 00 00 00 00 00 00 00 00 00 00 00 01 sk..............
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
102 40: 01 03 21 03 00 54 02 00 00 12 00 12 03 09 00 61 ..!..T.........a
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
103 50: 40 00 00 00 00 00 00 00 00 00 00 00 00 74 2D 00 @............t-.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
104 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
105 70: 00 00 00 00 ** 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
106
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
107
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
108 Relative Size
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
109 Name Address (Bytes) Use or Function Mine
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
110 ----------------------------------------------------------------------
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
111 DD.TOT $00 3 Number of sectors on disk. $000BD0
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
112 DD.TKS $03 1 Track size in sectors. $12
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
113 DD.MAP $04 2 Number of bytes in allocation map. $017A
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
114 DD.BIT $06 2 Number of sectors per cluster $0001
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
115 DD.DIR $08 3 Starting Sector of of Root Dir $000003
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
116 DD.OWN $0B 2 Owners ID number (usually 0) $0000
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
117 DD.ATT $0D 1 Disk attributes $FF
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
118 DD.DSK $0E 2 Disk identification (internal use) $D4E3
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
119 DD.FMT $10 1 Disk Format, bit mapped $07
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
120 DD.SPT $11 2 Number of sectors per track $0012
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
121 DD.RES $13 2 Reserved for future use $00
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
122 DD.BT $15 3 Starting sector of bootstrap file $000000
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
123 DD.BSZ $18 2 Size of bootstrap file $0000
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
124 DD.DAT $1A 5 Date of creation (Y:M:D:H:M) $5D0308102D
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
125 DD.NAM $1F 32 Disk name, last char has MSB set see above
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
126 DD.OPT $3F Path descriptor options
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
127 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
128 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
129 Probably the most important byte to us here are the bytes at offsets
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
130 $08, $09, and $0A which tell us where the root directory begins.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
131 Speaking of which, that is our next stop in the CoCo Zone....
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
132 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
133 <screen width="80">
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
134
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
135 LSN=$03 03
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
136
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
137 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
138 00: BF 00 00 5D 04 1A 0D 0A 02 00 00 01 20 00 00 00 ?..]........ ...
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
139 10: 00 00 04 00 07 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
140 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
141 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
142 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
143 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
144 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
145 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
146 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
147 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
148 A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
149 B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
150 C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
151 D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
152 E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
153 F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
154 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
155 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
156 Well here we are exactly where LSN $00 said the root directory starts,
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
157 at LSN $000003. But where are the filenames, you ask? Well they
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
158 start on the next sector.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
159 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
160 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
161 This sector is called a File Descriptor sector or FD for short. Every
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
162 file or directory on an OS9 disk has one of these. This is why you can't
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
163 store a true 360K worth of files and user data on a DSDD 40 track drive
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
164 for example.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
165 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
166 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
167 For our purpose I'm going to skip the explanation of the first 16 bytes
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
168 and get on with what we need from this sector to start finding data.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
169 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
170 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
171 Starting with offset $10 ($0310) is what is called a segment list. This
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
172 segment list tells OS9 where a file or directory on disk is located and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
173 how many sectors that file or directory occupies. There are 48 of these
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
174 segments avaiable each being 5 bytes wide. For you programmers, think of
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
175 it as a two dimensional array such as: DIM segment(48,5). What this
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
176 means is that your file or directory can occupy space in 48 different
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
177 locations on disk if it is badly fragmented.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
178 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
179 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
180 In this case mine only occupies one segment starting at LSN $0400 and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
181 is 7 sectors in size. So guess where our trip through the OS9 disk
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
182 takes us next? If you said sector 4 or offset $0400 your right!
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
183 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
184 <screen width="80">
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
185
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
186 LSN=$04 04
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
187
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
188 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
189 00: 2E AE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
190 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
191 20: AE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
192 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
193 40: 43 4D 44 D3 00 00 00 00 00 00 00 00 00 00 00 00 CMDS............
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
194 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0B ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
195 60: 53 59 D3 00 00 00 00 00 00 00 00 00 00 00 00 00 SYS.............
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
196 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 0A ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
197 80: 72 69 62 62 73 2E 63 66 E7 00 00 00 00 00 00 00 ribbs.cfg.......
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
198 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 2F .............../
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
199 A0: 72 69 62 62 73 67 EF 00 00 00 00 00 00 00 00 00 ribbsgo.........
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
200 B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 AC ...............,
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
201 C0: 4D 45 4E 55 D3 00 00 00 00 00 00 00 00 00 00 00 MENUS...........
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
202 D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 42 ...............B
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
203 E0: 4C 4F 47 D3 00 00 00 00 00 00 00 00 00 00 00 00 LOGS............
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
204 F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 A3 ...............#
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
205 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
206 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
207 Well here we are, finally. The root directory. Again for our purposes
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
208 I'm going to skip the first 32 bytes of this sector.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
209 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
210 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
211 Each entry for each file or directory is composed of 32 bytes. 29 of
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
212 them represent the file or directory name while the last 3 tell where
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
213 to find that individual files or directories FD is located on the disk.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
214 Looking at this perhaps you can see the importance of having your
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
215 directory names in ALL UPPERCASE and your file names in all lowercase.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
216 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
217 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
218 In this example I have 4 directories (CMDS, SYS, MENUS, and LOGS) and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
219 two files (ribbs.cfg and ribbsgo). Lets start with a file, ribbsgo
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
220 in this case.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
221 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
222 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
223 Its entry starts at offset $A0 ($04A0) and ends at $BF ($04BF). The
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
224 first 29 bytes as I said are for the file name, the last character of
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
225 which has its Most Significant Bit set to mark the end of the file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
226 name. The last 3 bytes tell us where to find the FD for ribbsgo which
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
227 is $0002AC or $02AC since the Most Significant Byte is 0.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
228 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
229 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
230 So this is where we are off to next, sector $02AC.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
231 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
232 <screen width="80">
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
233
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
234 LSN=$2AC 684
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
235
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
236 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
237 00: 0B 00 00 5D 04 19 0C 11 01 00 00 04 A5 5D 04 19 ...]........%]..
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
238 10: 00 02 AD 00 05 00 00 00 00 00 00 00 00 00 00 00 ..-.............
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
239 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
240 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
241 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
242 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
243 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
244 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
245 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
246 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
247 A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
248 B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
249 C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
250 D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
251 E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
252 F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
253 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
254 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
255 Ok here we are. This FD is very similar to the one we examined on our
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
256 way to the root directory. It contains all the same information and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
257 takes on exactly the same format as the FD for the root directory except
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
258 that this time we are talking about a file and not a directory.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
259 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
260 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
261 It tells us that our file, ribbsgo, begins at sector $0002AD or $02AD and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
262 occupies 5 sectors. So that is where we will go next. For the purposes
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
263 I will only include the first and last sectors in this text as examples.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
264 I forgot to mention that we have proceeded through pages 5-3, 5-4, and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
265 most of 5-5 of the technical reference section at this point.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
266 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
267 <screen width="80">
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
268
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
269 LSN=$2AD 685
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
270
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
271 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
272 00: 6F 6E 65 72 72 20 67 6F 74 6F 20 66 61 74 61 6C onerr goto fatal
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
273 10: 65 72 72 6F 72 0D 63 64 20 2F 64 64 0D 63 78 20 error.cd /dd.cx
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
274 20: 2F 64 64 2F 63 6D 64 73 0D 76 61 72 2E 30 3D 22 /dd/cmds.var.0="
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
275 30: 22 0D 64 69 73 70 6C 61 79 20 30 43 20 30 32 20 ".display 0C 02
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
276 40: 33 34 20 32 32 20 31 42 20 33 32 20 30 33 20 30 34 22 1B 32 03 0
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
277 50: 35 20 32 30 0D 65 63 68 6F 20 50 6C 65 61 73 65 5 20.echo Please
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
278 60: 20 49 6E 73 65 72 74 20 79 6F 75 72 20 4F 53 39 Insert your OS9
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
279 70: 20 42 6F 6F 74 20 44 69 73 6B 20 69 6E 20 2F 44 Boot Disk in /D
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
280 80: 30 2E 0D 64 69 73 70 6C 61 79 20 30 32 20 34 45 0..display 02 4E
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
281 90: 20 32 45 20 31 42 20 32 32 20 30 31 20 31 41 20 2E 1B 22 01 1A
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
282 A0: 31 30 20 31 39 20 30 33 20 30 30 20 30 31 20 30 10 19 03 00 01 0
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
283 B0: 31 20 30 32 20 32 36 20 32 32 0D 65 63 68 6F 20 1 02 26 22.echo
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
284 C0: 50 72 65 73 73 20 41 6E 79 20 4B 65 79 0D 76 61 Press Any Key.va
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
285 D0: 72 2E 30 0D 2A 6E 6F 6B 65 79 70 72 65 73 73 0D r.0.*nokeypress.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
286 E0: 69 66 20 25 30 3D 22 22 0D 67 6F 74 6F 20 6E 6F if %0="".goto no
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
287 F0: 6B 65 79 70 72 65 73 73 0D 65 6E 64 69 66 0D 64 keypress.endif.d
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
288 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
289 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
290 Well we made it! The actual file data. There are no special codes or
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
291 anything of that nature here to explain. Just the ASCII codes for the
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
292 contents of the ribbsgo script file. With program modules it would be
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
293 the hexadecial representations of the commands and variables and such
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
294 within the program.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
295 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
296 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
297 As I said there are 5 consecutive sectors (or 1 segment) that this file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
298 occupies but I will only include this and the last sector, because
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
299 everything in between is technically the same.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
300 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
301 <screen width="80">
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
302
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
303 LSN=$2B1 689
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
304
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
305 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 2 4 6 8 A C E
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
306 00: 6F 63 6D 64 73 0D 67 6F 74 6F 20 2B 65 78 69 74 ocmds.goto +exit
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
307 10: 0D 2A 66 61 74 61 6C 65 72 72 6F 72 0D 65 63 68 .*fatalerror.ech
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
308 20: 6F 20 45 72 72 6F 72 20 25 2A 20 69 6E 20 52 69 o Error %* in Ri
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
309 30: 42 42 53 47 6F 2E 20 20 46 69 78 20 61 6E 64 20 BBSGo. Fix and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
310 40: 74 72 79 20 61 67 61 69 6E 0D 67 6F 74 6F 20 2B try again.goto +
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
311 50: 65 78 69 74 0D 2A 66 69 6E 69 73 68 75 70 0D 64 exit.*finishup.d
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
312 60: 69 73 70 6C 61 79 20 31 62 20 32 33 0D 72 69 62 isplay 1b 23.rib
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
313 70: 62 73 6D 61 69 6E 20 23 31 36 4B 20 3C 3E 3E 3E bsmain #16K &lt;&gt;&gt;&gt;
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
314 80: 2F 77 37 26 0D 2A 65 78 69 74 0D 64 69 73 70 6C /w7&amp;.*exit.displ
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
315 90: 61 79 20 31 62 20 33 32 20 30 30 20 30 35 20 32 ay 1b 32 00 05 2
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
316 A0: 31 20 30 43 0D 00 00 00 00 00 00 00 00 00 00 00 1 0C............
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
317 B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
318 C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
319 D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
320 E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
321 F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
322 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
323 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
324 Ok this is the last sector of the ribbsgo file. The important thing
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
325 to mention here is that this file does not contain essential information
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
326 throughout the entire sector. The file ends with a carriage return
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
327 ($0D) at offset $A4 or $355 taking into account for the sector we are on.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
328 See all the $00's following that carriage return? We don't need them.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
329 I'll explain how to get rid of them later, for now its enough for you to
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
330 know that there not needed. In some cases those extra bytes may contain
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
331 $E5's which is the value that OS9 writes to each sector when you format
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
332 a disk.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
333 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
334 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
335 Now that you have a basic understanding of how an OS9 disk is put
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
336 together to become an effective storage medium we can go on and discuss
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
337 how we are gonna go about recovering data.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
338 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
339 <screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
340
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
341 Up/Down Arrows Read &amp; display Next/Previous sector
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
342 &lt;CR&gt; Clean up the screen display
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
343 * Restart
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
344 $ Fork a SHELL (Ctrl-BREAK to return)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
345 * A Append displayed sector to output file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
346 * C Close output file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
347 D Diddle (adjust) file length
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
348 E Edit the displayed sector
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
349 F Find a byte or text string (BREAK aborts)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
350 H Help screen (also use '?')
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
351 L Link to a module - List all modules
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
352 * N Next occurrence of byte(s) or string (Find)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
353 * O Open a file for output (use with Append)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
354 P Push current sector onto stack
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
355 Q Quit dEd - Exit to OS9
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
356 R Remove and display a sector from stack
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
357 * S Skip to given sector (sector # in hex)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
358 U Unlink from module
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
359 V Verify all modules in file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
360 W Write the sector back to the disk
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
361 X eXpert mode toggle on/off
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
362 Z Zap (fill in) the sector displayed
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
363 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
364 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
365 What you see above is the built in help from DED. The options we will
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
366 be using most often are the starred options above.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
367 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
368 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
369 * S Skip to given sector (sector # in hex)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
370 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
371 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
372 This option will let us skip to the sector(s) that we have identified
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
373 from the file desciptors (FD's) and will speed things up considerably.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
374 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
375 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
376 * O Open a file for output (use with Append)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
377 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
378 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
379 Once we have found the first sector of the data we wish to recover
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
380 we can use this option to open a path to another disk (or RAM disk)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
381 on which we will store the recovered data. Since we will have to
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
382 do some editing on the recovered file a RAM disk is recommended.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
383 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
384 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
385 * A Append displayed sector to output file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
386 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
387 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
388 Once we have opened the destination file for the data we are trying
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
389 to recover this option will let us add the current sector to that
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
390 new file. You use this until you either reach the end of that
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
391 particular segment (Another FD will most likely be displayed at the
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
392 end of a segment or file) or the end of the file.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
393 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
394 <screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
395
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
396 Up/Down Arrows Read &amp; display Next/Previous sector
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
397 &lt;CR&gt; Clean up the screen display
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
398 * Restart
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
399 $ Fork a SHELL (Ctrl-BREAK to return)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
400 * A Append displayed sector to output file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
401 * C Close output file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
402 D Diddle (adjust) file length
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
403 E Edit the displayed sector
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
404 * F Find a byte or text string (BREAK aborts)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
405 H Help screen (also use '?')
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
406 L Link to a module - List all modules
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
407 * N Next occurrence of byte(s) or string (Find)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
408 * O Open a file for output (use with Append)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
409 P Push current sector onto stack
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
410 Q Quit dEd - Exit to OS9
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
411 R Remove and display a sector from stack
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
412 * S Skip to given sector (sector # in hex)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
413 U Unlink from module
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
414 V Verify all modules in file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
415 W Write the sector back to the disk
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
416 X eXpert mode toggle on/off
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
417 Z Zap (fill in) the sector displayed
471
ce6c1122bee6 Minor fixes to markup
roug
parents: 470
diff changeset
418 -------------------------------------------------------------------------
470
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
419 </screen>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
420 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
421 * C Close output file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
422 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
423 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
424 Now that we have recovered the data or file we must close the file before
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
425 doing anything else with it.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
426 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
427 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
428 * F Find a byte or text string (BREAK aborts)
471
ce6c1122bee6 Minor fixes to markup
roug
parents: 470
diff changeset
429 </para>
ce6c1122bee6 Minor fixes to markup
roug
parents: 470
diff changeset
430 <para>
470
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
431 * N Next occurrence of byte(s) or string (Find)
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
432 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
433 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
434 If you know specific words or byte sequences to look for within the data
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
435 or file your trying to recover then these two are handy for locating
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
436 those words or sequences.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
437 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
438 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
439 Well we've recovered a file or data. There is, if you recall, quite
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
440 likely some extra unwanted bytes. What do we do to get rid of them?
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
441 Thats easy, again using DED (and ident for program modules) we
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
442 diddle with the file length. Now you won't be dealing with real
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
443 sector numbers, just the relative sector offset from the beginning
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
444 of the file. In this case it will read LSN $00 thru $04 although
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
445 we may not actually be on sectors 0-4.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
446 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
447 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
448 At any rate you need to find the last relative sector of the file
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
449 probably using the arrow keys to scroll through it. When you reach
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
450 the last sector look and the LSN, left column number, and top row
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
451 number and determine the offset for the last byte (the carriage
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
452 return) and add 1. In this example that last byte will be at
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
453 $04A4 then add 1 giving us $04A5.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
454 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
455 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
456 Hit D for Diddle with file length. It will tell you the old length
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
457 and ask for the new length. Type it in ($04A5 for this example) and
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
458 press enter. You will see the extra bytes disappear in front of you.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
459 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
460 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
461 Now hit Q to quit and answer 'Y' and you have just recovered your first
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
462 file. Give yourself a pat on the back, get a cup of coffee and dig in
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
463 cause your gonna be dancin on the keyboard for several hours to
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
464 completely recover one DSDD disk.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
465 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
466 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
467 It took me roughly 24 hours to recover all data from 3-3 1/2" 756K
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
468 floppies (I have mine formatted for 84 tracks double side rather than
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
469 the usual 80 tracks double side &lt;Evil Grin&gt;).
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
470 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
471 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
472 For some disks your directories will get trashed and there is little
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
473 one can do to recover the directories (that I know of) in which case
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
474 you will have to sit there with the arrow keys in DED identifying
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
475 FD's and locating the 'lost' files. This is what took me so long,
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
476 my directories got trashed.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
477 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
478 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
479 This is, as I said, a time consumming method but I know of no program
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
480 that will do it for you. If I ever get some of my other programming
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
481 projects finished I intend to write something, but for now this
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
482 method will have to do.
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
483 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
484 <para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
485 Good luck recovering that lost data!
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
486 </para>
6e1cff14e8c4 Article about recovering from disk crash
roug
parents:
diff changeset
487 </article>