You are not logged in.

#1 2018-11-05 01:42:43

suudo
Member
Registered: 2018-11-05
Posts: 1

PXE boot

Hi, I've got a shortage of usb sticks around my office but I do have a pxe server. Attempting to copy the working arch pxe setup to include archlinux32 but I need archiso.img and vmlinuz and I'm not sure how to produce those files.

If anyone's done PXE with archlinux32 before, assistance would be greatly appreciated

Offline

#2 2018-11-05 02:36:13

levi
Moderator
From: UK
Registered: 2018-06-16
Posts: 159

Re: PXE boot

Not done a PXE installation of anything before now, but the installation isos are plain-ish iso9660 images that I was able to mount using the standard commands.  Under mountpoint/arch/i686/boot there's a promising looking vmlinux there and also a file called archiso.img which is an xz compressed cpio archive, which contains a kernel, some interesting looking files in hooks for you, and a very primitive rootfs.  There's also an EFI folder in the root of the mountpoint which might contain stuff of interest to you.

Offline

#3 2018-11-05 06:49:39

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 534
Website

Re: PXE boot

I did some setups with PXE/TFTP/NBD, see https://bbs.archlinux32.org/viewtopic.php?id=360

NBD is a little bit complex as you need a ramdisk with the proper hooks.

I did some PXE installations lately on very old machines (and machines without a CDROM drive or not being able to USB boot).

If you can boot https://www.plop.at/ on a floppy, you can boot from the USB stick normally from this bootloader.

I installed a tftp-hpa and put the usual TFTP-layout into /srv/tftp:

*.c32
pxelinux.0
pxelinux.bin

vmlinux-linux
archiso.img

and pxelinux.cfg/default with:

label linux
com32 cmd.c32
initrd archiso.img
linux vmlinuz-linux
append debug rw nomodeset ip=:::::eth0:dhcp archisobasedir=arch archiso_http_srv=http://server/archlinux-2018.08.01-i686.iso

The files can be taken from the ISO and put into /srv/tftpd:

boot/i686/vmlinuz and
boot/i686/archiso.img

The ISO can live on an HTTP server.

As long as you have 512 MB RAM, this procedure is fine. Otherwise you have to resort to some tricks like:

https://wiki.archlinux.org/index.php/PXE#Boot (copytoram)

or even create your own ISO image without loading to memory or extracting the installation files to an
NBD-block-device (the lowest configuration I was able to boot and install was a Pentium-S with 64 MB RAM).

Offline

#4 2018-11-05 06:54:37

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 534
Website

Re: PXE boot

If you want a ramdisk for inird you can alse copy /etc/mkinitcpio.conf to my.conf, then use
'mkinitcpio -c my.conf -g initramfs-for-pxe.img' (on a machine with the same architecture of course).
But a kernel and a ramdisk doesn't give you a root file system yet. There you can use NBD, NFS,
but again, this setup is tricky.

https://aur.archlinux.org/packages/mkinitcpio-nbd/
https://www.archlinux.org/packages/?nam … -nfs-utils

I would go with the installation CD image and install from there.

Offline

#5 2018-11-06 08:15:58

Markus12
Member
Registered: 2018-11-05
Posts: 3

Re: PXE boot

Hi everyone. So one more time what should I do to install PXE with archlinux32 to avoid all those mistakes which guys did before? Thank you.

Offline

#6 2018-11-06 14:54:57

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 534
Website

Re: PXE boot

So, what exactly should I document? How to mount the ISO and extract vmlinuz and archiso.img?
How to set up a TFTP, DHCP, Webserver?

Offline

#7 2018-11-07 08:08:25

Markus12
Member
Registered: 2018-11-05
Posts: 3

Re: PXE boot

Hi. It would be great to know how to mount the ISO. Thank you.

Offline

#8 2018-11-07 09:25:59

deep42thought
Administrator
From: Jena, Germany
Registered: 2017-06-17
Posts: 315

Re: PXE boot

I think it's not necessary to repeat all the details from the PXE guide which andreas_baumann linked.
The only thing, I would like to know (because I never succeeded in setting that up) is, how to configure an existing isc-dhcp-server to work together with tftp and some http server - but I probably just need some more reading on the dhcp server part.

regards,
deep42thought

Offline

#9 2018-11-07 09:29:27

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 534
Website

Re: PXE boot

I can just provide an OpenBSD flavour for that:

/etc/dhcpd.conf

allow booting;
allow bootp;
next-server 192.168.0.2;

    host ahostname {
      hardware ethernet 22:22:22:22:22:22:22;
      fixed-address 192.168.0.1;
      filename "pxelinux.0";
    }

Where 192.168.0.2 is the host serving TFTP.

...and why do I have to explain 'mount archlinux-2018.08.01-i686.iso /mnt'? :-)

Offline

Board footer

Powered by FluxBB