Difference between revisions of "Install Arch from network via PXE"

From ArchWiki
Jump to: navigation, search
m
(path corrected)
Line 55: Line 55:
 
Move contents of folder syslinux to tftpboot root:
 
Move contents of folder syslinux to tftpboot root:
  
  mv /var/tftpboot/boot/syslinux/* /var/tftpboot/
+
  mv /var/tftpboot/syslinux/* /var/tftpboot/
 
  rmdir /var/tftpboot/syslinux
 
  rmdir /var/tftpboot/syslinux
  

Revision as of 15:23, 11 February 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Merge-arrows-2.pngThis article or section is a candidate for merging with Archiso_as_pxe_server.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:Install Arch from network via PXE#)

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 -S 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

Be sure to static the LAN IP to the same subnet as option routers IP to get the DHCP server to start: ifconfig eth0 192.168.0.1 255.255.255.0

Preparing tftpd

Mount archboot.iso and copy the content of the folder boot to /var/tftpboot/:

mount -o loop,ro archboot.iso /mnt/iso
cp -a /mnt/iso/boot/* /var/tftpboot/

Move contents of folder syslinux to tftpboot root:

mv /var/tftpboot/syslinux/* /var/tftpboot/
rmdir /var/tftpboot/syslinux

Create pxelinux configuration:

mkdir /var/tftpboot/pxelinux.cfg
mv /var/tftpboot/syslinux.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!