Subject: Re: Problems with dual booting
To: None <atatat@atatdot.net>
From: Wolfgang Solfrank <ws@tools.de>
List: netbsd-help
Date: 04/05/2000 17:28:41
Hi,

> >The bios on newer PCs can access a disk with two methods.  For compatibility,
> >it supports the old method with its 1024 cylinder limitation.  The newer
> >method allows access to much larger disks (I'd have to look it up again,
> >if you need to know the exact number, but believe me, there is quite some
> >room left, even with todays rapidly growing disk sizes).
> 
> right...the old cylinder/head/sector method.  and i believe the new
> method is called logical block addressing.  the older method, if i'm
> not mistaken limited you to booting from the first 500 megs.

No, the old method is limited to 1024 cylinders, 255 heads and 63
sectors/track (don't ask me why this isn't 256 heads and 64 sectors/track).
This allows for slightly less than 8GB (to be exact, 16450560 sectors).

> fwiw - my bios offers "standard ide" and "enhanced ide".  given that
> the laptop is about a month old, i'm guessing that it's gonna support
> both.

Hmm, from your dump and the problem you're having, I infer that your
bios doesn't support the new method.  However, since all your partitions
start below the 8GB limit, this isn't your problem.  See below.

> >The netbsd bootmanager (as well as the standard netbsd mbr, and the netbsd
> >partition bootcode) does use the bios to read the kernel from disk, just as
> >its linux/freebsd counterparts.  It does however try to use the newer method,
> >it it determines that the old method wouldn't work.  Thus it is able to
> >boot from partitions beyond the 8GB limit.
> 
> um...do you perhaps have those to slightly backwards there?  :)

Hmm, I'm not sure what you mean by backwards.  All netbsd bootcodes try
the newer method to access the disk, if the bios claims to support it.
(The standard netbsd mbr and the netbsd partition bootcode do additional
checks to test whether it's really neccessary to use the new method or
whether the old method will do, as it looks as though there are some
bioses which get it wrong; with the bootmanager there isn't enough
room for this however.)

Now to your dumps:

The numbers for the explicit cylinder/head/sector look quite odd, except
for the start of the first partition.  The numbers for start and size
look ok.

To fix it, start fdisk with the "-u" option on your disk.  Then during
iteration through the partitions, answer "y" to the question "Do you
want to change it? [n] ".  On all the questions for the partition data,
simply accept the default values.  This should change the explicit
cylinder/head/sector information.  Then accept the partition entries
as ok, and at the end let it write back the new partition table.

After this procedure, you should be able to boot your machine again.

Don't ask me how those bogus values made their way into the mbr.
I've got no idea (except that you might have entered them yourself,
which I rather doubt).

FYI, to come back to the question whether your bios supports the newer
method to access the disk, the new method would have used the start
sector number, not the explicit begin cylinder/head/sector information.
Since you are using the netbsd bootmanager, and that one always uses the
new method to boot a partition, if that's available, it would have
worked.  But since your bios doesn't support the new method, the
bootmanager falls back to the old method, using those explicit numbers,
and since they are bogus, it fails.

Hope it helps.

Ciao,
Wolfgang
-- 
ws@TooLs.DE     Wolfgang Solfrank, TooLs GmbH 	+49-228-985800