Subject: Re: problem booting 1.6 on shuttle SS51G
To: Laine Stump <lainestump@rcn.com>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 01/22/2003 10:06:36
> I had *exactly* the same problem (right down to the "3"!) when I tried to 
> use a disk with NetBSD that had been installed using a different machine 
> that set different CHS parameters for the drive - in my case, the OS was 
> installed using a machine whose BIOS would only allow showing the disk as 
> 63 sectors * 240 heads * nnn cylinders, while the motherboard on the 
> machine I planned to actually *use* the disk on was set for 255 sectors * 
> 16 heads (this second machine is coincidentally a Shuttle SV24, and 255 
> sectors its default setting for auto-detected drives).
> 
> I solved the problem by going into the Shuttle BIOS and changing the detect 
> parameters for the hard disk from "AUTO" to "LBA". This makes the BIOS 
> report the disk as 63 sectors * 255 heads, which is close enough to make 
> things work.
> 
> Note that if you're trying to dual boot NetBSD & Windows on a disk, both 
> the #sectors AND #heads must match - even though both OSes ignore the BIOS 
> values once they're running, and can correctly see all partitions, the 
> NetBSD bootloader uses #sectors somewhere in its block number calculations, 
> and Windows (even Win2k) uses #sectors AND #heads.
> 
> I can't understand why the BIOS makers can't agree on a standard for this. 

Actually there are two sets of bios call for reading disks, one uses CHS
addressing, the other LBA.  Old bioses dont support LBA and (according
to some comments in the code) some that claim to support LBA don't
actually get it right.

Because of this, the netbsd boot code will only use LBA reads if it is
trying to read beyond the limit for CHS reads (typically 8GB).

This means that the CHS values in the bios partition table for the start
of the partition must be correct - ie must match the CHS-LBA translation
algorithm of the systems bios.

	David

-- 
David Laight: david@l8s.co.uk