Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!howland.reston.ans.net!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry From: terry@cs.weber.edu (A Wizard of Earth C) Subject: Re: Help with restoring my drive Message-ID: <1993Jun11.065650.28966@fcom.cc.utah.edu> Sender: news@fcom.cc.utah.edu Organization: Weber State University (Ogden, UT) References: <Mg4f2JW00WB54AlJYb@andrew.cmu.edu> <1993Jun7.215922.6403@fcom.cc.utah.edu> <C8BM7q.HM8@veda.is> Date: Fri, 11 Jun 93 06:56:50 GMT Lines: 40 In article <C8BM7q.HM8@veda.is> adam@veda.is (Adam David) writes: >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? It *would* work if you knew where the backup superblocks were. >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. It also supposes a valid disklabel with exactly the same geometry as before; if you have to find that out, the only think you can look at safely is the first partition until you have the others squared away. If he remebered his disklabel exactly, he could newfs -N, but not otherwise. Disaster recovery always sucks. Terry Lambert terry@icarus.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.