Subject: Re: Direct disk editing & regenerating partition info.
To: Greywolf <greywolf@starwolf.com>
From: David Maxwell <david@vex.net>
List: current-users
Date: 05/23/2002 15:05:10
On Thu, May 23, 2002 at 11:02:17AM -0700, Greywolf wrote:
> Hi, David!
> 
> That's not what I asked, but thanks for playing!  :)

That was to solve Hisashi T Fujinaka's problem, not your question.
Even if /var/backups/ was on a filesystem whose disklabel was lost, it
will at least give some easy to find text to search the disk for...

strings /dev/rwd0d | less +/\/dev\/rwd0d:\$

If /var/backups was on /, then write a disklabel with an a partition
that's bigger than the original / was, mount it readonly (It doesn't
matter if the disklabel doesn't match - the fs code will read the
superblock) go read /var/backups and fix the disklabel...


As for your question, I think Greg already answered it. You're thinking
superblocks, right? The numbers printed while newfs runs?

/dev/rwd0d:     12656448 sectors in 12556 cylinders of 16 tracks, 63
sectors
        6179.9MB in 785 cyl groups (16 c/g, 7.88MB/g, 1984 i/g)
super-block backups (for fsck -b #) at:
 32, 16224, 32416, 48608, 64800, 80992, 97184, 113376,
[...]

							David

> I meant that sun sprinkles a few backup disklabels in weird spots on the
> disk such that if the master disklabel gets clobbered by something else
> (REDHAT/SPARC comes to mind :/ ), Solaris can recover the old label.
> 
> Heh.  I didn't realise those were created automagically; I used to do
> that exact thing by hand.