Home
Search all pages
Subjects
By activity
Professions, Sciences, Humanities, Business, ...
User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...
Text Strings
Conversions, tests, processing, manipulation,...
Math
Integer, Floating point, Matrix, Statistics, Boolean, ...
Processing
Algorithms, Memory, Process control, Debugging, ...
Stored Data
Data storage, Integrity, Encryption, Compression, ...
Communications
Networks, protocols, Interprocess, Remote, Client Server, ...
Hard World Timing, Calendar and Clock, Audio, Video, Printer, Controls...
File System
Management, Filtering, File & Directory access, Viewers, ...
|
|
|
RocketLink!--> Man page versions:
OpenBSD
SCAN_FFS(8) OpenBSD System Manager's Manual SCAN_FFS(8)
NAME
scan_ffs - find UFS/FFS partitions on a disk
SYNOPSIS
scan_ffs [-lsv] [-b begin] [-e end] device
DESCRIPTION
This is the life-saver of typo's. If you have ever been working too
long, and just happened to type 'disklabel -rw sd0 floppy', instead of
'disklabel -rw fd0 floppy', you know what I am talking about.
This little program will take a raw disk device (which you might have to
create) that covers the whole disk, and finds all probable UFS/FFS parti-
tions on the disk. It has various options to make it go faster, and to
print out information to help in the reconstruction of the disklabel.
The following options are available:
-l This will make scan_ffs print out a string looking much like
the input to disklabel. With a little massaging, this output
can usually be used in the disklabel edit.
-s This tells scan_ffs to be smart about skipping partitions (when
it thinks it found a valid one). By not scanning partitions
for superblocks, the program completes a couple of orders of
magnitude faster. However, sometimes being smart is too good
for it's own good, especially if your disk has had a different
layout previously, or contains other non-UFS/FFS filesystems.
-v Tell scan_ffs to be verbose about what it is doing, and what it
has found.
-b begin Tell scan_ffs where to begin searching for filesystems. This
makes it easier to skip swap partitions, or other large non-
UFS/FFS partitions.
-e end Ditto for telling scan_ffs where to stop.
device This specifies which device scan_ffs should use to scan for
filesystems. Usually this device should cover the whole disk
in question.
The basic operation of this program is as follows:
1. Panic. You usually do so anyways, so you might as well get it over
with. Just don't do anything stupid. Panic away from your ma-
chine. Then relax, and see if the steps below won't help you out.
2. Try to find your old disklabel by any other means possible. This
includes printouts, backups, screendumps, and whatever other method
you can think of. The more information you have, the better your
chances are in recovering the disklabel of the disk.
3. Create a disklabel on the affected disk, which covers the whole
disk, and has at least one partition which covers the whole disk.
As the 'c' partition usually covers the whole disk anyways, this
sounds like a good place to start.
4. Run scan_ffs over this partition. If you have any information
about the disklabel which used to exist on the disk, keep that in
mind while scan_ffs spews out its things.
5. Use disklabel(8) to reconstruct the disklabel on the affected disk,
using all the information you gathered from scan_ffs and other
sources.
Last but certainly not least, we wish you good luck. The UFS/FFS
filesystems are pretty sturdy. I've seen them reconstructed after some
pretty weird and awesome fumbles. If you can't have backups, at least
have funky tools to help you out of a jam when they happen.
SEE ALSO
disklabel(8)
BUGS
It is not perfect, and could do a lot more things with date/time informa-
tion in the superblocks it finds, but this program has saved more than
one butt, more than once.
OpenBSD January 31, 1998 2
Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts Institute of Technology, Free Software Foundation, FreeBSD Inc., and others. |
(Corrections, notes, and links courtesy of RocketAware.com)
OpenBSD sources for scan_ffs(8)
Up to: File System Operations - Operations for entire file-systems (quotas, configuration, consistency, mount, unmount, et al)
RocketLink!--> Man page versions:
OpenBSD
Rapid-Links:
Search | About | Comments | Submit Path: RocketAware > man pages >
scan_ffs.8/
RocketAware.com is a service of Mib Software Copyright 1999, Forrest J. Cavalier III. All Rights Reserved. We welcome submissions and comments
|