How to boot salix live using PXE

From Salix OS
Jump to: navigation, search

Contents

What is PXE boot

PXE is a boot system integrated in BIOS to be able to boot your system through the network instead of using connected devices (hard disk, optical drive, usb stick, …).

This can be used for several reasons, but most of them are:

  • target system cannot boot on a CD or a USB (because there is no such device, the devices are broken or simply because the BIOS cannot do it) ;
  • to provide an easy way to use a computer as a terminal (the system is upgraded on the server, and the terminal just connect to it) ;
  • for system administrators, to help debug a broken computer, make mass-installations, …

Here we just focus on a simply way to configure and install such a system. For more options, see more advanced tutorials on the net.

SaLT Netboot Features

The underlying live boot system used is SaLT (Salix Live Technology), which currently have the following features:

  • NFS
  • SSH using sshfs
  • Samba (CIFS)
  • HTTP using httpfs
  • FTP using wget

Known limitations

There are of course some limitations:

  • PXE boot, in FTP mode, will freeze (kernel panic) while chrooting when using curlftpfs library. So wget is used instead but hence it needs more memory because the entire ISO must be loaded into RAM prior to booting
  • no user/password authentification over HTTP support
  • no wireless network support
  • no DNS resolution support

Netbooting

Netbooting requires three things:

  1. A boot manager that uses TFTP
  2. A kernel
  3. An initrd

The boot manager using is pxelinux, the kernel is the regular one provided in the Salix Live ISO, the initrd is an enhanced one that the one provided in the Salix Live ISO.

And of course it requires that the Linux kernel recognize and configure your network device. So check that your driver is listed in the following modules file.

kernel modules:

