*BSD News Article 16975


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!torn!nott!bnrgate!bnr.co.uk!pipex!sunic!isgate!veda.is!adam
From: adam@veda.is (Adam David)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Help with restoring my drive
Message-ID: <C8BM7q.HM8@veda.is>
Date: 8 Jun 93 20:57:11 GMT
References: <Mg4f2JW00WB54AlJYb@andrew.cmu.edu> <1993Jun7.215922.6403@fcom.cc.utah.edu>
Organization: Veda Systems, Iceland
Lines: 26

terry@cs.weber.edu (A Wizard of Earth C) writes:

>2)	Using dd with the appropriate block size and count and skip, get
>	a copy of one of the backup superblocks into a file, and using
>	the reverse of the process, write over the (now corrupt) block
>	at the front of your disk.

What's wrong with good old 'fsck -b ...' or even straight 'fsck' for that
matter (sorry I forgot the partition boundaries are screwed). Before I got
round to crippling my system it was trashing superblocks 10 times a day, and
I never had to use dd for that particular purpose. Actually, shouldn't
'fsck -b ...' do the job of fixing the superblock even if the filesystem
is totally munged?

About writing a new disklabel, what exactly is preventing that from happening?

>2)	Go to the mkfs sources, and, given the options used when the
>	disk was built (or, hope beyond hope, the defaults for the disk
>	partition of that size and start/end/block geometry), calculate
>	by hand where the backup superblocks would have been put.

try 'newfs -N ...'
Of course that probably presupposes that newfs was used in the first place.

--
adam@veda.is