Subject: Re: GRUB + bootxx problem
To: David Laight <david@l8s.co.uk>
From: Joachim Thiemann <thiemann@gel.usherbrooke.ca>
List: port-i386
Date: 12/20/2003 15:33:22
On December 19, 2003 03:25, David Laight wrote:
> You need to run /sbin/installboot, not /usr/mdec/installboot. The former
> just copies bootxx_ffsv1 to the start of the partition without stomping
> all over the disklabel.
> You can then safely update /boot
On both my running system and the boot disk, installboot is in /usr/sbin,
which I used.
> > Anyways, the strange thing is that the old boot code worked from grub,
> > and the new one worked when loaded from the NetBSD MBR bootselector.
>
> Blame grub?
I'd love to :-) but I need it to boot Linux. (And I need linux for some
things) Anyways, grub is not doing much, but is doing this correctly -
reading and running the pbr bootcode - the message emitted is from the pbr.
It just can't seem to find the second (interactive) stage.
Now looking at pbr.S, it seems to look for that in the 3rd sector (so pbr is
in sector 0, a disklabel should be in sector 1 and the second stage should
be in sector 2? Also, I am assuming sector=512 bytes)
I tried zeroing sector 0 of /dev/rwd0a (equal to /dev/rwd0c? Kernel claims
that rwd0c is not configured but it is in the disklabel), and then verified
that installboot puts the pbr in there. Good. I tried zeroing sector 2 (dd
if=/dev/null of=/dev/rwd0a bs=512 count=1 seek=2) and again verified that
installboot wrote there. Also good. But it still won't run. Not Good.
(At each stage, including after zeroing, I verified with hexdump)
So, pbr just doesn't like the second stage - my question now is, what is the
magic number (I'll check the sources later) and where should it be? I'll
look for it using hexdump.
> Read the fdisk page instead, disklabel -B needs to be shot.
I did, and realized it's only for some other architectures instead (hp300,
vax, and arm32?). I'll try fdisk later. The NetBSD mbr bootselector did
boot the interactive bootloader properly... why? Is it bypassing the pbr?
Anyways, I'll keep trying...
Joe.
--
http://www.gel.usherbrooke.ca/thiemann