drivers/dca/dca.ko
drivers/edac/mce_amd_inj.ko
drivers/firewire/firewire-core.ko
drivers/firewire/firewire-net.ko
drivers/firewire/firewire-ohci.ko
drivers/firewire/firewire-sbp2.ko
drivers/firewire/nosy.ko
drivers/firmware/dcdbas.ko
drivers/firmware/dell_rbu.ko
drivers/firmware/edd.ko
drivers/firmware/efivars.ko
drivers/firmware/iscsi_ibft.ko
drivers/gpio/adp5588-gpio.ko
drivers/gpio/basic_mmio_gpio.ko
drivers/gpio/cs5535-gpio.ko
drivers/gpio/it8761e_gpio.ko
drivers/gpio/janz-ttl.ko
drivers/gpio/max7300.ko
drivers/gpio/max730x.ko
drivers/gpio/max732x.ko
drivers/gpio/pca953x.ko
drivers/gpio/pcf857x.ko
drivers/gpio/pch_gpio.ko
drivers/gpio/rdc321x-gpio.ko
drivers/gpio/sch_gpio.ko
drivers/gpio/vx855_gpio.ko
drivers/hid/hid-3m-pct.ko
drivers/hid/hid-apple.ko
drivers/hid/hid-axff.ko
drivers/hid/hid-belkin.ko
drivers/hid/hid-cando.ko
drivers/hid/hid-cherry.ko
drivers/hid/hid-drff.ko
drivers/hid/hid-egalax.ko
drivers/hid/hid-elecom.ko
drivers/hid/hid-ezkey.ko
drivers/hid/hid-gaff.ko
drivers/hid/hid-kensington.ko
drivers/hid/hid-kye.ko
drivers/hid/hid-logitech.ko
drivers/hid/hid-magicmouse.ko
drivers/hid/hid-microsoft.ko
drivers/hid/hid-mosart.ko
drivers/hid/hid-ntrig.ko
drivers/hid/hid-ortek.ko
drivers/hid/hid-picolcd.ko
drivers/hid/hid-prodikeys.ko
drivers/hid/hid-quanta.ko
drivers/hid/hid-roccat-kone.ko
drivers/hid/hid-roccat-pyra.ko
drivers/hid/hid-roccat.ko
drivers/hid/hid-sjoy.ko
drivers/hid/hid-stantum.ko
drivers/hid/hid-tmff.ko
drivers/hid/hid-topseed.ko
drivers/hid/hid-twinhan.ko
drivers/hid/hid-uclogic.ko
drivers/hid/hid-wacom.ko
drivers/hid/hid-waltop.ko
drivers/hid/hid-zpff.ko
drivers/hid/hid-zydacron.ko
drivers/hid/hid.ko
drivers/hid/usbhid/usbhid.ko
drivers/i2c/algos/i2c-algo-bit.ko
drivers/i2c/algos/i2c-algo-pca.ko
drivers/i2c/busses/i2c-ali1535.ko
drivers/i2c/busses/i2c-ali1563.ko
drivers/i2c/busses/i2c-ali15x3.ko
drivers/i2c/busses/i2c-amd756-s4882.ko
drivers/i2c/busses/i2c-amd756.ko
drivers/i2c/busses/i2c-amd8111.ko
drivers/i2c/busses/i2c-gpio.ko
drivers/i2c/busses/i2c-i801.ko
drivers/i2c/busses/i2c-intel-mid.ko
drivers/i2c/busses/i2c-isch.ko
drivers/i2c/busses/i2c-nforce2-s4985.ko
drivers/i2c/busses/i2c-nforce2.ko
drivers/i2c/busses/i2c-ocores.ko
drivers/i2c/busses/i2c-parport-light.ko
drivers/i2c/busses/i2c-parport.ko
drivers/i2c/busses/i2c-pca-isa.ko
drivers/i2c/busses/i2c-pca-platform.ko
drivers/i2c/busses/i2c-piix4.ko
drivers/i2c/busses/i2c-scmi.ko
drivers/i2c/busses/i2c-simtec.ko
drivers/i2c/busses/i2c-sis5595.ko
drivers/i2c/busses/i2c-sis630.ko
drivers/i2c/busses/i2c-sis96x.ko
drivers/i2c/busses/i2c-stub.ko
drivers/i2c/busses/i2c-taos-evm.ko
drivers/i2c/busses/i2c-tiny-usb.ko
drivers/i2c/busses/i2c-via.ko
drivers/i2c/busses/i2c-viapro.ko
drivers/i2c/busses/i2c-xiic.ko
drivers/i2c/busses/scx200_acb.ko
drivers/i2c/busses/scx200_i2c.ko
drivers/i2c/i2c-core.ko
drivers/i2c/i2c-mux.ko
drivers/i2c/i2c-smbus.ko
drivers/i2c/muxes/pca9541.ko
drivers/i2c/muxes/pca954x.ko
drivers/ieee802154/fakehard.ko
drivers/mmc/card/mmc_block.ko
drivers/mmc/card/sdio_uart.ko
drivers/mtd/ar7part.ko
drivers/mtd/chips/cfi_cmdset_0001.ko
drivers/mtd/chips/cfi_cmdset_0002.ko
drivers/mtd/chips/cfi_cmdset_0020.ko
drivers/mtd/chips/cfi_probe.ko
drivers/mtd/chips/cfi_util.ko
drivers/mtd/chips/chipreg.ko
drivers/mtd/chips/gen_probe.ko
drivers/mtd/chips/jedec_probe.ko
drivers/mtd/chips/map_absent.ko
drivers/mtd/chips/map_ram.ko
drivers/mtd/chips/map_rom.ko
drivers/mtd/devices/block2mtd.ko
drivers/mtd/devices/doc2001plus.ko
drivers/mtd/devices/docecc.ko
drivers/mtd/devices/docprobe.ko
drivers/mtd/devices/mtdram.ko
drivers/mtd/devices/phram.ko
drivers/mtd/devices/pmc551.ko
drivers/mtd/devices/slram.ko
drivers/mtd/ftl.ko
drivers/mtd/inftl.ko
drivers/mtd/lpddr/lpddr_cmds.ko
drivers/mtd/lpddr/qinfo_probe.ko
drivers/mtd/maps/amd76xrom.ko
drivers/mtd/maps/ck804xrom.ko
drivers/mtd/maps/esb2rom.ko
drivers/mtd/maps/gpio-addr-flash.ko
drivers/mtd/maps/ichxrom.ko
drivers/mtd/maps/intel_vr_nor.ko
drivers/mtd/maps/l440gx.ko
drivers/mtd/maps/map_funcs.ko
drivers/mtd/maps/netsc520.ko
drivers/mtd/maps/nettel.ko
drivers/mtd/maps/pci.ko
drivers/mtd/maps/pcmciamtd.ko
drivers/mtd/maps/physmap.ko
drivers/mtd/maps/plat-ram.ko
drivers/mtd/maps/sbc_gxx.ko
drivers/mtd/maps/sc520cdp.ko
drivers/mtd/maps/scb2_flash.ko
drivers/mtd/maps/scx200_docflash.ko
drivers/mtd/maps/ts5500_flash.ko
drivers/mtd/mtd.ko
drivers/mtd/mtd_blkdevs.ko
drivers/mtd/mtdblock.ko
drivers/mtd/mtdblock_ro.ko
drivers/mtd/mtdchar.ko
drivers/mtd/mtdconcat.ko
drivers/mtd/mtdoops.ko
drivers/mtd/nand/alauda.ko
drivers/mtd/nand/cafe_nand.ko
drivers/mtd/nand/cs553x_nand.ko
drivers/mtd/nand/denali.ko
drivers/mtd/nand/diskonchip.ko
drivers/mtd/nand/nand.ko
drivers/mtd/nand/nand_ecc.ko
drivers/mtd/nand/nand_ids.ko
drivers/mtd/nand/nandsim.ko
drivers/mtd/nand/plat_nand.ko
drivers/mtd/nand/r852.ko
drivers/mtd/nand/sm_common.ko
drivers/mtd/nftl.ko
drivers/mtd/onenand/generic.ko
drivers/mtd/onenand/onenand.ko
drivers/mtd/onenand/onenand_sim.ko
drivers/mtd/redboot.ko
drivers/mtd/rfd_ftl.ko
drivers/mtd/sm_ftl.ko
drivers/mtd/ssfdc.ko
drivers/mtd/tests/mtd_nandecctest.ko
drivers/mtd/tests/mtd_oobtest.ko
drivers/mtd/tests/mtd_pagetest.ko
drivers/mtd/tests/mtd_readtest.ko
drivers/mtd/tests/mtd_speedtest.ko
drivers/mtd/tests/mtd_stresstest.ko
drivers/mtd/tests/mtd_subpagetest.ko
drivers/mtd/tests/mtd_torturetest.ko
drivers/mtd/ubi/gluebi.ko
drivers/mtd/ubi/ubi.ko
drivers/net/3c501.ko
drivers/net/3c503.ko
drivers/net/3c505.ko
drivers/net/3c507.ko
drivers/net/3c509.ko
drivers/net/3c515.ko
drivers/net/3c59x.ko
drivers/net/8139cp.ko
drivers/net/8139too.ko
drivers/net/82596.ko
drivers/net/8390.ko
drivers/net/8390p.ko
drivers/net/ac3200.ko
drivers/net/acenic.ko
drivers/net/amd8111e.ko
drivers/net/at1700.ko
drivers/net/atl1c/atl1c.ko
drivers/net/atl1e/atl1e.ko
drivers/net/atlx/atl1.ko
drivers/net/atlx/atl2.ko
drivers/net/atp.ko
drivers/net/b44.ko
drivers/net/benet/be2net.ko
drivers/net/bna/bna.ko
drivers/net/bnx2.ko
drivers/net/bnx2x/bnx2x.ko
drivers/net/bsd_comp.ko
drivers/net/can/can-dev.ko
drivers/net/can/janz-ican3.ko
drivers/net/can/pch_can.ko
drivers/net/can/sja1000/ems_pci.ko
drivers/net/can/sja1000/kvaser_pci.ko
drivers/net/can/sja1000/plx_pci.ko
drivers/net/can/sja1000/sja1000.ko
drivers/net/can/sja1000/sja1000_isa.ko
drivers/net/can/sja1000/sja1000_platform.ko
drivers/net/can/sja1000/tscan1.ko
drivers/net/can/usb/ems_usb.ko
drivers/net/can/usb/esd_usb2.ko
drivers/net/can/vcan.ko
drivers/net/cassini.ko
drivers/net/cnic.ko
drivers/net/cs89x0.ko
drivers/net/cxgb3/cxgb3.ko
drivers/net/cxgb4/cxgb4.ko
drivers/net/cxgb4vf/cxgb4vf.ko
drivers/net/de600.ko
drivers/net/de620.ko
drivers/net/defxx.ko
drivers/net/depca.ko
drivers/net/dl2k.ko
drivers/net/dnet.ko
drivers/net/dummy.ko
drivers/net/e100.ko
drivers/net/e1000/e1000.ko
drivers/net/e1000e/e1000e.ko
drivers/net/e2100.ko
drivers/net/eepro.ko
drivers/net/eexpress.ko
drivers/net/enic/enic.ko
drivers/net/epic100.ko
drivers/net/eql.ko
drivers/net/eth16i.ko
drivers/net/ethoc.ko
drivers/net/ewrk3.ko
drivers/net/fealnx.ko
drivers/net/forcedeth.ko
drivers/net/hamachi.ko
drivers/net/hp-plus.ko
drivers/net/hp.ko
drivers/net/hp100.ko
drivers/net/ifb.ko
drivers/net/igb/igb.ko
drivers/net/igbvf/igbvf.ko
drivers/net/ipg.ko
drivers/net/ixgbe/ixgbe.ko
drivers/net/ixgbevf/ixgbevf.ko
drivers/net/jme.ko
drivers/net/ks8842.ko
drivers/net/ks8851_mll.ko
drivers/net/ksz884x.ko
drivers/net/lance.ko
drivers/net/lp486e.ko
drivers/net/macvlan.ko
drivers/net/macvtap.ko
drivers/net/mdio.ko
drivers/net/mii.ko
drivers/net/mlx4/mlx4_core.ko
drivers/net/mlx4/mlx4_en.ko
drivers/net/myri10ge/myri10ge.ko
drivers/net/natsemi.ko
drivers/net/ne.ko
drivers/net/ne2k-pci.ko
drivers/net/netconsole.ko
drivers/net/netxen/netxen_nic.ko
drivers/net/ni52.ko
drivers/net/ni65.ko
drivers/net/niu.ko
drivers/net/ns83820.ko
drivers/net/pch_gbe/pch_gbe.ko
drivers/net/pcmcia/3c574_cs.ko
drivers/net/pcmcia/3c589_cs.ko
drivers/net/pcmcia/axnet_cs.ko
drivers/net/pcmcia/fmvj18x_cs.ko
drivers/net/pcmcia/ibmtr_cs.ko
drivers/net/pcmcia/nmclan_cs.ko
drivers/net/pcmcia/pcnet_cs.ko
drivers/net/pcmcia/smc91c92_cs.ko
drivers/net/pcmcia/xirc2ps_cs.ko
drivers/net/pcnet32.ko
drivers/net/phy/bcm63xx.ko
drivers/net/phy/broadcom.ko
drivers/net/phy/cicada.ko
drivers/net/phy/davicom.ko
drivers/net/phy/et1011c.ko
drivers/net/phy/icplus.ko
drivers/net/phy/libphy.ko
drivers/net/phy/lxt.ko
drivers/net/phy/marvell.ko
drivers/net/phy/mdio-bitbang.ko
drivers/net/phy/mdio-gpio.ko
drivers/net/phy/micrel.ko
drivers/net/phy/national.ko
drivers/net/phy/qsemi.ko
drivers/net/phy/realtek.ko
drivers/net/phy/smsc.ko
drivers/net/phy/ste10Xp.ko
drivers/net/phy/vitesse.ko
drivers/net/ppp_async.ko
drivers/net/ppp_deflate.ko
drivers/net/ppp_generic.ko
drivers/net/ppp_mppe.ko
drivers/net/ppp_synctty.ko
drivers/net/pppoe.ko
drivers/net/pppox.ko
drivers/net/pptp.ko
drivers/net/qla3xxx.ko
drivers/net/qlcnic/qlcnic.ko
drivers/net/qlge/qlge.ko
drivers/net/r6040.ko
drivers/net/r8169.ko
drivers/net/rrunner.ko
drivers/net/s2io.ko
drivers/net/sb1000.ko
drivers/net/sc92031.ko
drivers/net/seeq8005.ko
drivers/net/sfc/sfc.ko
drivers/net/sis190.ko
drivers/net/sis900.ko
drivers/net/skfp/skfp.ko
drivers/net/skge.ko
drivers/net/sky2.ko
drivers/net/slhc.ko
drivers/net/slip.ko
drivers/net/smc-ultra.ko
drivers/net/smc9194.ko
drivers/net/smsc9420.ko
drivers/net/starfire.ko
drivers/net/stmmac/stmmac.ko
drivers/net/sundance.ko
drivers/net/sungem.ko
drivers/net/sungem_phy.ko
drivers/net/sunhme.ko
drivers/net/tehuti.ko
drivers/net/tg3.ko
drivers/net/tlan.ko
drivers/net/tokenring/3c359.ko
drivers/net/tokenring/abyss.ko
drivers/net/tokenring/ibmtr.ko
drivers/net/tokenring/lanstreamer.ko
drivers/net/tokenring/olympic.ko
drivers/net/tokenring/proteon.ko
drivers/net/tokenring/skisa.ko
drivers/net/tokenring/smctr.ko
drivers/net/tokenring/tms380tr.ko
drivers/net/tokenring/tmspci.ko
drivers/net/tulip/de2104x.ko
drivers/net/tulip/de4x5.ko
drivers/net/tulip/dmfe.ko
drivers/net/tulip/tulip.ko
drivers/net/tulip/uli526x.ko
drivers/net/tulip/winbond-840.ko
drivers/net/tulip/xircom_cb.ko
drivers/net/tun.ko
drivers/net/typhoon.ko
drivers/net/usb/asix.ko
drivers/net/usb/catc.ko
drivers/net/usb/cdc_eem.ko
drivers/net/usb/cdc_ether.ko
drivers/net/usb/cdc_subset.ko
drivers/net/usb/cx82310_eth.ko
drivers/net/usb/dm9601.ko
drivers/net/usb/gl620a.ko
drivers/net/usb/int51x1.ko
drivers/net/usb/ipheth.ko
drivers/net/usb/kaweth.ko
drivers/net/usb/mcs7830.ko
drivers/net/usb/net1080.ko
drivers/net/usb/pegasus.ko
drivers/net/usb/plusb.ko
drivers/net/usb/rndis_host.ko
drivers/net/usb/rtl8150.ko
drivers/net/usb/sierra_net.ko
drivers/net/usb/smsc75xx.ko
drivers/net/usb/smsc95xx.ko
drivers/net/usb/usbnet.ko
drivers/net/usb/zaurus.ko
drivers/net/veth.ko
drivers/net/via-rhine.ko
drivers/net/via-velocity.ko
drivers/net/virtio_net.ko
drivers/net/vmxnet3/vmxnet3.ko
drivers/net/vxge/vxge.ko
drivers/net/wd.ko
drivers/net/yellowfin.ko
drivers/net/znet.ko
drivers/parport/parport.ko
drivers/parport/parport_ax88796.ko
drivers/parport/parport_cs.ko
drivers/parport/parport_pc.ko
drivers/parport/parport_serial.ko
drivers/pcmcia/i82092.ko
drivers/pcmcia/i82365.ko
drivers/pcmcia/pd6729.ko
drivers/pcmcia/tcic.ko
drivers/pps/clients/pps-ldisc.ko
drivers/pps/pps_core.ko
drivers/tty/n_gsm.ko
drivers/tty/n_hdlc.ko
drivers/tty/n_r3964.ko
drivers/uio/uio.ko
drivers/uio/uio_aec.ko
drivers/uio/uio_cif.ko
drivers/uio/uio_netx.ko
drivers/uio/uio_pci_generic.ko
drivers/uio/uio_pdrv.ko
drivers/uio/uio_pdrv_genirq.ko
drivers/uio/uio_sercos3.ko
drivers/usb/class/cdc-acm.ko
drivers/usb/class/cdc-wdm.ko
drivers/usb/class/usblp.ko
drivers/usb/class/usbtmc.ko
drivers/usb/host/isp1362-hcd.ko
drivers/usb/host/oxu210hp-hcd.ko
drivers/usb/host/r8a66597-hcd.ko
drivers/usb/host/sl811_cs.ko
drivers/usb/host/u132-hcd.ko
drivers/usb/host/xhci-hcd.ko
drivers/usb/misc/adutux.ko
drivers/usb/misc/appledisplay.ko
drivers/usb/misc/cypress_cy7c63.ko
drivers/usb/misc/cytherm.ko
drivers/usb/misc/emi26.ko
drivers/usb/misc/emi62.ko
drivers/usb/misc/ftdi-elan.ko
drivers/usb/misc/idmouse.ko
drivers/usb/misc/iowarrior.ko
drivers/usb/misc/isight_firmware.ko
drivers/usb/misc/ldusb.ko
drivers/usb/misc/legousbtower.ko
drivers/usb/misc/rio500.ko
drivers/usb/misc/sisusbvga/sisusbvga.ko
drivers/usb/misc/trancevibrator.ko
drivers/usb/misc/usblcd.ko
drivers/usb/misc/usbled.ko
drivers/usb/misc/usbsevseg.ko
drivers/usb/misc/usbtest.ko
drivers/usb/misc/yurex.ko
drivers/usb/otg/gpio_vbus.ko
drivers/usb/otg/nop-usb-xceiv.ko
drivers/usb/storage/uas.ko
drivers/usb/storage/ums-alauda.ko
drivers/usb/storage/ums-cypress.ko
drivers/usb/storage/ums-datafab.ko
drivers/usb/storage/ums-freecom.ko
drivers/usb/storage/ums-isd200.ko
drivers/usb/storage/ums-jumpshot.ko
drivers/usb/storage/ums-karma.ko
drivers/usb/storage/ums-onetouch.ko
drivers/usb/storage/ums-sddr09.ko
drivers/usb/storage/ums-sddr55.ko
drivers/usb/storage/ums-usbat.ko
drivers/vhost/vhost_net.ko
fs/cifs/cifs.ko
fs/fscache/fscache.ko
lib/cpu-notifier-error-inject.ko
lib/crc-ccitt.ko
lib/crc-t10dif.ko
lib/crc7.ko
lib/lru_cache.ko
lib/reed_solomon/reed_solomon.ko
lib/ts_bm.ko
lib/ts_fsm.ko
lib/ts_kmp.ko
net/802/garp.ko
net/802/p8022.ko
net/802/p8023.ko
net/802/psnap.ko
net/802/stp.ko
net/802/tr.ko
net/can/can-bcm.ko
net/can/can-raw.ko
net/can/can.ko
net/ceph/libceph.ko
net/ieee802154/af_802154.ko
net/ieee802154/ieee802154.ko
net/ipv4/inet_diag.ko
net/ipv6/ipv6.ko
net/l2tp/l2tp_core.ko
net/l2tp/l2tp_debugfs.ko
net/l2tp/l2tp_eth.ko
net/l2tp/l2tp_ip.ko
net/l2tp/l2tp_netlink.ko
net/l2tp/l2tp_ppp.ko
net/llc/llc.ko
net/llc/llc2.ko
net/xfrm/xfrm_ipcomp.ko

