Commit | Line | Data |
---|---|---|
c04656a2 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
79d6ffc9 | 5 | .\" @(#)bad144.8 5.1 (Berkeley) %G% |
c04656a2 | 6 | .\" |
79d6ffc9 | 7 | .TH BAD144 8 "18 July 1983" |
c04656a2 KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | bad144 \- read/write dec standard 144 bad sector information | |
11 | .SH SYNOPSIS | |
79d6ffc9 KM |
12 | .B /etc/bad144 |
13 | [ | |
14 | .B \-f | |
15 | ] | |
c04656a2 KM |
16 | disktype disk |
17 | [ sno [ | |
18 | bad ... | |
19 | ] ] | |
20 | .SH DESCRIPTION | |
21 | .I Bad144 | |
22 | can be used to inspect the information stored on a disk that is used by | |
23 | the disk drivers to implement bad sector forwarding. The format of | |
24 | the information is specified by DEC standard 144, as follows. | |
25 | .PP | |
26 | The bad sector information is located in the first 5 even numbered sectors | |
27 | of the last track of the disk pack. There are five identical copies of | |
79d6ffc9 KM |
28 | the information, described by the |
29 | .I dkbad | |
30 | structure. | |
c04656a2 KM |
31 | .PP |
32 | Replacement sectors are allocated starting with the first sector before | |
33 | the bad sector information and working backwards towards the beginning | |
34 | of the disk. A maximum of 126 bad sectors are supported. The position | |
35 | of the bad sector in the bad sector table determines which replacement | |
36 | sector it corresponds to. | |
79d6ffc9 | 37 | The bad sectors must be listed in ascending order. |
c04656a2 KM |
38 | .PP |
39 | The bad sector information and replacement sectors are conventionally | |
79d6ffc9 | 40 | only accessible through the ``c'' file system partition of the disk. If |
c04656a2 KM |
41 | that partition is used for a file system, the user is responsible for |
42 | making sure that it does not overlap the bad sector information or any | |
43 | replacement sectors. | |
44 | .PP | |
45 | The bad sector structure is as follows: | |
46 | .PP | |
47 | .ta .75i 1.5i 3.5i | |
48 | .nf | |
49 | struct dkbad { | |
50 | long bt_csn; /* cartridge serial number */ | |
51 | u_short bt_mbz; /* unused; should be 0 */ | |
52 | u_short bt_flag; /* -1 => alignment cartridge */ | |
53 | struct bt_bad { | |
54 | u_short bt_cyl; /* cylinder number of bad sector */ | |
55 | u_short bt_trksec; /* track and sector number */ | |
56 | } bt_bad[126]; | |
57 | }; | |
58 | .fi | |
59 | .PP | |
79d6ffc9 KM |
60 | Unused slots in the |
61 | .I bt_bad | |
62 | array are filled with all bits set, a putatively | |
c04656a2 KM |
63 | illegal value. |
64 | .PP | |
65 | .I Bad144 | |
66 | is invoked by giving a device type (e.g. rk07, rm03, rm05, etc.), and a device | |
67 | name (e.g. hk0, hp1, etc.). It reads the first sector of the last track | |
68 | of the corresponding disk and prints out the bad sector information. | |
69 | It may also be invoked giving a serial number for the pack and a list | |
70 | of bad sectors, and will then write the supplied information onto the | |
71 | same location. Note, however, that | |
72 | .I bad144 | |
73 | does not arrange for the specified sectors to be marked bad in this case. | |
74 | This option should only be used to restore known bad sector information which | |
75 | was destroyed. | |
79d6ffc9 | 76 | It is necessary to reboot before the change will take effect. |
c04656a2 | 77 | .PP |
79d6ffc9 KM |
78 | If the disk is an RP06, Fujitsu Eagle, |
79 | or Ampex Capricorn on a Massbus, the | |
80 | .B \-f | |
81 | option may be used to mark the bad sectors as ``bad''. | |
82 | \fBNOTE: this can only be done safely when there is no other disk activity\fP, | |
83 | preferably while running single-user. | |
84 | Otherwise, | |
85 | new bad sectors can be added only | |
86 | by running a formatter. | |
87 | Note that the order in which the sectors are listed determines which sectors | |
88 | used for replacements; if new sectors are being inserted into the list on a | |
89 | drive that is in use, care should be taken that replacements for | |
90 | existing bad sectors have the correct contents. | |
c04656a2 | 91 | .SH SEE ALSO |
79d6ffc9 KM |
92 | badsect(8), |
93 | format(8V) | |
c04656a2 | 94 | .SH BUGS |
79d6ffc9 | 95 | It should be possible to format disks on-line under UNIX. |
c04656a2 | 96 | .PP |
79d6ffc9 KM |
97 | It should be possible to mark bad sectors on drives of all type. |
98 | .PP | |
99 | On an 11/750, | |
100 | the standard bootstrap drivers used to boot the system do | |
101 | not understand bad sectors, | |
c04656a2 KM |
102 | handle ECC errors, or the special SSE (skip sector) errors of RM80 type disks. |
103 | This means that none of these errors can occur when reading the file | |
79d6ffc9 KM |
104 | /vmunix to boot. Sectors 0-15 of the disk drive |
105 | must also not have any of these errors. | |
c04656a2 KM |
106 | .PP |
107 | The drivers which write a system core image on disk after a crash do not | |
108 | handle errors; thus the crash dump area must be free of errors and bad | |
109 | sectors. |