:: [DNG] PXE booting, initial notes
Página Inicial
Delete this message
Reply to this message
Autor: Mason Loring Bliss
Data:  
Para: DNG
Assunto: [DNG] PXE booting, initial notes
I want to be able to install via PXE booting, but Devuan doesn't (yet) provide
the tools for this. So, I've started poking around, and I've got something
crufted together. There's more work to do, but I wanted to share what I've got
now. Maybe it'll inspire someone and they'll cross the finish line sooner than
me.

I stared with netboot.tar.gz from Debian and a Devuan netboot ISO. My DHCP
server is Debian 9 right now, but this shouldn't matter much. I added this
extra bit of configuration, global scope in /etc/dhcp/dhcpd.conf.

    allow booting;
    next-server 1.2.3.4;
    filename "pxelinux.0";


Change 1.2.3.4 to the name or address of your DHCP/tftp server. I then
installed tftpd. Something that ends up being useful is adding the -s flag to
inetd.conf and restarting inetd, so that we don't have to edit all the files
we'll pull from the ISO. So, at the end of the appropriate line:

    /usr/sbin/in.tftpd -s /srv/tftp


The Debian netboot stuff is all relative paths, whereas the ISO looks for
/linux and /initrd.gz. The -s flag is fine for either Devuan or Debian.

We want pxelinux.0 from Debian's netboot.tar.gz until I learn how to build it
locally, so:

    cd /srv/tftp ; tar xf /path/to/debian/netboot.tar.gz
    rm ldlinux.c32 pxelinux.0 pxelinux.cfg version.info
    cp debian-installer/amd64/pxelinux.0 .
    rm -r debian-installer


(In short, we pulled out that one file, and nuked everything else.)

The rest of the bits come from the Devuan ISO:

    mount -o loop devuan_ascii_2.1_amd64_netinst.iso /mnt
    cp /mnt/isolinux/* .
    cp /mnt/linux .
    cp /mnt/initrd.gz .
    cp -r /mnt/install .
    mkdir pxelinux.cfg
    ln -s ../isolinux.cfg pxelinux.cfg/default


Note that you can't actually install from this yet, as what we boot is quite
literally the netinst CD's contents, and it wants to find an attahed CD, but
this is an initial set of notes, so we'll push on.

Next for me: I want to net-install Beowulf ZFS installs, based on my physical
media installs, so I'll write up notes about how to use debootstrap to build
an install environment we can netboot, presumably with an NFS root.

We should be able to identify the config bits that want a CD and swap in
config bits that just default to wanting a network mirror. If you take their
netboot.tar.gz initrd and unpack it:

    gzip -cd initrd.gz | cpio -id


in a directory somewhere, pay attention to, among other things:

    sbin/debian-installer*
    lib/debian-installer*


We presumably have all the tools we need, and just need to point debconf/d-i
in the right direction.

--
Mason Loring Bliss (( If I have not seen as far as others, it is because
mason@??? )) giants were standing on my shoulders. - Hal Abelson