Commit | Line | Data |
---|---|---|
7013c8c9 C |
1 | .TH BAD144 8 "4 February 1983" |
2 | .UC 4 | |
3 | .SH NAME | |
4 | bad144 \- read/write dec standard 144 bad sector information | |
5 | .SH SYNOPSIS | |
6 | .B bad144 | |
7 | [ | |
8 | .B \-f | |
9 | ] | |
10 | disktype disk | |
11 | [ sno [ | |
12 | bad ... | |
13 | ] ] | |
14 | .SH DESCRIPTION | |
15 | .I Bad144 | |
16 | can be used to inspect the information stored on a disk that is used by | |
17 | the disk drivers to implement bad sector forwarding. The format of | |
18 | the information is specified by DEC standard 144, as follows. | |
19 | .PP | |
20 | The bad sector information is located in the first 5 even numbered sectors | |
21 | of the last track of the disk pack. There are five identical copies of | |
22 | the information, described by the | |
23 | .I dkbad | |
24 | structure. | |
25 | .PP | |
26 | Replacement sectors are allocated starting with the first sector before | |
27 | the bad sector information and working backwards towards the beginning | |
28 | of the disk. A maximum of 126 bad sectors are supported. The position | |
29 | of the bad sector in the bad sector table determines which replacement | |
30 | sector it corresponds to. | |
31 | .PP | |
32 | The bad sector information and replacement sectors are conventionally | |
33 | only accessable through the ``c'' file system partition of the disk. If | |
34 | that partition is used for a file system, the user is responsible for | |
35 | making sure that it does not overlap the bad sector information or any | |
36 | replacement sectors. | |
37 | .PP | |
38 | The bad sector structure is as follows: | |
39 | .PP | |
40 | .ta .75i 1.5i 3.5i | |
41 | .nf | |
42 | struct dkbad { | |
43 | long bt_csn; /* cartridge serial number */ | |
44 | u_short bt_mbz; /* unused; should be 0 */ | |
45 | u_short bt_flag; /* -1 => alignment cartridge */ | |
46 | struct bt_bad { | |
47 | u_short bt_cyl; /* cylinder number of bad sector */ | |
48 | u_short bt_trksec; /* track and sector number */ | |
49 | } bt_bad[126]; | |
50 | }; | |
51 | .fi | |
52 | .PP | |
53 | Unused slots in the | |
54 | .I bt_bad | |
55 | array are filled with all bits set, a putatively | |
56 | illegal value. | |
57 | .PP | |
58 | .I Bad144 | |
59 | is invoked by giving a device type (e.g. rk07, rm03, rm05, etc.), and a device | |
60 | name (e.g. hk0, hp1, etc.). It reads the first sector of the last track | |
61 | of the corresponding disk and prints out the bad sector information. | |
62 | It may also be invoked giving a serial number for the pack and a list | |
63 | of bad sectors, and will then write the supplied information onto the | |
64 | same location. Note, however, that | |
65 | .I bad144 | |
66 | does not arrange for the specified sectors to be marked bad in this case. | |
67 | This option should only be used to restore known bad sector information which | |
68 | was destroyed. | |
69 | .PP | |
70 | If the disk is an RP06, the | |
71 | .B \-f | |
72 | option may be used to mark the bad sectors as ``bad''. | |
73 | Otherwise, | |
74 | new bad sectors can be added only | |
75 | by running the standard DEC formatter in | |
76 | section ``bad''. | |
77 | .SH SEE ALSO | |
78 | badsect(8), | |
79 | format(8) | |
80 | .SH BUGS | |
81 | It should be possible to both format disks on-line under UNIX and to change | |
82 | the bad sector information, marking new bad sectors, without running | |
83 | a standalone program. | |
84 | .PP | |
85 | The standard bootstrap drivers used to boot the system do | |
86 | not understand bad sectors, | |
87 | handle ECC errors, or the special SSE (skip sector) errors of RM80 type disks. | |
88 | This means that none of these errors can occur when reading the file | |
89 | /vmunix to boot. When a disk drive is used to load the bootstrap code | |
90 | (the alternative would be that the bootstrap would be loaded from the console | |
91 | media), sector 0 of the disk drive and the file /boot in the root file | |
92 | system of that drive must also not have any of these errors in it. | |
93 | .PP | |
94 | The drivers which write a system core image on disk after a crash do not | |
95 | handle errors; thus the crash dump area must be free of errors and bad | |
96 | sectors. |