Difference between revisions of "PXE"

From ArchWiki
Jump to navigation Jump to search
m (Low memory: mediawiki is hard)
(Existing PXE Server: Clarify about ip= parameter and pointed to usage examples)
 
(57 intermediate revisions by 21 users not shown)
Line 1: Line 1:
[[Category:Getting and installing Arch]]
+
[[Category:Installation process]]
 
[[Category:Networking]]
 
[[Category:Networking]]
 
[[Category:Boot process]]
 
[[Category:Boot process]]
 
[[es:PXE]]
 
[[es:PXE]]
 
[[fr:Install PXE]]
 
[[fr:Install PXE]]
[[zh-cn:PXE]]
+
[[ja:PXE]]
 +
[[ru:PXE]]
 +
[[zh-hans:PXE]]
 +
{{Move|Preboot Execution Environment|[[ALSA]] is named [[Advanced Linux Sound Architecture]].}}
 
{{Related articles start}}
 
{{Related articles start}}
{{Related|Diskless System}}
+
{{Related|Diskless system}}
 
{{Related articles end}}
 
{{Related articles end}}
 
From [[Wikipedia:Preboot Execution Environment]]:
 
From [[Wikipedia:Preboot Execution Environment]]:
 
:''The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment; sometimes pronounced "pixie") is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.''
 
:''The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment; sometimes pronounced "pixie") is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.''
  
In this guide, PXE is used to boot the installation media with an appropriate option-rom that supports PXE on the target.
+
In this guide, PXE is used to boot the installation media with an appropriate option-rom that supports PXE on the target. This works well when you already have a server set up.
  
 
== Preparation ==
 
== Preparation ==
  
