Everybody with more than a few servers is using PXE boot to install the servers with an Operating System. In the Open Source world, there are currently 2 active PXE boot loaders: PXELINUX (from the SYSLINUX project) and iPXE.
While PXELINUX is shipped (in an outdated version) with every Linux distro, iPXE is a hidden gem. It can do most of what PXELINUX does without needing extra add ons and some more: * boot from a web server via HTTP * boot from an iSCSI SAN * boot from a Fibre Channel SAN via FCoE * boot from an AoE SAN * boot from a wireless network * boot from a wide-area network * boot from an Infiniband network * control the boot process with a scripting language
iPXE is free, open-source software licensed under the GNU GPL (with some portions under GPL-compatible licences), and is included in products from several network card manufacturers and OEMs.
This talk gives an introduction to iPXE, the development model of the open source project and provides insights into the network boot automation at ImmobilienScout24.
iPXE homepage: http://ipxe.org
Talk Video: https://www.youtube.com/watch?v=RYbv8ZYAIl4
3. iPXE
◉ full PXE implementation
◉ boot from a web server via HTTP
◉ boot from network block devices
➨ iSCSI SAN
➨ Fibre Channel SAN via FCoE
➨ AoE SAN
◉ boot from VLAN, WLAN, WAN
◉ boot from an Infiniband network
◉ control the boot process with a scripting language
◉ user interaction with prompts and menus
◉ display images and splash screens
◉ replaces NIC boot ROM or chainload via PXE boot
ipxe.org
Michael Brown github.com/mcb30
4. Get or Build
◉ DEB: sudo apt-get install ipxe
◉ RPM: Build it yourself
➨ git clone https://github.com/ImmobilienScout24/ipxe
➨ cd ipxe/src
➨ make srpm or make rpm
◉ Customizing
➨ Uses C Header files
➨ Add customization in config/local/*.h
➨ Copy stuff from config/*.h
➨ Example: config/local/console.h
#undef KEYBOARD_MAP
#define KEYBOARD_MAP de
6. Usage - Set Boot Action
◉ Provide Boot Source (dhcpd.conf), e.g. iSCSI LUN
option root-path "iscsi:iscsi.my.com::::iqn.1992-01.com.my.iscsi:target";
◉ Provide iPXE script (dhcpd.conf)
if exists user-class and option user-class = "iPXE" {
filename "http://my.web.server/real_boot_script.php";
} else {
filename "undionly.kpxe";
}
7. Usage - Advanced
◉ NIC flashing
➨ Replace PXE firmware on your NIC
➨ http://ipxe.org/howto/romburning
➨ Best with embedded boot script
➨ Great for creating low-cost AoE / FCoE / iSCSI HBA :-)
◉ Show login mask
◉ Menus
◉ Server interaction & information gathering:
chain http://my.com/collect?u=${uuid}&m=${mac}&a=${asset}
◉ Use your fantasy…
8. Testing
◉ QEMU:
qemu -bootp tftp://10.0.2.2//script.ipxe -tftp ~/tftp ipxe.usb
◉ VirtualBox:
➨ Boot VM from ipxe.iso
➨ Set TFTP filename to iPXE script:
VBoxManage modifyvm "ipxe test" --nattftpfile1 script.ipxe
➨ Set TFTP Prefix to directory of iPXE script:
VBoxManage modifyvm "ipxe test" --nattftpprefix1 ~/tftp
◉ iPXE script: ~/tftp/script.ipxe
9. Example: DHCP or Manual Configuration
#!ipxe
prompt --key 0x02 --timeout 10000 Press Ctrl-B for iPXE command line... && shell ||
dhcp && goto netboot ||
ifclose
echo -n Choose net0 or net1 or ...: ${} && read nic
set ${nic}/dns 8.8.8.8
set ${nic}/netmask 255.255.255.0
config ${nic}
ifopen ${nic}
goto netboot
:netboot
chain http://my.com/boot/main.ipxe || echo Error in iPXE chaining, try again 1
chain http://my.com/boot/main.ipxe || echo Error in iPXE chaining, giving up
11. Development
◉ Upcoming Features:
➨ UEFI support
➨ UNDIONLY driver as fall-back solution
➨ Automated Testing published on ipxe.org
◉ Paid Support & Development
➨ Author in UK
➨ Available for contract work on iPXE
◉ Development & Community
➨ Mostly in C
➨ IRC and Mailing List
12. Q & A / See also
go.schapiro.org/slides
blog.schlomo.schapiro.org
yadt-project.org | visit us in hall 6, booth A07