From owner-freebsd-questions Sun Nov 10 1:32:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE02937B401 for ; Sun, 10 Nov 2002 01:32:45 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B8E143E42 for ; Sun, 10 Nov 2002 01:32:44 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gAA9WZpj067326 for ; Sun, 10 Nov 2002 09:32:35 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id gAA9WUTK067321 for questions@FreeBSD.ORG; Sun, 10 Nov 2002 09:32:30 GMT Date: Sun, 10 Nov 2002 09:32:30 +0000 From: Matthew Seaman To: questions@FreeBSD.ORG Subject: Re: Help with lost partition info. Message-ID: <20021110093230.GA67029@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-2.2 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_05_08, USER_AGENT,USER_AGENT_MUTT version=2.43 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Nov 09, 2002 at 04:04:56PM -0800, Derrick MacPherson wrote: > I lost my partition info during an upgrade. I never actually wnet ahead > with the upgrade, yet but I guess I overwrote the info that says whre my > partitions are mounted, and I'm unsure whichi is which.. I don't want to > map / to the wrong partition and have the /etc/master.passwd and other > important files overwritten. I have the latest boot floppies, and I can > get to sysinstall - I'm wondering if there is a way to get the proper info > off the disks? I have a large partition that I can overwrite if it's > worth doing a minimal install to that partition to read teh origional > fstab file, but is there a easier or better way? I have to get this back > up ASAP, so anything that is quick and easy (HA!) would be great... This is one of those maximum frustration situations: you know the data is still there on the disk, but you can't get to it. All you need to do is reconstruct the disk slice and partition tables, but if you don't get it exactly right you won't achieve anything. *The* quick and easy solution is to have had the foresight to keep offline copies of the output of 'fdisk da0' and 'disklabel -r da0s1' (for whatever values of da0 or da0s1 are appropriate for you system). Print out of both of those should fit onto a single sheet of A4 or letter paper. Make a habit of printing out this information as part of the standard routine of setting up a new machine. Keep the printouts with your level 0 backups. Failing that, your best bet is the sysutils/gpart port -- http://home.pages.de/~michab/gpart/ or http://www.stud.uni-hannover.de/user/76201/gpart/ Of course, to use that you need a running system: your best bets are either to pull the disk out of the trashed machine, add it to a working system and run gpart on it from there (the other system doesn't necessarily have to be FreeBSD: a Linux box would do as well) --- or grab a copy of the staticly linked gpart program from Michail Brzitwa's site, write it onto a floppy and then boot the system to single user mode from the install CDs, mount the floppy and away you go. Fixit mode should work for this purpose: http://www.freebsd.org/relnotes/4-STABLE/installation/i386/trouble.html Section 4.1. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message