Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Relabel disk?



> I'm slightly fuzzy, but disk layout is generally:

> 0: 1st-stage boot
> 1: disklabel
> 2-15: 2nd-stage boot
> 16-N: filesystem

This does not sound right, and checking reveals that it is not how the
disk is laid out on my IPX.

Rather, what I see is

- Sector 0 contains the disklabel

- Sectors 1-15 contain first-stage bootblocks

- The filesystem begins at sector 0 as far as things such as newfs are
   concerned, but it is an FFS filesystem, and FFS deliberately avoids
   using the first 16 sectors of its partition, for exactly this
   reason: to leave space for bootblocks (and, later, disklabels).

- Second-stage bootblocks, if used, are in a location that depends on
   the code in the first-stage bootblocks.  In the case of my IPX, the
   block numbers of this code are written into the first-stage booter
   when the latter is installed; I have also seen first-stage
   bootblocks that know enough FFS to read the second-stage bootstrap
   out of the filesystem.

The disklabel must be in sector 0 of the drive.  I believe the
first-stage bootblocks must be in sectors 1-15 of the boot partition;
this does necessarily mean sectors 1-15 of the drive.  However, my IPX
is set up such that the boot partition begins at the beginning of the
drive, so this particular machine does not provide an example of the
distinction.

> In other words, the first 16 sectors of a ffs filesystem are left
> empty for boot/disklabel stuff.

Yes.

> (via rsd0c presumably, which is whole disk on sparc, again if I
> remember right)

The whole of sd0, yes: on sparc, like most ports not saddled with
peecee-style MBR partitioning, RAW_PART is 2.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index