Date: Thu, 27 Feb 2003 21:39:38 +0100 From: Michael Ranner <mranner@inode.at> To: freebsd-fs@freebsd.org Cc: freebsd-current@freebsd.org, Garance A Drosihn <drosih@rpi.edu>, Hiten Pandya <hiten@unixdaemons.com>, Robert Watson <rwatson@FreeBSD.org> Subject: Port of scan_ffs utility to FreeBSD Message-ID: <200302272139.38798.mranner@inode.at>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302272139.38798.mranner>