Subject: Re: "mbrlabel" weirdness - bug or feature?
To: Alec Muffett <alecm@crypticide.com>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: port-i386
Date: 02/18/2005 17:17:08
On Fri, Feb 18, 2005 at 11:42:56AM +0000, Alec Muffett wrote:
> * Because the Libretto would try and hibernate by writing its
> memory to BIOS cylinders in the area around cylinder 1024, I
> have to leave a gap in that area; I achieve this by creating a
> Linux Swap partition (#1) that extends a short distance either
> side of BIOS cylinder 1024, from 1010 to 1040, as shown in this
> "fdisk" output:
Is there a tighter definition of where the hibernation pages go? As
the only real constant of the hard disk is the total number of sectors,
having a definition in units of fictitious cylinders is rather scary..
> http://www.crypticide.com/users/alecm/albums/tmp/netbsd-diag/web-
> fdisk.jpg
> http://www.crypticide.com/users/alecm/albums/tmp/netbsd-diag/web-
> disklabel.jpg
>
> In "disklabel" notation:
>
> * partition "a" is the root filesystem, and resides within
> disk-partition #0, as shown above
>
> * partition "b" is the NetBSD swap partition, and also resides
> within disk-partition #0, as shown above
>
> * partition "c" is an overlay partition, which maps to the
> entirety of disk-partition #0
>
> * partition "d" is an overlay partition, which maps to the whole
> disk - all 30Gb of it.
>
> Hypothetically you then run the "mbrlabel" command, which updates
> your disklabel to contain entries for the other disk-partitions;
> however this is what you get:
>
>
> http://www.crypticide.com/users/alecm/albums/tmp/netbsd-diag/web-
> mbrlabel.jpg
>
> * partition "e" is the Linux swap partition (ie: hibernation
> space), mapping to disk-partiton #1
>
> * partition "f" is the BIG NetBSD partition, mapping to
> disk-partiton E0
>
> ...but look at that last entry! The one for partition "f"!
> It's tiny!
Based on the above, I think the following does what you want:
LIBRETTO:\
:dt=ESDI:se#512:ns#63:nt#16:sc#1008:nc#58140:\
:pa#15175440:oa#63:ta=4.2BSD:ba#8192:fa#1024:\
:pb#1050147:ob#15175503:tb=swap:\
:pc#58605057:oc#63:\
:pd#58605120:od#0:\
:pe#481950:oe#16225650:\
:pf#41897457:of#16707600:tf=4.2BSD:bf#8192:ff#1024:
(with the usual health warnings) so adding that to /etc/disktab, and
disklabel -w -r wd1 LIBRETTO
should do the trick..
Cheers,
Patrick