Installing a PXE environment on the host

In order to netboot, you first need to set up a PXE environment. This needs a DHCP server with the BOOTP protocol and a TFTP server.

The following instructions are for Slackware. You can easily adapt it to another distro or find information about PXE on the web.

Configurations

DHCP Server
  1. Install the 'dhcp' server package:
    slapt-get -i dhcp
  2. Create the dhcp daemon:
    cat <<'EOF' >/etc/rc.d/rc.dhcpd
    #!/bin/sh
    #
    # /etc/rc.d/rc.dhcpd
    #      This shell script takes care of starting and stopping
    #      the ISC DHCPD service
    #
    # Put the command line options here that you want to pass to dhcpd:
    DHCPD_OPTIONS="-q eth0"
    [ -x /usr/sbin/dhcpd ] || exit 0
    [ -f /etc/dhcpd.conf ] || exit 0
    start() {
      # Start daemons.
      echo -n "Starting dhcpd:  /usr/sbin/dhcpd $DHCPD_OPTIONS "
      /usr/sbin/dhcpd $DHCPD_OPTIONS
      echo
    }
    stop() {
      # Stop daemons.
      echo -n "Shutting down dhcpd: "
      killall -TERM dhcpd
      echo
    }
    status() {
      PIDS=$(pidof dhcpd)
      if [ "$PIDS" == "" ]; then
        echo "dhcpd is not running!"
      else
        echo "dhcpd is running at pid(s) ${PIDS}."
      fi
    }
    restart() {
      stop
      sleep 3
      start
    }
    # See how we were called.
    case "$1" in
      start)
        start
        ;;
      stop)
        stop
        ;;
      restart)
        restart
        ;;
      status)
        status
        ;;
      *)
        echo "Usage: $0 {start|stop|status|restart}"
        ;;
    esac
    exit 0
    EOF
    chmod +x /etc/rc.d/rc.dhcpd
    
  3. Configure the dhcp server to answer the BOOTP protocol with the location of the PXE boot manager to fetch by TFTP. You also configure the network information that will be fetched by the PXE client and by the live distro.

    The config file is /etc/dhcpd.conf:
    # dhcpd.conf
    #
    # Configuration file for ISC dhcpd (see 'man dhcpd.conf')
    
    # If this DHCP server is the official DHCP server for the local
    # network, the authoritative directive should be uncommented.
    authoritative;
    ddns-update-style none;
    
    # Allow bootp requests
    allow bootp;
    
    # Point to the TFTP server:
    next-server 192.168.0.1;
    
    # Default lease is 1 week (604800 sec.)
    default-lease-time 604800;
    # Max lease is 4 weeks (2419200 sec.)
    max-lease-time 2419200;
    
    subnet 192.168.0.0 netmask 255.255.255.0 {
      option domain-name "my.lan";
      option broadcast-address 192.168.0.255;
      option subnet-mask 255.255.255.0;
      option domain-name-servers 192.168.0.1;
      option routers 192.168.0.10;
      range dynamic-bootp 192.168.0.50 192.168.0.100;
      use-host-decl-names on;
      if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
        filename "/tftpboot/pxelinux.0";
      }
    }
    This is just an example, adjust with your network configuration.
