badsect.8 (96707) | badsect.8 (99501) |
---|---|
1.\" Copyright (c) 1985, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)badsect.8 8.1 (Berkeley) 6/5/93 | 1.\" Copyright (c) 1985, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)badsect.8 8.1 (Berkeley) 6/5/93 |
33.\" $FreeBSD: head/sbin/badsect/badsect.8 96707 2002-05-16 04:10:46Z trhodes $ | 33.\" $FreeBSD: head/sbin/badsect/badsect.8 99501 2002-07-06 19:34:18Z charnier $ |
34.\" 35.Dd June 5, 1993 36.Dt BADSECT 8 37.Os 38.Sh NAME 39.Nm badsect 40.Nd create files to contain bad sectors 41.Sh SYNOPSIS 42.Nm 43.Ar bbdir sector ... 44.Sh DESCRIPTION | 34.\" 35.Dd June 5, 1993 36.Dt BADSECT 8 37.Os 38.Sh NAME 39.Nm badsect 40.Nd create files to contain bad sectors 41.Sh SYNOPSIS 42.Nm 43.Ar bbdir sector ... 44.Sh DESCRIPTION |
45.Nm Badsect 46makes a file to contain a bad sector. Normally, bad sectors | 45The 46.Nm 47utility makes a file to contain a bad sector. Normally, bad sectors |
47are made inaccessible by the standard formatter, which provides 48a forwarding table for bad sectors to the driver. 49If a driver supports the bad blocking standard it is much preferable to 50use that method to isolate bad blocks, since the bad block forwarding 51makes the pack appear perfect, and such packs can then be copied with 52.Xr dd 1 . 53The technique used by this program is also less general than 54bad block forwarding, as --- 7 unchanged lines hidden (view full) --- 62.Tn DEC 63formatter. 64Thus to deal with a newly bad block 65or on disks where the drivers 66do not support the bad-blocking standard 67.Nm 68may be used to good effect. 69.Pp | 48are made inaccessible by the standard formatter, which provides 49a forwarding table for bad sectors to the driver. 50If a driver supports the bad blocking standard it is much preferable to 51use that method to isolate bad blocks, since the bad block forwarding 52makes the pack appear perfect, and such packs can then be copied with 53.Xr dd 1 . 54The technique used by this program is also less general than 55bad block forwarding, as --- 7 unchanged lines hidden (view full) --- 63.Tn DEC 64formatter. 65Thus to deal with a newly bad block 66or on disks where the drivers 67do not support the bad-blocking standard 68.Nm 69may be used to good effect. 70.Pp |
70.Nm Badsect 71is used on a quiet filesystem in the following way: | 71The 72.Nm 73utility is used on a quiet filesystem in the following way: |
72First mount the filesystem, and change to its root directory. 73Make a directory 74.Li BAD 75there. 76Run 77.Nm 78giving as argument the 79.Ar BAD --- 12 unchanged lines hidden (view full) --- 92.Em do not 93have it remove the 94.Pa BAD/ Ns Em nnnnn 95files. 96This will leave the bad sectors in only the 97.Li BAD 98files. 99.Pp | 74First mount the filesystem, and change to its root directory. 75Make a directory 76.Li BAD 77there. 78Run 79.Nm 80giving as argument the 81.Ar BAD --- 12 unchanged lines hidden (view full) --- 94.Em do not 95have it remove the 96.Pa BAD/ Ns Em nnnnn 97files. 98This will leave the bad sectors in only the 99.Li BAD 100files. 101.Pp |
100.Nm Badsect 101works by giving the specified sector numbers in a | 102The 103.Nm 104utility works by giving the specified sector numbers in a |
102.Xr mknod 2 103system call, 104creating an illegal file whose first block address is the block containing 105bad sector and whose name is the bad sector number. 106When it is discovered by 107.Xr fsck 8 108it will ask 109.Dq Li "HOLD BAD BLOCK \&?" . 110A positive response will cause 111.Xr fsck 8 112to convert the inode to a regular file containing the bad block. 113.Sh SEE ALSO 114.Xr fsck 8 115.Sh DIAGNOSTICS | 105.Xr mknod 2 106system call, 107creating an illegal file whose first block address is the block containing 108bad sector and whose name is the bad sector number. 109When it is discovered by 110.Xr fsck 8 111it will ask 112.Dq Li "HOLD BAD BLOCK \&?" . 113A positive response will cause 114.Xr fsck 8 115to convert the inode to a regular file containing the bad block. 116.Sh SEE ALSO 117.Xr fsck 8 118.Sh DIAGNOSTICS |
116.Nm Badsect 117refuses to attach a block that | 119The 120.Nm 121utility refuses to attach a block that |
118resides in a critical area or is out of range of the filesystem. 119A warning is issued if the block is already in use. 120.Sh BUGS 121If more than one sector which comprise a filesystem fragment are bad, 122you should specify only one of them to 123.Nm , 124as the blocks in the bad sector files actually cover all the sectors in a 125filesystem fragment. 126.Sh HISTORY 127The 128.Nm | 122resides in a critical area or is out of range of the filesystem. 123A warning is issued if the block is already in use. 124.Sh BUGS 125If more than one sector which comprise a filesystem fragment are bad, 126you should specify only one of them to 127.Nm , 128as the blocks in the bad sector files actually cover all the sectors in a 129filesystem fragment. 130.Sh HISTORY 131The 132.Nm |
129command appeared in | 133utility appeared in |
130.Bx 4.1 . | 134.Bx 4.1 . |