Subject: Re: "mbrlabel" weirdness - bug or feature?
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Alec Muffett <alecm@crypticide.com>
List: port-i386
Date: 02/18/2005 19:25:29
> 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..

Thanks, Pat,

In the end I did a spreadsheet, because trying to work it all out on 
paper was making my head hurt; as Quentin put it, the maths aren't 
hard, but you have to repeat the process for each and every partition, 
plus cope with the whole matter of fencepost errors when typing stuff 
in ("start at 16575, length 41565 - so that will stop *where*, and will 
that be *inclusive* of the last sector? Erm...")

It may not be terribly complex, however I *will* aver that the maths 
are not likely to make NetBSD very accessible to the masses who want to 
try it out on old, crummy hardware.  That you are required to be a 
particularly motivated geek in order to understand all this, does 
rather *spoil* the otherwise seamless simplicity of the installation.

Ironic, mildly - the reason I am trying NetBSD is to get away from 
J.Random Linux's lack of integration.


Following Quentin's suggestion, little things like the fact that the 
"c" and "d" partitions are not the same size, although they both 
ostensibly map the "whole disk" - things like that would have worried 
me had I not noticed the bootsectors not being counted in the "a" 
partition, shifting the start of the BSD stuff.

The spreadsheet - a mechanical process of "take BIOS cylinder address, 
convert to Sector Address, convert back to BSD cylinder address" *was* 
trivial, after accruing enough knowledge of the issues that were 
causing me grief, and after dismissing my original, "Linuxy" way of 
thinking, viz: "park a dead fdisk-partition over the gap".

As to Pat's question: the challenge of outthinking the crusty Libretto 
BIOS code is considerable; the machine has a Pentium 1 chip, at 133MHz, 
with 64Mb of memory and an unswerving dedication to CardBus/PCMCIA that 
makes it a pain to install; hence the "build the harddisk on something 
else, preferably equipped with a real keyboard" approach.

When hibernating, the BIOS overwrites counting backwards from 1024 (or 
rather, 1023) for 'n' BIOS-addressed cylinders - but apparently some 
corruption can occur *after* the 1024 boundry, presumably due to LBA 
cockups or similar.

Since I have 30Gb to play with, I am content to lose 125Mb either side 
of this boundry, and play safe; the purpose of the machine is to be 
backing-store for my digital camera whilst on motorcycle vacation later 
this year, so I want something that (1) has a big disk and (2) gives me 
"ssh", but (3) won't cause me to cry if it gets stolen.

I have a HD now configured and ready to go, but by virtue of the 
wet-string manner the harddisk is wired to my hackaround PC (viz: a 
2.5" to 3.5" adapter, and a 40-core cable, into a UDMA100 card) I am 
getting all sorts of transient / soft data errors when writing to the 
disk ("wd1e: error writing fsbn ... retrying ... interface CRC 
error...") - I am trying another experiment:

I am currently booting bootlap[12] via the PCMCIA floppy, with a 
802.11b wireless card in there; if it works, I can do future remote 
installations via the Wireless net (in a cybercafe, say) and a home FTP 
server; then I shall also try the ethernet PCMCIA install, now that I 
grok the partitions.

Thanks, guys.

	- alec


ps: I still believe the mbrlabel may have a bug, but am still not 
confident enough to log it, as per David Laight's e-mail.

--
Alec Muffett
alecm@crypticide.com
http://www.crypticide.com/dropsafe/