Subject: Re: Installing 2.0.2 onto IBM 7248-100
To: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
From: Andy Ruhl <acruhl@gmail.com>
List: port-prep
Date: 07/25/2005 06:13:35
On 7/25/05, Jochen Kunz <jkunz@unixag-kl.fh-kl.de> wrote:
> On Sat, 23 Jul 2005 20:22:27 -0700
> Andy Ruhl <acruhl@gmail.com> wrote:
>=20
> > My follow on question is, do these things boot off the hard disk on
> > their own? I read a post from 2002 telling me how I need to have a
> > partition of type 65 first, and then I can put NetBSD after that, and
> > so on. Is this required?
> Yes. You need one MBR partition of type 65 for the kernel and an
> additional MBR partition for NetBSD. The later in turn contains the
> NetBSD disklabel(5)...

I did this, this is the post I followed:

http://mail-index.netbsd.org/port-prep/2002/07/26/0000.html

This one is a little old though, it says to use the "c" partition when
writing the kernel, I think we use the "d" now.

> > This is what I did, but I'm still netbooting the kernel at this point
> > and just going through the prompts to get it to boot from sd0a.
> You have to dd(1) the generic kernel to the special partition of type
> 65.
>=20
> Make sure you saved the output of fdisk(8) and disklabel(8), preferabley
> copy it to an other machine or to paper. You may overwrite the MBR
> partition table when the kernel is dd(8)ed to disk. In that case you
> have to restore the old MBR partition table.

I want to try this only after I have built my own kernel which knows
to boot from sd0a.

> > I tried netbooting the GENERIC kernel that comes with the 2.0.2
> > distribution sets, and I watched it with ethereal. There is an error,
> > something about out of space? Can we only netboot certain sized
> > kernels on these? Problem was, it said this after maybe 40 blocks, and
> > the generic.fs is certainly larger than that...
> I know of no error. But I know cases where puting the ethernet interface
> of the boot server into promiscues mode (tcpdump(8)) made netbooting
> impossible.

This wasn't it apparently. I don't know why, but I can't boot my
regular kernel file that I built. I think it must be a .fs file made
by mkbootimage?

> > If there is something I can read to get this thing to boot itself from
> > the hardware, I can take a crack at writing a short FAQ or boot guide
> > or something.
> Have a look at the mailing list archive. There are several posts of
> different methods to make the disk bootable.
>=20
> Usually I do it this way:
> save output of fdisk(8) and disklabel(8).
> dd(1) kernel image like generic.fs to raw disk.
>         ATTENTION! This overwrites the MBR partition table.
> restore MBR partition table according to saved fdisk(8) output.
> reboot and pray. ;-)
>=20
> Note: If you compile your own kernel you have to convert the ELF image
> to a .fs image including bootloader and kernel with mkbootimage(8).

There is no man page for mkbootimage(8) for prep. There is one for
some other archs, but not prep. All I found was when I built tools for
2.0.2, in my tools/bin directory there is a nbprep-mkbootimage binary.
I did help on it and it gives me this:

# ./nbprep-mkbootimage -h
usage: ./nbprep-mkbootimage <boot-prog> <boot-image> [<gzip'd kernel>]

I can't quite tell what that means. I'm going to try some stuff and report =
back.

Andy
> --
>=20
>=20
> tsch=FC=DF,
>        Jochen
>=20
> Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/
>=20
>