Install Arch from network (via PXE)

From ArchWiki

Jump to: navigation, search
Image:Tango-document-new.png This article is a stub.
It may be confusing, not contain enough information, or be a placeholder for an article to come. People are invited to expand it to full article status and remove this box.

Contents

[edit] 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 and a usb drive:

[edit] Requisites

You need at least the following:

  • a server capable of running ISC DHCPD or DNSMasq
  • a server capable of running (a)tftpd
  • the Arch Linux usb installation image (either ftp or core will work)

[edit] Preparing dhcpd

Make sure your DHCP server is able to tell your clients where to find the TFTPd running.

Using ISC dhcpd:

subnet 192.168.42.0 netmask 255.255.255.0 {
 allow bootp;                  # accept bootp requests
 filename "pxelinux.0";        # the PXELinux boot agent
 next-server <tftp-server-IP>; # where does tftp live?
}

Using dnsmasq:

dhcp-boot=pxelinux.0,<tftp-server-hostname>,<tftp-server-IP>

[edit] Preparing tftpd

Assuming your downloaded the usb install img to /root, we're going to mount the image, copy the kernel and desired initrd into the tftp environment, typically found in /var/tftpboot.


~# pacman -S tftp-hpa mkpxelinux
...
~# cd /var/tftpboot
/var/tftpboot# mkdir pxelinux.cfg
/var/tftpboot# mkdir temp
/var/tftpboot# mount -t ext2 -o ro,loop,offset=32256 archlinux-2008.06-core-i686.img temp/
/var/tftpboot# cp temp/boot/{archlive.img,vmlinuz26} ./

[edit] Create a pxelinux config

create a pxelinux bootloader config including the options found in the "boot Archlive" section of menu.lst. save it as: pxelinux.cfg/default

FIXME: add example


[edit] cleanup

/var/tftpboot# umount temp && rmdir temp
/var/tftpboot# cp /usr/share/mkpxelinux/pxelinux.0 .


Your Arch Linux network installer is now ready.

Don't forget to add record for in.tftpd to hosts.allow.

[edit] Drive containing the root image

You will need a drive attached via usb containing the squashfs image used as /

As of 2008.06 the usb installer will only look in usb storage devices for this root filesystem image. if it cannot find this image the installer will panic.

The simplest way is to plug in a normal usb installer before booting. created as outlined in the arch install guide. but since you are not booting from the usb image directly, only the _files_ in the partition are really required.

If you want to create a custom image: for the 2008.06 usb installer, it's layout is as follows: the first partition, is formatted as ext2 to contain the files.

FIXME: find out if any ext2 partition will work not just the first one on the drive.

FIXME: add step by step.

[edit] Using it

Now make sure the dhcpd and tftpd daemons are running. 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 the usb drive.

That's all!

Personal tools