Return to BSD News archive
Newsgroups: comp.unix.bsd.freebsd.misc Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!daffy!uwvax!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!news.sprintlink.net!EU.net!news.eunet.fi!KremlSun!rivendell.elvis.msk.su!news.uni-stuttgart.de!news.belwue.de!news.belwue.de!News.Uni-Marburg.DE!news.th-darmstadt.de!hrz-ws11.hrz.uni-kassel.de!phase23!citylink.dinoex.sub.org!peter From: peter@citylink.dinoex.sub.org (Peter Much) Subject: Re: HELP: disklabel'd the wrong disk Organization: Buero fuer Sektenforschung und Qualitaetspruefung in der Esoterik Message-ID: <DA5B3C.Mpy@citylink.dinoex.sub.org> References: <3rhntg$f6g@hydra.msgi.com> <3rjqn2$snh@bonnie.tcd-dresden.de> Date: Wed, 14 Jun 1995 04:28:23 GMT Lines: 25 In article <3rjqn2$snh@bonnie.tcd-dresden.de>, J Wunsch <joerg_wunsch@uriah.heep.sax.de> wrote: >Coranth Gryphon <gryphon@msgi.com> wrote: >>Hi. Is there any way to recover a disklabel if you overwrote >>it by mistake? Here's what happened. > >Unless you've got an excellent idea of your disk partitioning: no. It There would be the brute force method: Copy (dd) all disk contents into a file on a larger(*) disk. Copy out sections starting at different offsets. Check if fsck works on the sections. Let a script do this automatically using dd. I have saved data that way, and i consider this one of the great advantages of unix device philosophy. It gets even easier, if one knows magic-bytes or has a vague idea of the lost partitioning sheme. fsck should someway be able to tell the fs size, and from that data, the disklabel could be recalculated. If one is not so much interested in the disklabel, but instead in the data contained in the filesystems, this can be "sucked out" of the disk image files with dump. Peter (*) Elseway, work part by part. -- Write to: Peter Much * Koelnische Str. 22 * D-34117 Kassel * +49-561-774961 peter@citylink.dinoex.sub.org much@hrz.uni-kassel.de p.much@asco.nev.sub.de