2006-10-17 13:26:21 +04:00
|
|
|
.\" $NetBSD: scan_ffs.8,v 1.12 2006/10/17 09:26:21 wiz Exp $
|
2005-06-15 22:06:19 +04:00
|
|
|
.\" OpenBSD: scan_ffs.8,v 1.13 2004/12/14 00:04:21 jmc Exp
|
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2005 Juan Romero Pardines
|
|
|
|
.\" Copyright (c) 1997 Niklas Hallqvist, Tobias Weingartner
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2006-10-14 17:22:34 +04:00
|
|
|
.Dd October 14, 2006
|
2005-06-15 23:02:54 +04:00
|
|
|
.Dt SCAN_FFS 8
|
2005-06-15 22:06:19 +04:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
2005-09-11 03:08:37 +04:00
|
|
|
.Nm scan_ffs ,
|
|
|
|
.Nm scan_lfs
|
2006-09-07 04:48:21 +04:00
|
|
|
.Nd find FFSv1/FFSv2/LFS partitions on a disk or file
|
2005-06-15 22:06:19 +04:00
|
|
|
.Sh SYNOPSIS
|
2005-06-15 23:02:54 +04:00
|
|
|
.Nm
|
2005-06-15 22:06:19 +04:00
|
|
|
.Op Fl lv
|
|
|
|
.Op Fl e Ar end
|
2006-09-11 00:28:52 +04:00
|
|
|
.Op Fl F Ar file
|
2005-06-19 20:00:26 +04:00
|
|
|
.Op Fl s Ar start
|
2005-06-15 22:06:19 +04:00
|
|
|
.Ar device
|
|
|
|
.Sh DESCRIPTION
|
2005-09-10 00:21:39 +04:00
|
|
|
.Nm
|
2006-09-07 04:48:21 +04:00
|
|
|
will take a raw disk device that covers the whole disk or a file
|
|
|
|
and will find all possible FFSv[12]/LFS partitions, independent
|
|
|
|
of block sizes on it.
|
2005-09-11 03:08:37 +04:00
|
|
|
It will show the file system type (FFSv1, FFSv2, or LFS), size, and
|
|
|
|
offset.
|
2005-06-15 22:06:19 +04:00
|
|
|
Also it has an option to show the values with a disklabel-alike
|
|
|
|
output.
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
2005-06-19 20:00:26 +04:00
|
|
|
.Bl -tag -width XXsXstartXX
|
|
|
|
.It Fl e Ar end
|
|
|
|
Where to stop searching for file systems.
|
|
|
|
The
|
|
|
|
.Ar end
|
|
|
|
argument specifies the last sector that will be searched.
|
|
|
|
Default is the last sector of
|
|
|
|
.Ar device .
|
2006-09-07 06:24:51 +04:00
|
|
|
.It Fl F Ar file
|
2006-09-07 04:48:21 +04:00
|
|
|
Path to a file containing possible partitions inside of it.
|
2005-06-15 22:06:19 +04:00
|
|
|
.It Fl l
|
2005-06-19 20:00:26 +04:00
|
|
|
Print out a string looking much like the input to disklabel.
|
|
|
|
With a little massaging, this output can usually be used by
|
|
|
|
.Xr disklabel 8 .
|
2005-06-15 22:06:19 +04:00
|
|
|
.It Fl s Ar start
|
2005-06-19 20:00:26 +04:00
|
|
|
Where to start searching for file systems.
|
2005-06-15 22:06:19 +04:00
|
|
|
This makes it easier to skip swap
|
2005-09-10 00:21:39 +04:00
|
|
|
partitions or other large non-UFS/FFS partitions.
|
2005-06-19 20:00:26 +04:00
|
|
|
The
|
|
|
|
.Ar start
|
|
|
|
argument specifies the first sector that will be searched.
|
|
|
|
Default is the first sector of
|
|
|
|
.Ar device .
|
|
|
|
.It Fl v
|
|
|
|
Be verbose about what
|
2005-06-15 22:06:19 +04:00
|
|
|
.Nm
|
2005-06-19 20:01:38 +04:00
|
|
|
is doing, and what has been found.
|
2005-06-19 20:00:26 +04:00
|
|
|
.El
|
2005-06-15 22:06:19 +04:00
|
|
|
.Pp
|
2005-06-19 20:00:26 +04:00
|
|
|
The
|
|
|
|
.Ar device
|
|
|
|
argument specifies which device
|
2005-06-15 22:06:19 +04:00
|
|
|
.Nm
|
2005-06-19 20:00:26 +04:00
|
|
|
should scan for file systems.
|
2005-09-11 03:08:37 +04:00
|
|
|
.Pp
|
|
|
|
.Nm scan_lfs
|
|
|
|
is just another name for the same program, both behave in exactly
|
|
|
|
the same way.
|
2005-06-15 22:06:19 +04:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr disklabel 8
|
|
|
|
.Sh HISTORY
|
2005-06-15 23:02:54 +04:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program first appeared in
|
|
|
|
.Ox 2.3
|
|
|
|
and then in
|
2006-08-12 14:14:22 +04:00
|
|
|
.Nx 3.1 .
|
2006-09-07 04:48:21 +04:00
|
|
|
Support for searching in files was added in
|
|
|
|
.Nx 4.0 .
|
2005-06-15 22:06:19 +04:00
|
|
|
.Sh AUTHORS
|
2005-06-19 20:00:26 +04:00
|
|
|
.An -nosplit
|
2005-06-15 23:02:54 +04:00
|
|
|
.Nm
|
|
|
|
was written for
|
|
|
|
.Ox
|
|
|
|
by
|
|
|
|
.An Niklas Hallqvist
|
|
|
|
and
|
|
|
|
.An Tobias Weingartner .
|
|
|
|
It was ported to
|
|
|
|
.Nx
|
|
|
|
by
|
2005-09-11 03:08:37 +04:00
|
|
|
.An Juan Romero Pardines ,
|
2006-10-14 17:22:34 +04:00
|
|
|
who added support for LFS/FFSv2,
|
|
|
|
partitions with fragsize/blocksize greater than
|
2006-10-17 13:26:21 +04:00
|
|
|
2048/16384 for FFSv1, searching on files, etc.
|
2005-06-15 22:06:19 +04:00
|
|
|
.Sh BUGS
|
2005-06-19 20:00:26 +04:00
|
|
|
Currently
|
|
|
|
.Nm
|
2006-10-14 17:22:34 +04:00
|
|
|
won't find partitions with fragsize/blocksize greater than
|
|
|
|
8192/65536.
|