Port of scan_ffs utility to FreeBSD

2003-02-27 Thread Michael Ranner

Hello!

I have started to add UFS2 support to Robert Watsons scan_ffs(8)
port from OpenBSD. Now it can recover properly the disklabel for
partitions with UFS1 and UFS2 filesystems. Scan_ffs has some
advantages over find-sb from /usr/src/tools, and it could fit
nice in the FreeBSD base system to recover lost disklabels
(ex. disklabel -rw ad0s1 floppy).

The output of scan_ffs -sl /dev/ad0s1, the original label was

  a:   52428804.2BSD 2048 16384 32776   # (Cyl.0 - 32*)
  b:  2097152   524288  swap# (Cyl.   32*- 163*)
  c: 209648250unused0 0 # (Cyl.0 - 1304)
  d:  2097152  26214404.2BSD 2048 16384 28512   # (Cyl.  163*- 293*)
  e:  1048576  47185924.2BSD 2048 16384 8   # (Cyl.  293*- 358*)
  f:  7372800  57671684.2BSD 2048 16384 28512   # (Cyl.  358*- 817*)
  g:  7824857 131399684.2BSD 2048 16384 28512   # (Cyl.  817*- 1304*)

should look like:

X: 524288 0 4.2BSD 2048 16384 1
X: 2097152 2621440 4.2BSD 2048 16384 1
X: 1048576 4718592 4.2BSD 2048 16384 1
X: 7372800 5767168 4.2BSD 2048 16384 1
X: 7824857 13139968 4.2BSD 2048 16384 1

So you simple have to replace X with the slice and to run disklabel -R ad0s1
and after this you can mount the filesystems.

Makefile, source and modified man pages are attached to this mail. Give it a
try and let me know your opinion.

Regards,

/\/\ichael Ranner

[EMAIL PROTECTED] - [EMAIL PROTECTED] - [EMAIL PROTECTED]
--
JAWA Management Software GmbH - http://www.jawa.at/
  Liebenauer Hauptstrasse 2oo - A-8041 Graz
Tel +43 316 403274 21 - Fax +43 316 403274 10
--
 Mariazell Online - http://www.mariazell.at/
--

-BEGIN GEEK CODE BLOCK-
GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS$ P+$ L-(+)$ E---
W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+++ PE(-) Y+ PGP(-)
t+ 5+ X+++() R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y?
--END GEEK CODE BLOCK--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message


Re: Port of scan_ffs utility to FreeBSD

2003-02-27 Thread Michael Ranner

Sorry,

here is the Attachement of scan_ffs

-- 
/\/\ichael Ranner

[EMAIL PROTECTED] - [EMAIL PROTECTED] - [EMAIL PROTECTED]
--
JAWA Management Software GmbH - http://www.jawa.at/
  Liebenauer Hauptstrasse 2oo - A-8041 Graz
Tel +43 316 403274 21 - Fax +43 316 403274 10
--
 Mariazell Online - http://www.mariazell.at/
--

-BEGIN GEEK CODE BLOCK-
GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS$ P+$ L-(+)$ E---
W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+++ PE(-) Y+ PGP(-)
t+ 5+ X+++() R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y?
--END GEEK CODE BLOCK--


scan_ffs_freebsd.tgz
Description: application/tgz


Re: Port of scan_ffs utility to FreeBSD

2003-02-27 Thread Garance A Drosihn
At 9:39 PM +0100 2/27/03, Michael Ranner wrote:
I have started to add UFS2 support to Robert Watsons scan_ffs(8)
port from OpenBSD.
This could be very useful!

Makefile, source and modified man pages are attached to this mail.
Give it a try and let me know your opinion.
Well, unless the code is magically encoded in the following block,
I think you forgot to attach something...
-BEGIN GEEK CODE BLOCK-
GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS$ P+$ L-(+)$ E---
W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+++ PE(-) Y+ PGP(-)
t+ 5+ X+++() R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y?
--END GEEK CODE BLOCK--


--
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message