Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Nov 2002 09:32:30 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        questions@FreeBSD.ORG
Subject:   Re: Help with lost partition info.
Message-ID:  <20021110093230.GA67029@happy-idiot-talk.infracaninophi>
In-Reply-To: <Pine.LNX.4.44.0211091600370.12804-100000@mercuryfilmworks.com>
References:  <Pine.LNX.4.44.0211091600370.12804-100000@mercuryfilmworks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021110093230.GA67029>