From owner-freebsd-fs Thu Feb 27 12:40:10 2003 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0557337B405; Thu, 27 Feb 2003 12:40:08 -0800 (PST) Received: from smtp.inode.at (goliath.inode.at [195.58.161.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F72143FBF; Thu, 27 Feb 2003 12:40:04 -0800 (PST) (envelope-from mranner@inode.at) Received: from line186.adsl-dynamic.inode.at ([213.229.7.186]) by smtp.inode.at with esmtp (Exim 3.34 #1) id 18oUoy-0007RL-00; Thu, 27 Feb 2003 21:40:00 +0100 From: Michael Ranner To: freebsd-fs@freebsd.org Subject: Port of scan_ffs utility to FreeBSD Date: Thu, 27 Feb 2003 21:39:38 +0100 User-Agent: KMail/1.5 Cc: freebsd-current@freebsd.org, Garance A Drosihn , Hiten Pandya , Robert Watson MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302272139.38798.mranner@inode.at> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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: 524288 0 4.2BSD 2048 16384 32776 # (Cyl. 0 - 32*) b: 2097152 524288 swap # (Cyl. 32*- 163*) c: 20964825 0 unused 0 0 # (Cyl. 0 - 1304) d: 2097152 2621440 4.2BSD 2048 16384 28512 # (Cyl. 163*- 293*) e: 1048576 4718592 4.2BSD 2048 16384 8 # (Cyl. 293*- 358*) f: 7372800 5767168 4.2BSD 2048 16384 28512 # (Cyl. 358*- 817*) g: 7824857 13139968 4.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 mranner@jawa.at - mranner@bitonline.cc - webmaster@mariazell.at ---------------------------------------------------------------------- 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 majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message