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.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
[EMAIL PROTECTED]      Senior Research Scientist, McAfee Research


_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to