On Wed, Jan 14, 2004 at 02:20:55PM -0500, Robert Watson wrote: > > On Wed, 14 Jan 2004, David Gilbert wrote: > > > Is there a set of bytes at some offset in a block that is common to any > > instance of a BSD ufs filesystem? I ask because recently my home > > machine erased it's fdisk block _and_ the bsdlabel with it. It > > certainly didn't have time to erase the whole disk, but I'm having > > trouble guessing where the partitions are. > > > > /usr/ports/sysutils/gpart will look for partitions on a disk ... but it > > only knows to look for bsd disklabels ... not bsd filesystems. Ideally, > > I'd like to make a bsd filesystem module for gpart with some pointers > > from the group. > > I ported the OpenBSD version of their scan_ffs to FreeBSD. However, it > only speaks UFS1: > > http://www.watson.org/~robert/freebsd/scan_ffs_freebsd4/ > > It might also require tweaking to even build on -CURRENT, as I haven't > lost any file systems recently enough to have needed to test. One of the > nice things about this tool is that it can generate output that can then > be fed into disklabel to write the disklabel you need back to disk.
A port of scan_ffs that support UFS1 and UFS2 was committed yesterday as sysutils/scan_ffs: http://www.freshports.org/sysutils/scan_ffs -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
pgp00000.pgp
Description: PGP signature