From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 11 17:15:47 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 480A716A41F for ; Sun, 11 Sep 2005 17:15:47 +0000 (GMT) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id A442B43D49 for ; Sun, 11 Sep 2005 17:15:43 +0000 (GMT) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j8BHFgBS075754 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 11 Sep 2005 19:15:42 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.12.10/8.12.10/Submit) with UUCP id j8BHFfcA075753; Sun, 11 Sep 2005 19:15:41 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost [127.0.0.1]) by klemm.apsfilter.org (8.13.3/8.13.1) with ESMTP id j8BHFRrr001789; Sun, 11 Sep 2005 19:15:27 +0200 (CEST) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost) by titan.klemm.apsfilter.org (8.13.3/8.13.1/Submit) id j8BHFQWi001788; Sun, 11 Sep 2005 19:15:26 +0200 (CEST) (envelope-from andreas) Date: Sun, 11 Sep 2005 19:15:26 +0200 From: Andreas Klemm To: Joe Koberg Message-ID: <20050911171526.GA1629@titan.klemm.apsfilter.org> References: <20050911103410.GA9536@titan.klemm.apsfilter.org> <4324426E.4010503@osoft.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4324426E.4010503@osoft.us> X-Operating-System: FreeBSD 5.4-STABLE X-Disclaimer: A free society is one where it is safe to be unpopular User-Agent: Mutt/1.5.9i Cc: hackers@FreeBSD.org Subject: Re: need hints to recover lost FreeBSD partition entries in MBR ... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2005 17:15:47 -0000 On Sun, Sep 11, 2005 at 09:42:54AM -0500, Joe Koberg wrote: > You might want /usr/ports/sysutils/scan_ffs > > from the package description: > > scan_ffs(8) recovers accidential lost or deleted disklabels. Thanks for the hint. It turns out for me that for some strange reason the FreeBSD Slice 4 doesnt start exactly on a Cylinder boundary :-( DragonFly or Partition Magic, one of these tools must be the culprit. Disk name: ad4 FDISK Partition Editor DISK Geometry: 19457 cyls/255 heads/63 sectors = 312576705 sectors (152625MB) Offset Size(ST) End Name PType Desc Subtype Flags 0 63 62 - 12 unused 0 63 24579387 24579449 ad4s1 7 fat 11 = 24579450 174080340 198659789 ad4s2 4 extended DOS 5 = 198659790 18860310 217520099 ad4s3 8 freebsd 165 = 217520100 95061708 312581807 - 12 unused 0 scan_ffs -s -b 217520100 ad4 ufs2 at 217528802 size 23761975 mount /data time Mon Jan 31 16:49:36 2005 off by 8702 (217528802-217520100=8702) detected partition start doesnt start on cylinder: 217528802/255/63=13540.54 Although I try to make the previous slice 3 a little larger sysinstall doesnt allow me to make the slice greater than up to the partition boundary. So I end up with that, see above 217520100/255/63=13540.00 Using sysinstall I cannot create a slightly wrong but working partition table to access my data again. Question: What can I use now to be able to re-create Slice 4 starting not exactly at partition boundary but instead at Sector 217528802 ???? I tried fdisk but cannot enter something like interactive mode. All it tells me is this: root@titan[ttyp3]{208} ~ fdisk ad4 ******* Working on device /dev/ad4 ******* parameters extracted from in-core disklabel are: cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT) start 63, size 24579387 (12001 Meg), flag 0 beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: sysid 5 (0x05),(Extended DOS) start 24579450, size 174080340 (85000 Meg), flag 0 beg: cyl 1023/ head 255/ sector 63; end: cyl 1023/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 198659790, size 18860310 (9209 Meg), flag 80 (active) beg: cyl 1023/ head 255/ sector 63; end: cyl 1023/ head 254/ sector 63 The data for partition 4 is: How can I enter interactice mode in fdisk ??? Andreas /// -- Andreas Klemm - Powered by FreeBSD 5.4 Need a magic printfilter today ? -> http://www.apsfilter.org/