Install Arch from network (via PXE)

From ArchWiki

Jump to: navigation, search


Contents

Network booting

Did your tiny laptop come without a CDROM drive, and doesn't allow you to boot from a usb drive? Fear not, you can boot using pxe.

Requisites

You need at least the following:

  • a server capable of running DHCPD
  • a server capable of running (a)tftpd
  • the archboot installation iso (the official images can not be used for this)
  • it may be necessary to disable your router's DHCP function

The DHCP and tftp server can be the same computer if you only have one.

Install the necessary programs on the existing Arch Linux computer which will act as the server for the installation on your client:

pacman -Sy mkpxelinux tftp-hpa dhcp

Preparing dhcpd

Replace the default /etc/dhcpd.conf with the following (adjust to your network environment):

# /etc/dhcpd.conf
option domain-name-servers 208.67.222.222, 208.67.220.220;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
 range 192.168.0.10 192.168.0.49;
 filename "pxelinux.0";        # the PXELinux boot agent
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.0.255;
 option routers 192.168.0.1;
}

Dhcpd will not run without ipv6. If you have disabled ipv6, reload the module:

modprobe ipv6

Preparing tftpd

Run mkpxelinux, which will put the required boot files in /var/tftpboot:

mkpxelinux -c=/etc/mkpxelinux.conf

Mount archboot-iso and copy the content of the folder isolinux to /var/tftpboot/, overwriting existing files:

mount -o loop /archboot.iso /mnt/iso
cp -a /mnt/iso/isolinux/* /var/tftpboot/

Adjust pxelinux cfg (use the isolinux.cfg supplied with archboot):

mv /var/tftpboot/isolinux.cfg /var/tftpboot/pxelinux.cfg/default


Configuring host.allow

Add following records to your /etc/hosts.allow file:

# /etc/hosts.allow
tftpd: ALL
in.tftpd: ALL

Your Arch Linux network installer is now ready.


Starting the Install

Now make sure the dhcpd and tftpd daemons are running on the server.

# /etc/rc.d/tftpd start
# /etc/rc.d/dhcpd start

Boot your destination machine over PXE (usually something like F12 (on Dells) or F11 (on Supermicro's), or enable it in the BIOS).

When you get the PXEBoot prompt, type 'arch' or hit return to start the installer. The install should now progress the same as if you booted from CD. You can continue installation by following the Official Arch Linux Install Guide or Beginners Guide.

That's all!

Personal tools