From owner-freebsd-questions Wed Nov 22 3:31: 4 2000 Delivered-To: freebsd-questions@freebsd.org Received: from shalimar.net.au (shalimar.net.au [198.142.161.98]) by hub.freebsd.org (Postfix) with ESMTP id 3DF1B37B4C5 for ; Wed, 22 Nov 2000 03:30:56 -0800 (PST) Received: from shalimar.net.au (localhost [127.0.0.1]) by shalimar.net.au (8.11.1/8.11.1) with SMTP id eAMBUlN02213; Wed, 22 Nov 2000 22:30:48 +1100 (EST) (envelope-from count@shalimar.net.au) From: Zero Sum Organization: Tobacco Chewers and Body Painters Association. Date: Wed, 22 Nov 2000 22:30:47 +1100 X-Mailer: KMail [version 1.1.99] Content-Type: text/plain; charset="us-ascii" To: dmp@aracnet.com, freebsd-questions@FreeBSD.ORG References: <3A1BA94B.D4E268DD@aracnet.com> In-Reply-To: <3A1BA94B.D4E268DD@aracnet.com> Subject: Re: Disklabel lost MIME-Version: 1.0 Message-Id: <00112222304707.00531@shalimar.net.au> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wednesday 22 November 2000 22:08, dmp@aracnet.com wrote: > I did something really stupid, I tried installing Windows 2000 on the > same disk as FreeBSD, after I had installed FreeBSD. (What can I say > sometimes I put my mind in gear before the hampster is in the wheel). > Win2k barfed on my UDMA/66 controller, so it wouldn't install, but when > I tried going back to FreeBSD, it barfed on me saying it couldn't find > any of my partitions (not even the root partition). > > So I load the fixit shell off the CD (using the live filesystem disc). > dmesg output says my disk is ad4, so I set to poking at the thing: > > Fixit# fdisk -1 ad4 > The data for partition 1 is: > sysid 165,(FreeBSD/NetBSD/386BSD) > start 63, size 40088097 (19574 Meg), flag 80 (active) > beg: cyl 0/ sector 1/ head 1; > end: cyl 1023/ sector 63/ head 15 > Fixit# disklabel -r ad4 > disklabel: bad pack magic number (label is damaged, or pack is unlabeled) > Fixit# disklabel ad4 > # /dev/ad4: > type: unknown > disk: amnesiac > label: fictitious > flags: > bytes/sector: 512 > sector/track: 63 > sectors/cylinder: 1008 > cylinders: 39770 > sectors/unit: 40088160 > rpm: 3600 > interleave: 1 > trackskew: 0 > cylinderskew: 0 > headswitch: 0 # milliseconds > track-to-track seek: 0 # milliseconds > drivedata: 0 > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 40088160 0 unused 0 0 # (Cyl. 0 - 39769 > > So if I'm reading this correctly, the disklabel is gone? Is this where > I reinstall FreeBSD, or do I have a chance of restoring? > I'm not an expert here, but I have been in your position, and no, all is not lost. You can create a file with a new disklabel and work from that. Recreating your partions is not impossible. I had my information written down and used /stand/sysinstall to relabel. However, that should not be necessary. Changing the fstype to ufs and creating the a partion oversized should get you back to single user mode. If you can glean enough information from the root filesystem to work out what the rest of the information should be, you modify your disklabel again (with a correctly sized root [a] partition). Next, try and recreate the b partion (swap), and keep going. Remember, if you mount each recreated partion as ro, then you are not going to destroy any information currently on the disk. So you even have room for some "trial and error". When you can mount all your filesystems, and they all fsck ok, you are home and hosed. Mind you, while I'd like to do this out of interest, I'd hate to have to do it. long slow and worrying job. That's the best I can do, so I would bide a while and see if the experts come up with a better solution. Geoff -- count@shalimar.net.au Nihil curo de ista tua stulta superstitione To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message