Subject: /boot vs. /boot.MACHINE log 1
To: NetBSD Current Users <>
From: Barry Bouwsma <>
List: current-users
Date: 07/29/2004 14:06:02
[keep replies on the list, not to me, to avoid bounces, thanks]


I'm going well past what a Normal User should be doing, but hey.
The man page for `installboot' seems to hint that at boot time,
a file named `/boot.MACHINE' will be searched before `/boot',
but that appears not to be the case for my i386.

For some insane reason, I'm wanting to boot NetBSD kernel/loader
from a FreeBSD partition on a single-partition disk.  I've
successfully hacked the various parts of the loader to live on
a type-165 disk, and I have `grub' happily choosing between the
bootxx_ffsv1 in the disklabel and FreeBSD's /boot/loader.

Now, bootxx_ffsv1 wants to look for /boot only, not /boot.i386 .
I haven't looked hard at what the other architectures do.  I've
hacked boot1.c to first try /boot.i386 successfully with a hack
like the below, and I'm happily able to load /boot.i386 while
/boot/ is present, wheee.

Is this sort of functionality something desirable, or only for
selected other platforms?  Or am I nuts?

Also, it's a bit unwieldy for me to do things this way, when I
can tell grub to use the single /boot/loader from FreeBSD.  Is
it theoretically possible to build a single target file which
can be in a regular filesystem and does all the work that the
combined boot programs do to load the kernel?  Just wondering.
I seem to recall that a while back, a single program was split
into two, part in the disklabel and the rest in the filesystem,
which occasionally caused me grief.

(If anyone wonders, my gymnastics are due to having the existing
single partition, yet wanting a NetBSD installation to live on a
portable external disk for which I have no BIOS support, also on
machines whose internal IDE controllers are so hideous that if I
could, I'd avoid using them at all, as well as just seeing if it
is possible to do successfully, which it seems to be, yay.)

barry bouwsma

AIEEE, I forgot to make a patch from my hacks, and my sources
are several hours away from me, sorry...