|
|
1.1 ! root 1: .\" Copyright (c) 1985 The Regents of the University of California. ! 2: .\" All rights reserved. ! 3: .\" ! 4: .\" Redistribution and use in source and binary forms are permitted provided ! 5: .\" that: (1) source distributions retain this entire copyright notice and ! 6: .\" comment, and (2) distributions including binaries display the following ! 7: .\" acknowledgement: ``This product includes software developed by the ! 8: .\" University of California, Berkeley and its contributors'' in the ! 9: .\" documentation or other materials provided with the distribution and in ! 10: .\" all advertising materials mentioning features or use of this software. ! 11: .\" Neither the name of the University nor the names of its contributors may ! 12: .\" be used to endorse or promote products derived from this software without ! 13: .\" specific prior written permission. ! 14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 17: .\" ! 18: .\" @(#)badsect.8 6.3 (Berkeley) 6/24/90 ! 19: .\" ! 20: .TH BADSECT 8 "June 24, 1990" ! 21: .UC 4 ! 22: .SH NAME ! 23: badsect \- create files to contain bad sectors ! 24: .SH SYNOPSIS ! 25: .B /etc/badsect ! 26: bbdir sector ... ! 27: .SH DESCRIPTION ! 28: .I Badsect ! 29: makes a file to contain a bad sector. Normally, bad sectors ! 30: are made inaccessible by the standard formatter, which provides ! 31: a forwarding table for bad sectors to the driver; see ! 32: .IR bad144 (8) ! 33: for details. ! 34: If a driver supports the bad blocking standard it is much preferable to ! 35: use that method to isolate bad blocks, since the bad block forwarding ! 36: makes the pack appear perfect, and such packs can then be copied with ! 37: .IR dd (1). ! 38: The technique used by this program is also less general than ! 39: bad block forwarding, as ! 40: .I badsect ! 41: can't make amends for ! 42: bad blocks in the i-list of file systems or in swap areas. ! 43: .PP ! 44: On some disks, ! 45: adding a sector which is suddenly bad to the bad sector table ! 46: currently requires the running of the standard DEC formatter. ! 47: Thus to deal with a newly bad block ! 48: or on disks where the drivers ! 49: do not support the bad-blocking standard ! 50: .I badsect ! 51: may be used to good effect. ! 52: .PP ! 53: .I Badsect ! 54: is used on a quiet file system in the following way: ! 55: First mount the file system, and change to its root directory. ! 56: Make a directory BAD there. Run ! 57: .I badsect ! 58: giving as argument the BAD directory followed by ! 59: all the bad sectors you wish to add. ! 60: (The sector numbers must be relative to the beginning of ! 61: the file system, but this is not hard as the system reports ! 62: relative sector numbers in its console error messages.) ! 63: Then change back to the root directory, unmount the file system ! 64: and run ! 65: .IR fsck (8) ! 66: on the file system. The bad sectors should show up in two files ! 67: or in the bad sector files and the free list. Have ! 68: .I fsck ! 69: remove files containing the offending bad sectors, but ! 70: .B "do not" ! 71: have it remove the BAD/\fInnnnn\fR files. ! 72: This will leave the bad sectors in only the BAD files. ! 73: .PP ! 74: .I Badsect ! 75: works by giving the specified sector numbers in a ! 76: .IR mknod (2) ! 77: system call, ! 78: creating an illegal file whose first block address is the block containing ! 79: bad sector and whose name is the bad sector number. ! 80: When it is discovered by ! 81: .I fsck ! 82: it will ask ``HOLD BAD BLOCK''? ! 83: A positive response will cause ! 84: .I fsck ! 85: to convert the inode to a regular file containing the bad block. ! 86: .SH SEE ALSO ! 87: bad144(8), ! 88: fsck(8), ! 89: format(8V) ! 90: .SH DIAGNOSTICS ! 91: .I Badsect ! 92: refuses to attach a block that ! 93: resides in a critical area or is out of range of the file system. ! 94: A warning is issued if the block is already in use. ! 95: .SH BUGS ! 96: If more than one sector which comprise a file system fragment are bad, ! 97: you should specify only one of them to ! 98: .I badsect, ! 99: as the blocks in the bad sector files actually cover all the sectors in a ! 100: file system fragment.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.