From owner-freebsd-fs Sat Apr 26 04:02:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA18648 for fs-outgoing; Sat, 26 Apr 1997 04:02:04 -0700 (PDT) Received: from wall.jhs.no_domain (vector.muc.ditec.de [194.120.126.35]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA18601; Sat, 26 Apr 1997 04:01:33 -0700 (PDT) Received: from wall.jhs.no_domain (localhost [127.0.0.1]) by wall.jhs.no_domain (8.8.5/8.6.9) with ESMTP id BAA05626; Sat, 26 Apr 1997 01:43:22 +0200 (MET DST) Message-Id: <199704252343.BAA05626@wall.jhs.no_domain> To: "Reini (Reinhold Huber)" (Reinhold Huber) cc: freebsd-fs@freebsd.org Subject: Re: Recreating destroyed filesystem From: "Julian H. Stacey" Reply-To: "Julian H. Stacey" X-Email: jhs@freebsd.org, Fallback: jhs@gil.physik.rwth-aachen.de X-Web: http://www.freebsd.org/~jhs/ X-Company: Vector Systems Ltd, Unix & Internet Consultants. X-Address: Holz Strasse 27d, 80469 Munich, Germany X-Tel: Phone +49.89.268616, Fax +49.89.2608126, Data +49.89.26023276 X-Software: FreeBSD (Unix) + EXMH 1.6.9 (PGP key on web) In-reply-to: Your message of "Tue, 22 Apr 1997 18:29:35 +0200." Date: Sat, 26 Apr 1997 01:43:21 +0200 Sender: owner-fs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, Reference: > From: "Reini (Reinhold Huber)" > Subject: Re: Recreating destroyed filesystem > Date: Tue, 22 Apr 1997 18:29:35 +0200 (MET) > > Hi! > > My problem: I've screwed up my disk by typing > 'dd if=/dev/zero of=/dev/rsd0c count=20', > which was not at all healthy to the contens of my disk. I should really > have typed 'sd1' instead of 'sd0' :(. > Now I've jumpered SCSI ID 0 to ID 1 and installed FreeBSD on another disk > (now SCSI ID 0 / sd0). > The manpages of dumpfs and fs tell me that I need to find a superblock. > The questions: > > * Does the info the superblock contains allow to find the beginning of > the partition? No, Disklabel does (within a slice). > * How do I find the superblock? > * What is where in the superblock? Read /usr/include/sys/ disklabel.h diskslice.h > Aim is to get my user files back, and then using this disk for > 2.2[.1]-RELEASE. > > I habe been using FreeBSD 2.1.0-RELEASE on the machine, installed by > the /stand/sysinstall utility, using the default partition layout > computed before I upgraded memory from 16 to 48 MB. > > Any info, including hints on manpages, webpages, FAQs, ..., is valuable > for me. I would think you could just do something like disklabel -r -w sd1 same_old_label_name_as_before-Or_cloned_fake fsck -b 32 but I suggest doing a whole disc dd to tape first, to avoid errors, something along the lines of dd if=/dev/rsd1c of=/dev/rst0 bs=10k conv=sync (but not rsd1c if disk has fdisk type slices ?) > Thanks in advance, > Reinhold Huber Phone me to discuss it, if you want, 089 268616 I'm also in Munich like you ! Julian -- Julian H. Stacey jhs@freebsd.org http://www.freebsd.org/~jhs/