[CentOS] Booting OpenBSD with pxelinux

Paul Heinlein

heinlein at madboa.com
Fri Mar 28 23:39:34 UTC 2014


I've got PXE/TFTP setup for various Linux distributions and some 
utilities (clonezilla, dban, etc). I'm now starting in on OpenBSD.

As far as I've been able to figure out via internet searches, pxelinux 
(from the syslinux package) is unable to pass control of a machine 
directly to a BSD kernel. Instead, you have to use the BSD-supplied 
'pxeboot' loader. The naming conventions enforced by pxelinux mean 
that pxeboot must be called pxeboot.0.

Here's a simplified view of my tftpboot directory:

    etc/
    `-- boot.conf
    images/openbsd/
    `-- 5.4
        | -- amd64
        |    | -- bsd
        |    `-- pxeboot.0
        `-- i386
            | -- bsd
            `-- pxeboot.0

And here's a relevent snippet of my PXE menu file:

    LABEL openbsd-5.4.amd64
      MENU LABEL OpenBSD 5.4 amd64
      KERNEL images/openbsd/5.4/amd64/pxeboot.0

So far so good. If I boot the image listed above, I get the BSD boot 
loader -- but, and this is the crux of my question, afaict I have to 
type the location of the actual kernel manually:

boot> boot images/openbsd/5.4/amd64/bsd

After I type that, the OpenBSD installation kernel boots without a 
hitch. But manually typing the kernel path is prone to error, and it's 
not scriptable.

It appears that you can have one (and only one!) boot.conf file from 
which pxeboot can get some directions. Since I want to be able to 
serve up at least two different images (32- and 64-bits), I can't 
specify a kernel in boot.conf. The best I can do is print a banner, 
e.g.,

echo **********************************************************
echo The OpenBSD pxeboot utility cannot be passed an alterative
echo kernel path. So you'll have to issue one of the following
echo commands manually from the boot> prompt:
echo
echo boot images/openbsd/5.4/amd64/bsd
echo boot images/openbsd/5.4/i386/bsd
echo **********************************************************

My question: Does anyone else know a better way? Can I pass an 
alternative kernel path or boot.conf to pxeboot?

-- 
Paul Heinlein
heinlein at madboa.com
45°38' N, 122°6' W


More information about the CentOS mailing list