TFTP Server and Boot manager
  1. Install a TFTP server, the 'tftp-hpa' package, and syslinux:
    slapt-get -i tftp-hpa syslinux
  2. Create the following directory structure:
    /tftpboot/
    /tftpboot/pxelinux.cfg/
    /tftpboot/pxelinux.cfg/default
    /tftpboot/pxelinux.0
    /tftpboot/menu.c32
    /tftpboot/salixlive/vmlinuz
    /tftpboot/salixlive/initextra.xz
    
    • vmlinuz is the live kernel you can find the in the boot folder in the Salix Live ISO.
    • initextra.xz is the special initrd you can find in sourceforge.net download page.
    • You can copy menu.c32 from the following location: /usr/share/syslinux/menu.c32
    • You can copy the pxelinux.0 from the following location: /usr/share/syslinux/pxelinux.0
    • Here is my pxelinux.cfg/default file:
      DEFAULT menu.c32
      PROMPT 0
      
      LABEL salixlive_nfs
      MENU LABEL ^N) Net boot Salix Live (NFS)
      LINUX /salixlive/vmlinuz
      APPEND root=/dev/ram0 remote=nfs,192.168.0.1,/tftpboot/salixlive/iso skipnetcheck quiet
      INITRD /salixlive/initextra.xz
      
      LABEL salixlive_ssh
      MENU LABEL ^S) Net boot Salix Live (SSH)
      LINUX /salixlive/vmlinuz
      APPEND root=/dev/ram0 remote=ssh,192.168.0.1,/tftpboot/salixlive/iso skipnetcheck quiet
      INITRD /salixlive/initextra.xz
      
      LABEL salixlive_smb
      MENU LABEL ^M) Net boot Salix Live (Samba)
      LINUX /salixlive/vmlinuz
      APPEND root=/dev/ram0 remote=smb,192.168.0.1,salixlive skipnetcheck quiet
      INITRD /salixlive/initextra.xz
      
      LABEL salixlive_ftp
      MENU LABEL ^F) Net boot Salix Live (FTP)
      LINUX /salixlive/vmlinuz
      APPEND root=/dev/ram0 remote=ftp,192.168.0.1::user:password,/salixlive.iso skipnetcheck quiet
      INITRD /salixlive/initextra.xz
      
      LABEL salixlive_http
      MENU LABEL ^H) Net boot Salix Live (HTTP)
      LINUX /salixlive/vmlinuz
      APPEND root=/dev/ram0 remote=http,192.168.0.1,/salixlive.iso skipnetcheck quiet
      INITRD /salixlive/initextra.xz
      
    Of course you should tweak the config of pxelinux.cfg/default and the content of the salixlive directory (or any other directory).

Run

  1. Set up either NFS, SSH, HTTP, Samba or FTP to serve the Live CD to the guest:
    • you must point to the Salix Live ISO for HTTP and FTP ;
    • you must point to the Salix Live ISO content (files extracted to a directory, or iso loop-mounted) for NFS, SSH and Samba.
  2. Launch the TFTP server:
    # in.tftpd -l /tftpboot/
  3. Launch the DHCP server:
    # service start dhcpd

Boot the guest

Boot your guest and look for a key to press to enter the BIOS setup (usually one of the functions keys or the delete key).

Then, in your bios, check that PXE is available, active, and come first in the boot order.

Plug you LAN cable, and then exit setup.

If it works correctly, you will see some protocol exchange messages between your computer and the host server for getting the LAN configuration and shortly after you will presented the pxelinux menu. Select one option, this will download the kernel and initrd through TFTP protocol and then boot them.

If the protocol choosen need some authentifications, you will be asked to enter them during the boot process.