Annotation of embedaddon/scan_ffs/scan_ffs.8, revision 1.1

1.1     ! misho       1: .\"    $OpenBSD: scan_ffs.8,v 1.11 2000/11/09 17:53:07 aaron Exp $
        !             2: .\"
        !             3: .\" Copyright (c) 1997 Niklas Hallqvist, Tobias Weingartner
        !             4: .\" Copyright (c) 2002, 2003 Robert Watson, Michael Ranner
        !             5: .\" All rights reserved.
        !             6: .\"
        !             7: .\" Redistribution and use in source and binary forms, with or without
        !             8: .\" modification, are permitted provided that the following conditions
        !             9: .\" are met:
        !            10: .\" 1. Redistributions of source code must retain the above copyright
        !            11: .\"    notice, this list of conditions and the following disclaimer.
        !            12: .\" 2. Redistributions in binary form must reproduce the above copyright
        !            13: .\"    notice, this list of conditions and the following disclaimer in the
        !            14: .\"    documentation and/or other materials provided with the distribution.
        !            15: .\"
        !            16: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
        !            17: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        !            18: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            19: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            20: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        !            21: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        !            22: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        !            23: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        !            24: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
        !            25: .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        !            26: .\"
        !            27: .\" .TH scan_ffs 8
        !            28: .Dd January 31, 1998
        !            29: .Dt SCAN_FFS 8
        !            30: .Os
        !            31: .Sh NAME
        !            32: .Nm scan_ffs
        !            33: .Nd find UFS/FFS partitions on a disk
        !            34: .Sh SYNOPSIS
        !            35: .Nm scan_ffs
        !            36: .Op Fl lsv
        !            37: .Op Fl b Ar begin
        !            38: .Op Fl e Ar end
        !            39: .Ar device
        !            40: .Sh DESCRIPTION
        !            41: This is the life-saver of typos.
        !            42: If you have ever been working too long,
        !            43: and just happened to type 'disklabel -rw da0 floppy', instead of 'disklabel
        !            44: -rw fd0 floppy', you know what I am talking about.
        !            45: .Pp
        !            46: This little program will take a raw disk device (which you might have to
        !            47: create) that covers the whole disk, and finds all probable UFS/FFS partitions
        !            48: on the disk.
        !            49: It has various options to make it go faster, and to print out
        !            50: information to help in the reconstruction of the disklabel.
        !            51: .Pp
        !            52: The options are as follows:
        !            53: .Bl -tag -width Ds
        !            54: .It Fl l
        !            55: This will make
        !            56: .Nm
        !            57: print out a string looking much like the input to disklabel.
        !            58: With a little massaging, this output can usually be used in the disklabel edit.
        !            59: .Pp
        !            60: .It Fl s
        !            61: This tells
        !            62: .Nm
        !            63: to be smart about skipping partitions (when it thinks it found a valid one).
        !            64: By not scanning partitions for superblocks, the program completes a couple of
        !            65: orders of magnitude faster.
        !            66: However, sometimes being smart is too good for
        !            67: its own good,
        !            68: especially if your disk has had a different layout previously, or contains
        !            69: other non-UFS/FFS filesystems.
        !            70: .Pp
        !            71: .It Fl v
        !            72: Tell
        !            73: .Nm
        !            74: to be verbose about what it is doing, and what it has found.
        !            75: .Pp
        !            76: .It Fl b Ar begin
        !            77: Tell
        !            78: .Nm
        !            79: where to begin searching for filesystems.
        !            80: This makes it easier to skip swap
        !            81: partitions, or other large non-UFS/FFS partitions.
        !            82: .Pp
        !            83: .It Fl e Ar end
        !            84: Ditto for telling
        !            85: .Nm
        !            86: where to stop.
        !            87: .Pp
        !            88: .It Ar device
        !            89: This specifies which device
        !            90: .Nm
        !            91: should use to scan for filesystems.
        !            92: Usually this device should cover the whole disk in question.
        !            93: .Pp
        !            94: .El
        !            95: .Pp
        !            96: The basic operation of this program is as follows:
        !            97: .Bl -enum -width "1111"
        !            98: .It
        !            99: Panic.
        !           100: You usually do so anyways, so you might as well get it over with.
        !           101: Just don't do anything stupid.
        !           102: Panic away from your machine.
        !           103: Then relax, and see if the steps below won't help you out.
        !           104: .It
        !           105: Try to find your old disklabel by any other means possible.
        !           106: This includes
        !           107: printouts, backups, screendumps, and whatever other method you can think of.
        !           108: The more information you have, the better your chances are in recovering the
        !           109: disklabel of the disk.
        !           110: .Pp
        !           111: .It
        !           112: Create a disklabel on the affected disk, which covers the whole disk, and has
        !           113: at least one partition which covers the whole disk.
        !           114: As the
        !           115: .Dq c
        !           116: partition
        !           117: usually covers the whole disk anyways, this sounds like a good place to start.
        !           118: .Pp
        !           119: .It
        !           120: Run
        !           121: .Nm
        !           122: over this partition.
        !           123: If you have any information about the disklabel
        !           124: which used to exist on the disk, keep that in mind while
        !           125: .Nm
        !           126: spews out its things.
        !           127: .Pp
        !           128: .It
        !           129: Use
        !           130: .Xr disklabel 8
        !           131: to reconstruct the disklabel on the affected disk, using
        !           132: all the information you gathered from
        !           133: .Nm
        !           134: and other sources.
        !           135: .Pp
        !           136: .El
        !           137: .Pp
        !           138: Last but certainly not least, we wish you good luck.
        !           139: The UFS/FFS filesystems are pretty sturdy.
        !           140: I've seen them reconstructed after some pretty weird and
        !           141: awesome fumbles.
        !           142: If you can't have backups, at least have funky tools to help
        !           143: you out of a jam when they happen.
        !           144: .Sh SEE ALSO
        !           145: .Xr disklabel 8
        !           146: .Sh HISTORY
        !           147: The
        !           148: .Nm
        !           149: utility first appeared in
        !           150: OpenBSD 2.3 and was ported to
        !           151: .Fx
        !           152: by Robert Watson. UFS2 Support was added by Michael Ranner.
        !           153: .Sh BUGS
        !           154: It is not perfect, and could do a lot more things with date/time information
        !           155: in the superblocks it finds, but this program has saved more than one butt,
        !           156: more than once.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>