xref: /netbsd-src/sbin/scan_ffs/scan_ffs.8 (revision e5548b402ae4c44fb816de42c7bba9581ce23ef5)
1.\"	$NetBSD: scan_ffs.8,v 1.6 2005/09/10 23:08:37 wiz Exp $
2.\"     OpenBSD: scan_ffs.8,v 1.13 2004/12/14 00:04:21 jmc Exp
3.\"
4.\" Copyright (c) 2005 Juan Romero Pardines
5.\" Copyright (c) 1997 Niklas Hallqvist, Tobias Weingartner
6.\" All rights reserved.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27.\"
28.Dd September 10, 2005
29.Dt SCAN_FFS 8
30.Os
31.Sh NAME
32.Nm scan_ffs ,
33.Nm scan_lfs
34.Nd find FFSv1/FFSv2/LFS partitions on a disk
35.Sh SYNOPSIS
36.Nm
37.Op Fl lv
38.Op Fl e Ar end
39.Op Fl s Ar start
40.Ar device
41.Sh DESCRIPTION
42.Nm
43will take a raw disk device that covers the whole disk and will find
44all possible FFSv[12]/LFS partitions, independent of block sizes, on
45the disk.
46It will show the file system type (FFSv1, FFSv2, or LFS), size, and
47offset.
48Also it has an option to show the values with a disklabel-alike
49output.
50.Pp
51The options are as follows:
52.Bl -tag -width XXsXstartXX
53.It Fl e Ar end
54Where to stop searching for file systems.
55The
56.Ar end
57argument specifies the last sector that will be searched.
58Default is the last sector of
59.Ar device .
60.It Fl l
61Print out a string looking much like the input to disklabel.
62With a little massaging, this output can usually be used by
63.Xr disklabel 8 .
64.It Fl s Ar start
65Where to start searching for file systems.
66This makes it easier to skip swap
67partitions or other large non-UFS/FFS partitions.
68The
69.Ar start
70argument specifies the first sector that will be searched.
71Default is the first sector of
72.Ar device .
73.It Fl v
74Be verbose about what
75.Nm
76is doing, and what has been found.
77.El
78.Pp
79The
80.Ar device
81argument specifies which device
82.Nm
83should scan for file systems.
84.Pp
85.Nm scan_lfs
86is just another name for the same program, both behave in exactly
87the same way.
88.Sh SEE ALSO
89.Xr disklabel 8
90.Sh HISTORY
91The
92.Nm
93program first appeared in
94.Ox 2.3
95and then in
96.Nx 4.0 .
97.Sh AUTHORS
98.An -nosplit
99.Nm
100was written for
101.Ox
102by
103.An Niklas Hallqvist
104and
105.An Tobias Weingartner .
106It was ported to
107.Nx
108by
109.An Juan Romero Pardines ,
110who also added LFS and FFSv2 support.
111.Sh BUGS
112Currently
113.Nm
114won't find FFSv1 partitions with fragsize/blocksize greater than
1152048/16384, and FFSv2 partitions with fragsize/blocksize greater
116than 8192/65536.
117