Subject: Re: Garbled message from bootblocks [ Re: bootxx_ffsv1 or bootxx_ffsv2? ]
To: <>
From: David Laight <>
List: current-users
Date: 08/12/2003 00:16:14
some further thoughts - which may be affected by a few pints of beer :-)

> OK, this helps thanks.  I've used fdisk to add a bootmenu, even
> though I only have one thing I want to boot, and rewritten
> mbr_bootsel as prompted.

fdisk -c /usr/mdec/mbr will (probably) install the bootcode that
boot the 'active' partition.

> I'm in this position because I have set up raid1 following the
> instructions at

share and enjoy :-)

> newfs /dev/wd0f
> /usr/sbin/installboot /dev/rwd0f /usr/mdec/bootxx_ffsv1 /usr/mdec/biosboot
> which succeeeds.  When I reboot, I get the menu with no garbage, I select
> 1 and then:
> NetBSD/i386 ffsv1 Primary Bootstrap
> Boot failed: Can't open /boot

You need to copy /usr/mdec/biosboot to wd0f:/boot

> NetBSD/i386 ufs Primary Bootstrap
> >> NetBSD/i386 BIOS, Revision 3.0

I'm not sure where it went to find that!
After the 'can't open boot' messagethe code does an 'int $0x18' bios call,
this was originally a call to execute the rom basic inetrpreter to to
a casette tape load (or similar), most systems go to a 'press a key to
restart the boot sequence'.

> [snip]
> booting hd0f:netbsd - starting in 0
> Here I have to interrupt it because hd0f:netbsd doesn't exist,
> only hd0a:netbsd does, so I have to enter this manually.  Doing
> this, everything boots OK.

It is more useful for systems with multiple root filesystems for the boot
code to look in the 'boot' partition for the kernel than to assume the 'a'

> 1) Why does the ffsv1 Primary Bootstrap fail?

/boot not in wd0f

> 2) Where on earth does it manage to find the ufs Primary Bootstrap?  I've got
>    a nasty feeling that if I do something slightly wrong here I'll
>    completely lose bootstrappability.

You can always boot from an install CD - just interrupt the boot.

> Since it starts looking for
>    hd0f:netbsd I'm guessing it must be in hd0f, though this doesn't make
>    much sense considering I newfs-ed it a few moments ago.

> 3) Why does it try to boot hd0f:netbsd and not hd0a:netbsd?

It has remembered the disk block of the start of the partition, and it
assuming the kernel (etc) is in the same place).

> Sadly, all existing examples are not helpful as they are all out of
> date.  I have no idea what I'm doing wrong or what to try next - any
> help appreicated as I'm way out of my depth.

I must commit the code that allows the boot filessytem to be part
of the mirrored raid volume....


David Laight: