ipxe

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Puppet: iPXE boot module

# create module structure
mkdir -p /etc/puppet/modules/ipxe/files
mkdir -p /etc/puppet/modules/ipxe/manifests

# download files
wget -q http://dl.panticz.de/ipxe/ipxe.lkrn -O /etc/puppet/modules/ipxe/files/ipxe.lkrn
wget -q http://dl.panticz.de/ipxe/49_ipxe -O /etc/puppet/modules/ipxe/files/49_ipxe

# download module definiction
wget -q https://raw.githubusercontent.com/panticz/puppet/master/modules/ipxe/init.pp -O /etc/puppet/modules/ipxe/manifests/init.pp

class ipxe {
  file { "/boot/grub/ipxe.lkrn":
    source => "puppet:///modules/ipxe/ipxe.lkrn"
  }

  file { "/etc/grub.d/49_ipxe":
    source => "puppet:///modules/ipxe/49_ipxe",
    mode => 700
  }

  exec { "update-grub":
    subscribe   => File["/etc/grub.d/49_ipxe"],
    refreshonly => true
  }
}

Boot iPXE from harddisc (Network booting from GRUB using iPXE)

wget -q https://raw.githubusercontent.com/panticz/preseed/master/ipxe/scripts/install_grub_ipxe.sh -O - | bash -

#!/bin/bash

# ensure that this script is run as root
if [ $(id -u) -ne 0 ]; then
  sudo $0
  exit
fi

# download GRUB iPXE boot image
wget -q http://dl.panticz.de/ipxe/ipxe.lkrn -O /boot/ipxe.lkrn

# create GRUB menu entry
wget -q https://raw.githubusercontent.com/panticz/preseed/master/ipxe/scripts/grub/49_ipxe -O /etc/grub.d/49_ipxe 
chmod a+x /etc/grub.d/49_ipxe

# update GRUB config
. /etc/os-release
case ${ID} in
  centos|fedora)
    grub2-mkconfig -o /boot/grub2/grub.cfg
  ;;
  debian|ubuntu)
    update-grub
  ;;
  *)
    echo "Distribution not supported. Please upgrade grub configuration manually"
esac

Links
http://packages.ubuntu.com/de/vivid/grub-ipxe
http://ipxe.org/embed

Compile iPXE

wget https://raw.githubusercontent.com/panticz/preseed/master/ipxe/scripts/build_ipxe.sh -O - | bash -

#!/bin/bash

# install requirements
sudo apt-get install -y build-essential liblzma-dev

# get source
git clone git://git.ipxe.org/ipxe.git /tmp/ipxe
 
# create boot script
cat <<EOF> /tmp/ipxe/src/boot.ipxe
#!ipxe
 
dhcp && chain http://\${next-server}/\${mac} || chain http://preseed.panticz.de/\${mac}
EOF
 
# OPTIONAL: enable HTTPS support
sed -i -e '/DOWNLOAD_PROTO_HTTPS/ s/#undef/#define/' /tmp/ipxe/src/config/general.h
 
# OPTIONAL: change product name
sed -i 's|PRODUCT_NAME ""|PRODUCT_NAME "preseed.panticz.de"|g' /tmp/ipxe/src/config/general.h
 
cd /tmp/ipxe/src
 
# build CD image (/tmp/ipxe/src/bin/ipxe.iso)
make bin/ipxe.iso EMBED=boot.ipxe
 
# build USB image (/tmp/ipxe/src/bin/ipxe.usb)
make bin/ipxe.usb EMBED=boot.ipxe
 
# build PXE image (/tmp/ipxe/src/bin/ipxe.pxe)
make bin/ipxe.pxe EMBED=boot.ipxe
 
# build GRUB image (/tmp/ipxe/src/bin/ipxe.lkrn)
make bin/ipxe.lkrn EMBED=boot.ipxe
 
# build undionly image (/tmp/ipxe/src/bin/undionly.kpxe)
make bin/undionly.kpxe EMBED=boot.ipxe

# ToDo: https boot
http://ipxe.org/cfg/crosscert
http://ipxe.org/cfg/trust

Links
http://ipxe.org
http://ipxe.org/download
http://www.coreboot.org/IPXE

TestServer - fully automated test system

  • iPXE netboot
  • Provisioning
  • Inventory
  • Hardware test
  • Monitoring
  • Automated system installation

Acronis iPXE boot

# chain
initrd tftp://${next-server}/acronis/ramdisk64.dat
chain tftp://${next-server}/acronis/kernel64.dat ramdisk_size=32768 vga=791 root=/dev/ram0 acpi=off quiet

Syndicate content