Download the latest official install media from [https://www.archlinux.org/download/ here].
+
Get the latest official install media from [https://www.archlinux.org/download/ download page].
  
 
Next mount the image:
 
Next mount the image:
  
{{bc|1=
+
# mkdir -p /mnt/archiso
# mkdir -p /mnt/archiso
+
# mount -o loop,ro archlinux-2017.12.01-x86_64.iso /mnt/archiso
# mount -o loop,ro archlinux-2013.11.01-dual.iso /mnt/archiso}}
 
  
 
== Server setup ==
 
== Server setup ==
  
You will need to setup a DHCP, TFTP, and HTTP server to configure networking, load pxelinux/kernel/initramfs, and finally load the root filesystem (respectively).
+
You will need to setup a DHCP, [[TFTP]], and [[List of applications/Internet#Web servers|HTTP server]] to configure networking, load pxelinux/kernel/initramfs, and finally load the root filesystem (respectively).
 +
 
 +
The Arch ISO currently only supports BIOS-style PXE booting. See {{Bug|50188}} for more information.
 +
 
 +
[[Netboot|Arch Netboot]] does support UEFI-style booting if you require that. Rest of this page focuses on the ISO however.
  
 
=== Network ===
 
=== Network ===
Line 31: Line 37:
 
Bring up your wired NIC, and assign it an address appropriately.
 
Bring up your wired NIC, and assign it an address appropriately.
  
{{bc|1=
+
# ip link set eth0 up
# ip link set eth0 up
+
# ip addr add 192.168.0.1/24 dev eth0
# ip addr add 192.168.0.1/24 dev eth0}}
 
  
 
=== DHCP + TFTP ===
 
=== DHCP + TFTP ===
  
You will need both a DHCP and TFTP server to configure networking on the install target and to facilitate the transfer of files between the PXE server and client; dnsmasq does both, and is extremely easy to set up.
+
You will need both a DHCP and TFTP server to configure networking on the install target and to facilitate the transfer of files between the PXE server and client; [[dnsmasq]] does both, and is extremely easy to set up.
  
[[pacman|Install]] {{pkg|dnsmasq}} from [[official repositories]].
+
[[Install]] the {{pkg|dnsmasq}} package.
  
Configure dnsmasq:
+
Configure ''dnsmasq'':
  
 
{{hc|# /etc/dnsmasq.conf|2=
 
{{hc|# /etc/dnsmasq.conf|2=
Line 51: Line 56:
 
dhcp-option-force=209,boot/syslinux/archiso.cfg
 
dhcp-option-force=209,boot/syslinux/archiso.cfg
 
dhcp-option-force=210,/arch/
 
dhcp-option-force=210,/arch/
 +
dhcp-option-force=66,192.168.0.1
 
enable-tftp
 
enable-tftp
tftp-root=/mnt/archiso}}
+
tftp-root=/mnt/archiso
 +
}}
  
Start the {{ic|dnsmasq}} [[Systemctl#Using units|systemd service]].
+
[[Start]] {{ic|dnsmasq.service}}.
  
 
=== HTTP ===
 
=== HTTP ===
  
Thanks to recent changes in [[Archiso|archiso]], it is now possible to boot from HTTP (archiso_pxe_http initcpio hook) or NFS (archiso_pxe_nfs initcpio hook); among all alternatives, darkhttpd is by far the most trivial to setup (and the lightest-weight).
+
Thanks to {{ic|archiso_pxe_http}} initcpio hook and {{ic|archiso_pxe_nfs}} initcpio hook in [[archiso]], it is possible to boot from HTTP or NFS. Among all alternatives, darkhttpd is by far the most trivial to setup (and the lightest-weight).
  
First, [[pacman|install]] {{pkg|darkhttpd}} from [[official repositories]].
+
First, [[install]] the {{pkg|darkhttpd}} package.
  
Then start {{pkg|darkhttpd}} using our {{ic|/mnt/archiso}} as the document root:
+
Then start ''darkhttpd'' using our {{ic|/mnt/archiso}} as the document root:
  
{{hc|# darkhttpd /mnt/archiso --no-keepalive|
+
{{hc|# darkhttpd /mnt/archiso|
 
darkhttpd/1.8, copyright (c) 2003-2011 Emil Mikulic.
 
darkhttpd/1.8, copyright (c) 2003-2011 Emil Mikulic.
listening on: <nowiki>http://0.0.0.0:80/</nowiki>}}
+
listening on: <nowiki>http://0.0.0.0:80/</nowiki>
 +
}}
 +
 
 +
Note that it is important that the server is running on port {{ic|80}}. If you start ''darkhttpd'' without root access it will default to {{ic|8080}}. The client will try to access port 80 and the boot will fail.
  
 
== Installation ==
 
== Installation ==
  
For this portion you will need to figure out how to tell the client to attempt a PXE boot; in the corner of the screen along with the normal post messages, usually there will be some hint on which key to press to try PXE booting first. On an IBM x3650 ''F12'' brings up a boot menu, the first option of which is ''Network''; on a Dell PE 1950/2950 pressing ''F12'' initiates PXE booting directly.
+
For this portion you will need to figure out how to tell the client to attempt a PXE boot; in the corner of the screen along with the normal post messages, usually there will be some hint on which key to press to try PXE booting first. On an IBM x3650 {{ic|F12}} brings up a boot menu, the first option of which is ''Network''; on a Dell PE 1950/2950 pressing {{ic|F12}} initiates PXE booting directly.
  
 
=== Boot ===
 
=== Boot ===
  
Looking at [[Systemd#Journal|journald]] on the PXE server will provide some additional insight to what exactly is going on during the early stages of the PXE boot process:
+
Looking at [[journald]] on the PXE server will provide some additional insight to what exactly is going on during the early stages of the PXE boot process:
{{hc|<nowiki># journalctl -u dnsmasq -f</nowiki>|2=
+
 
<nowiki>
+
{{hc|# journalctl -u dnsmasq.service -f|2=<nowiki>
 
dnsmasq-dhcp[2544]: DHCPDISCOVER(eth1) 00:1a:64:6a:a2:4d  
 
dnsmasq-dhcp[2544]: DHCPDISCOVER(eth1) 00:1a:64:6a:a2:4d  
 
dnsmasq-dhcp[2544]: DHCPOFFER(eth1) 192.168.0.110 00:1a:64:6a:a2:4d  
 
dnsmasq-dhcp[2544]: DHCPOFFER(eth1) 192.168.0.110 00:1a:64:6a:a2:4d  
Line 92: Line 102:
 
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_tail.cfg to 192.168.0.110
 
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_tail.cfg to 192.168.0.110
 
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/vesamenu.c32 to 192.168.0.110
 
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/vesamenu.c32 to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/splash.png to 192.168.0.110</nowiki>}}
+
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/splash.png to 192.168.0.110
 +
</nowiki>}}
  
After you load {{ic|pxelinux.0}} and {{ic|archiso.cfg}} via TFTP, you will (hopefully) be presented with a [[Syslinux|syslinux]] boot menu with several options, two of which are of potential usefulness to us.
+
After you load {{ic|pxelinux.0}} and {{ic|archiso.cfg}} via TFTP, you will (hopefully) be presented with a [[syslinux]] boot menu with several options, where you can select ''Boot Arch Linux (x86_64) (HTTP)''.
 
 
Select either ''Boot Arch Linux (x86_64) (HTTP)'' or ''Boot Arch Linux (i686) (HTTP)'' depending on your CPU architecture.  
 
  
 
Next the kernel and initramfs (appropriate for the architecture you selected) will be transferred, again via TFTP:
 
Next the kernel and initramfs (appropriate for the architecture you selected) will be transferred, again via TFTP:
Line 102: Line 111:
 
{{bc|1=
 
{{bc|1=
 
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/x86_64/vmlinuz to 192.168.0.110
 
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/x86_64/vmlinuz to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/x86_64/archiso.img to 192.168.0.110}}
+
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/x86_64/archiso.img to 192.168.0.110
 +
}}
  
 
If all goes well, you should then see activity on darkhttpd coming from the PXE-target; at this point the kernel would be loaded on the PXE-target, and in init:  
 
If all goes well, you should then see activity on darkhttpd coming from the PXE-target; at this point the kernel would be loaded on the PXE-target, and in init:  
Line 110: Line 120:
 
1348347587 192.168.0.110 "GET /arch/x86_64/root-image.fs.sfs" 200 107860206 "" "curl/7.27.0"
 
1348347587 192.168.0.110 "GET /arch/x86_64/root-image.fs.sfs" 200 107860206 "" "curl/7.27.0"
 
1348347588 192.168.0.110 "GET /arch/x86_64/usr-lib-modules.fs.sfs" 200 36819181 "" "curl/7.27.0"
 
1348347588 192.168.0.110 "GET /arch/x86_64/usr-lib-modules.fs.sfs" 200 36819181 "" "curl/7.27.0"
1348347588 192.168.0.110 "GET /arch/any/usr-share.fs.sfs" 200 63693037 "" "curl/7.27.0"}}
+
1348347588 192.168.0.110 "GET /arch/any/usr-share.fs.sfs" 200 63693037 "" "curl/7.27.0"
 +
}}
  
After the root filesystem is downloaded via HTTP, you will eventually end up at a root [[zsh]] prompt with that fancy [https://www.archlinux.org/packages/extra/any/grml-zsh-config/ grml config].
+
After the root filesystem is downloaded via HTTP, you will eventually end up at the normal live system root [[zsh]] prompt.
  
 
=== Post-boot ===
 
=== Post-boot ===
  
Unless you want all traffic to be routed through your PXE server (which will not work anyway unless you [[Simple stateful firewall#Setting up a NAT gateway|set it up properly]]), you will want to kill {{pkg|dnsmasq}} and get a new lease on the install target, as appropriate for your network layout.
+
Unless you want all traffic to be routed through your PXE server (which will not work anyway unless you [[Simple stateful firewall#Setting up a NAT gateway|set it up properly]]), you will want to [[stop]] {{ic|dnsmasq.service}} and get a new lease on the install target, as appropriate for your network layout.
  
{{bc|# systemctl stop dnsmasq.service}}
+
You can also kill ''darkhttpd''; the target has already downloaded the root filesystem, so it is no longer needed. While you are at it, you can also unmount the installation image:
  
You can also kill {{pkg|darkhttpd}}; the target has already downloaded the root filesystem, so it's no longer needed. While you are at it, you can also unmount the installation image:
+
# umount /mnt/archiso
  
{{bc|# umount /mnt/archiso}}
+
At this point you can follow the [[Installation guide]].
 
 
At this point you can follow the [[Installation guide|official installation guide]].
 
  
 
== Alternate Methods ==
 
== Alternate Methods ==
Line 132: Line 141:
 
=== NFS ===
 
=== NFS ===
  
You will need to set up an [[NFS|NFS server]] with an export at the root of your mounted installation media, which would be {{ic|/mnt/archiso}} if you followed the [[#Preparation|earlier sections]] of this guide. After setting up the server, add the following line to your {{ic|/etc/exports}} file:
+
You will need to set up an [[NFS|NFS server]] with an export at the root of your mounted installation media, which would be {{ic|/mnt/archiso}} if you followed [[#Preparation]]. After setting up the server, add the following line to your {{ic|/etc/exports}} file:
  
{{hc|/etc/exports|/mnt/archiso 192.168.0.0/24(ro,no_subtree_check)}}
+
{{hc|/etc/exports|
 +
/mnt/archiso 192.168.0.0/24(ro,no_subtree_check)
 +
}}
  
 
If the server was already running, re-export the filesystems with {{ic|exportfs -r -a -v}}.
 
If the server was already running, re-export the filesystems with {{ic|exportfs -r -a -v}}.
Line 140: Line 151:
 
The default settings in the installer expect to find the NFS at {{ic|/run/archiso/bootmnt}}, so you will need to edit the boot options.  To do this, press Tab on the appropriate boot menu choice and edit the {{ic|archiso_nfs_srv}} option accordingly:
 
The default settings in the installer expect to find the NFS at {{ic|/run/archiso/bootmnt}}, so you will need to edit the boot options.  To do this, press Tab on the appropriate boot menu choice and edit the {{ic|archiso_nfs_srv}} option accordingly:
  
{{bc|1=archiso_nfs_srv=${pxeserver}:/mnt/archiso}}
+
archiso_nfs_srv=${pxeserver}:/mnt/archiso
  
 
Alternatively, you can use {{ic|/run/archiso/bootmnt}} for the entire process.
 
Alternatively, you can use {{ic|/run/archiso/bootmnt}} for the entire process.
Line 148: Line 159:
 
=== NBD ===
 
=== NBD ===
  
{{Accuracy|verify}}
+
[[Install]] the {{pkg|nbd}} package and configure it:
{{Expansion}}
 
  
Install {{pkg|nbd}} and configure it:
+
{{hc|/etc/nbd-server/config|2=
 
 
{{hc|# vim /etc/nbd-server/config|2=
 
 
[generic]
 
[generic]
 
[archiso]
 
[archiso]
 
     readonly = true
 
     readonly = true
     exportname = /srv/archlinux-2013.02.01-dual.iso}}
+
     exportname = /srv/archlinux-2017.12.01-x86_64.iso
 +
}}
 +
 
 +
[[Start]] {{ic|nbd.service}}.
 +
 
 +
=== Existing PXE Server ===
 +
 
 +
If you have an existing PXE server with a [[PXELINUX]] system setup (e.g. a combination of DHCP and [[TFTP]]), you can add the following menu items to your {{ic|/tftpboot/pxelinux.cfg/default}} file in order to boot Arch via your preferred method:
 +
 
 +
{{bc|1=
 +
LABEL archlinux
 +
        MENU LABEL Arch Linux x86_64
 +
        LINUX ''/path/to/extracted/Arch/ISO''/arch/boot/x86_64/vmlinuz
 +
        INITRD ''/path/to/extracted/Arch/ISO''/arch/boot/intel_ucode.img,''/path/to/extracted/Arch/ISO''/arch/boot/amd_ucode.img,''/path/to/extracted/Arch/ISO''/arch/boot/x86_64/archiso.img
 +
        APPEND archisobasedir=arch archiso_http_srv=''<nowiki>http://httpserver/path/to/extracted/Arch/ISO</nowiki>''/
 +
        SYSAPPEND 3
 +
        TEXT HELP
 +
        Arch Linux 2018.09.01 x86_64
 +
        ENDTEXT
 +
}}
 +
 
 +
You can replace {{ic|archiso_http_srv}} with {{ic|archiso_nfs_srv}} for NFS or {{ic|archiso_nbd_srv}} for NBD (see usage examples in {{ic|arch/boot/syslinux/archiso_pxe.cfg}} file resided on ArchLinux iso). Whichever method you choose, you must pass {{ic|1=ip=}} parameter to instruct the kernel to bring up the network interface before it attempts to mount the installation medium over the network. Passing {{ic|1=BOOTIF=}} is required when there are several wired interfaces on the client side and/or you want resolv.conf to be already configured inside booted archiso. You can use [https://wiki.syslinux.org/wiki/index.php?title=Config#SYSAPPEND sysappend mask] 3 (which is 1+2) to pass these parameters automatically. For available boot parameters see [https://git.archlinux.org/archiso.git/plain/docs/README.bootparams README.bootparams].
 +
 
 +
=== Low memory systems ===
 +
 
 +
The {{ic|copytoram}} [[initramfs]] option can be used to control whether the root filesystem should be copied to ram in its entirety in early-boot.
 +
 
 +
It highly recommended to leave this option alone, and should only be disabled if entirely necessary (systems with less than ~256MB physical memory). Append {{ic|1=copytoram=n}} to your kernel line if you wish to do so.
 +
 
 +
{{Note|As this requires loop-mounting squashfs from a mounted remote filesystem, {{ic|1=copytoram=n}} and {{ic|[[#HTTP|archiso_pxe_http]]}} are mutually exclusive.}}
 +
 
 +
== Troubleshooting ==
 +
 
 +
=== DHCP interface rename bug ===
 +
 
 +
{{Bug|36749}} causes default [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ predictable network interface renaming] to fail and then dhcp client to fail because of it. A workaround is to add the kernel boot parameter {{ic|1=net.ifnames=0}} to disable predictable interface names.
  
=== Low memory ===
+
=== VirtualBox cannot boot while real machine can ===
  
{{note|As requires loop-mounting squashfs from a mounted remote filesystem, {{ic|<nowiki>copytoram=n</nowiki>}} and {{ic|[[PXE#HTTP|archiso_pxe_http]]}} are mutually exclusive.}}
+
When using VirtualBox to test your configuration, virtual machine is stucked at
 +
    Probing EDD (edd=off to disable)... ok
 +
But pxe booting with real machine works fine.
 +
The problem may be because you have set several cpu cores to your client machine, and you set its type as Other and version as Unknown (64 bit). So VirtualBox does not know which paravirtualization interface to use by default.
 +
Adding loglevel=7 kernel parameter lets you see that machine was actually stuck at
 +
    [   0.063697] smp: Bringing up secondary CPUs...
 +
    [   0.103768] x86: Booting SMP configuration:
 +
To resolve this, either use one cpu core, or go to machine settings -> System -> Acceleration and set one of the following paravirtualization interface: Minimal, Hyper-V, KVM.
  
The {{ic|copytoram}} [[mkinitcpio|initramfs]] option can be used to control whether the root filesystem should be copied to ram in its entirety in early-boot.
+
=== VirtualBox falls out to EFI shell ===
  
It highly recommended to leave this option alone, and should only be disabled if entirely necessary (systems with less than ~256MB physical memory). Append {{ic|<nowiki>copytoram=n</nowiki>}} to your kernel line if you wish to do so.
+
Currently VirtualBox does not support PXE booting in UEFI mode. See [https://forums.virtualbox.org/viewtopic.php?f=9&t=84349 this].
 +
You can try qemu instead. Alternatively you can use VMware Workstation 15.0.2 (it supports uefi pxe boot) or just a real hardware.

Latest revision as of 07:08, 6 April 2019

Tango-go-next.pngThis article or section is a candidate for moving to Preboot Execution Environment.Tango-go-next.png

Notes: ALSA is named Advanced Linux Sound Architecture. (Discuss in Talk:PXE#)

From Wikipedia:Preboot Execution Environment:

The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment; sometimes pronounced "pixie") is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.

In this guide, PXE is used to boot the installation media with an appropriate option-rom that supports PXE on the target. This works well when you already have a server set up.

Preparation

Get the latest official install media from download page.

Next mount the image:

# mkdir -p /mnt/archiso
# mount -o loop,ro archlinux-2017.12.01-x86_64.iso /mnt/archiso

Server setup

You will need to setup a DHCP, TFTP, and HTTP server to configure networking, load pxelinux/kernel/initramfs, and finally load the root filesystem (respectively).

The Arch ISO currently only supports BIOS-style PXE booting. See FS#50188 for more information.

Arch Netboot does support UEFI-style booting if you require that. Rest of this page focuses on the ISO however.

Network

Bring up your wired NIC, and assign it an address appropriately.

# ip link set eth0 up
# ip addr add 192.168.0.1/24 dev eth0

DHCP + TFTP

You will need both a DHCP and TFTP server to configure networking on the install target and to facilitate the transfer of files between the PXE server and client; dnsmasq does both, and is extremely easy to set up.

Install the dnsmasq package.

Configure dnsmasq:

# /etc/dnsmasq.conf
port=0
interface=eth0
bind-interfaces
dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-boot=/arch/boot/syslinux/lpxelinux.0
dhcp-option-force=209,boot/syslinux/archiso.cfg
dhcp-option-force=210,/arch/
dhcp-option-force=66,192.168.0.1
enable-tftp
tftp-root=/mnt/archiso

Start dnsmasq.service.

HTTP

Thanks to archiso_pxe_http initcpio hook and archiso_pxe_nfs initcpio hook in archiso, it is possible to boot from HTTP or NFS. Among all alternatives, darkhttpd is by far the most trivial to setup (and the lightest-weight).

First, install the darkhttpd package.

Then start darkhttpd using our /mnt/archiso as the document root:

# darkhttpd /mnt/archiso
darkhttpd/1.8, copyright (c) 2003-2011 Emil Mikulic.
listening on: http://0.0.0.0:80/

Note that it is important that the server is running on port 80. If you start darkhttpd without root access it will default to 8080. The client will try to access port 80 and the boot will fail.

Installation

For this portion you will need to figure out how to tell the client to attempt a PXE boot; in the corner of the screen along with the normal post messages, usually there will be some hint on which key to press to try PXE booting first. On an IBM x3650 F12 brings up a boot menu, the first option of which is Network; on a Dell PE 1950/2950 pressing F12 initiates PXE booting directly.

Boot

Looking at journald on the PXE server will provide some additional insight to what exactly is going on during the early stages of the PXE boot process:

# journalctl -u dnsmasq.service -f
dnsmasq-dhcp[2544]: DHCPDISCOVER(eth1) 00:1a:64:6a:a2:4d 
dnsmasq-dhcp[2544]: DHCPOFFER(eth1) 192.168.0.110 00:1a:64:6a:a2:4d 
dnsmasq-dhcp[2544]: DHCPREQUEST(eth1) 192.168.0.110 00:1a:64:6a:a2:4d 
dnsmasq-dhcp[2544]: DHCPACK(eth1) 192.168.0.110 00:1a:64:6a:a2:4d 
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/pxelinux.0 to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso.cfg to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/whichsys.c32 to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_pxe_choose.cfg to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/ifcpu64.c32 to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_pxe_both_inc.cfg to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_head.cfg to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_pxe32.cfg to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_pxe64.cfg to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/archiso_tail.cfg to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/vesamenu.c32 to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/syslinux/splash.png to 192.168.0.110

After you load pxelinux.0 and archiso.cfg via TFTP, you will (hopefully) be presented with a syslinux boot menu with several options, where you can select Boot Arch Linux (x86_64) (HTTP).

Next the kernel and initramfs (appropriate for the architecture you selected) will be transferred, again via TFTP:

dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/x86_64/vmlinuz to 192.168.0.110
dnsmasq-tftp[2544]: sent /mnt/archiso/arch/boot/x86_64/archiso.img to 192.168.0.110

If all goes well, you should then see activity on darkhttpd coming from the PXE-target; at this point the kernel would be loaded on the PXE-target, and in init:

1348347586 192.168.0.110 "GET /arch/aitab" 200 678 "" "curl/7.27.0"
1348347587 192.168.0.110 "GET /arch/x86_64/root-image.fs.sfs" 200 107860206 "" "curl/7.27.0"
1348347588 192.168.0.110 "GET /arch/x86_64/usr-lib-modules.fs.sfs" 200 36819181 "" "curl/7.27.0"
1348347588 192.168.0.110 "GET /arch/any/usr-share.fs.sfs" 200 63693037 "" "curl/7.27.0"

After the root filesystem is downloaded via HTTP, you will eventually end up at the normal live system root zsh prompt.

Post-boot

Unless you want all traffic to be routed through your PXE server (which will not work anyway unless you set it up properly), you will want to stop dnsmasq.service and get a new lease on the install target, as appropriate for your network layout.

You can also kill darkhttpd; the target has already downloaded the root filesystem, so it is no longer needed. While you are at it, you can also unmount the installation image:

# umount /mnt/archiso

At this point you can follow the Installation guide.

Alternate Methods

As implied in the syslinux menu, there are several other alternatives:

NFS

You will need to set up an NFS server with an export at the root of your mounted installation media, which would be /mnt/archiso if you followed #Preparation. After setting up the server, add the following line to your /etc/exports file:

/etc/exports
/mnt/archiso 192.168.0.0/24(ro,no_subtree_check)

If the server was already running, re-export the filesystems with exportfs -r -a -v.

The default settings in the installer expect to find the NFS at /run/archiso/bootmnt, so you will need to edit the boot options. To do this, press Tab on the appropriate boot menu choice and edit the archiso_nfs_srv option accordingly:

archiso_nfs_srv=${pxeserver}:/mnt/archiso

Alternatively, you can use /run/archiso/bootmnt for the entire process.

After the kernel loads, the Arch bootstrap image will copy the root filesystem via NFS to the booting host. This can take a little while. Once this completes, you should have a running system.

NBD

Install the nbd package and configure it:

/etc/nbd-server/config
[generic]
[archiso]
    readonly = true
    exportname = /srv/archlinux-2017.12.01-x86_64.iso

Start nbd.service.

Existing PXE Server

If you have an existing PXE server with a PXELINUX system setup (e.g. a combination of DHCP and TFTP), you can add the following menu items to your /tftpboot/pxelinux.cfg/default file in order to boot Arch via your preferred method:

LABEL archlinux
        MENU LABEL Arch Linux x86_64
        LINUX /path/to/extracted/Arch/ISO/arch/boot/x86_64/vmlinuz
        INITRD /path/to/extracted/Arch/ISO/arch/boot/intel_ucode.img,/path/to/extracted/Arch/ISO/arch/boot/amd_ucode.img,/path/to/extracted/Arch/ISO/arch/boot/x86_64/archiso.img
        APPEND archisobasedir=arch archiso_http_srv=http://httpserver/path/to/extracted/Arch/ISO/
        SYSAPPEND 3
        TEXT HELP
        Arch Linux 2018.09.01 x86_64
        ENDTEXT

You can replace archiso_http_srv with archiso_nfs_srv for NFS or archiso_nbd_srv for NBD (see usage examples in arch/boot/syslinux/archiso_pxe.cfg file resided on ArchLinux iso). Whichever method you choose, you must pass ip= parameter to instruct the kernel to bring up the network interface before it attempts to mount the installation medium over the network. Passing BOOTIF= is required when there are several wired interfaces on the client side and/or you want resolv.conf to be already configured inside booted archiso. You can use sysappend mask 3 (which is 1+2) to pass these parameters automatically. For available boot parameters see README.bootparams.

Low memory systems

The copytoram initramfs option can be used to control whether the root filesystem should be copied to ram in its entirety in early-boot.

It highly recommended to leave this option alone, and should only be disabled if entirely necessary (systems with less than ~256MB physical memory). Append copytoram=n to your kernel line if you wish to do so.

Note: As this requires loop-mounting squashfs from a mounted remote filesystem, copytoram=n and archiso_pxe_http are mutually exclusive.

Troubleshooting

DHCP interface rename bug

FS#36749 causes default predictable network interface renaming to fail and then dhcp client to fail because of it. A workaround is to add the kernel boot parameter net.ifnames=0 to disable predictable interface names.

VirtualBox cannot boot while real machine can

When using VirtualBox to test your configuration, virtual machine is stucked at

   Probing EDD (edd=off to disable)... ok

But pxe booting with real machine works fine. The problem may be because you have set several cpu cores to your client machine, and you set its type as Other and version as Unknown (64 bit). So VirtualBox does not know which paravirtualization interface to use by default. Adding loglevel=7 kernel parameter lets you see that machine was actually stuck at

   [    0.063697] smp: Bringing up secondary CPUs...
   [    0.103768] x86: Booting SMP configuration:

To resolve this, either use one cpu core, or go to machine settings -> System -> Acceleration and set one of the following paravirtualization interface: Minimal, Hyper-V, KVM.

VirtualBox falls out to EFI shell

Currently VirtualBox does not support PXE booting in UEFI mode. See this. You can try qemu instead. Alternatively you can use VMware Workstation 15.0.2 (it supports uefi pxe boot) or just a real hardware.