Skip to content

Instantly share code, notes, and snippets.

@lytithwyn
Created December 12, 2014 14:26
Show Gist options
  • Save lytithwyn/f916d096a90456c9b23e to your computer and use it in GitHub Desktop.
Save lytithwyn/f916d096a90456c9b23e to your computer and use it in GitHub Desktop.
UEFI PXE Configs
# /etc/dnsmasq.d/dhcp.conf
dhcp-range=192.168.1.100,192.168.1.254,12h
dhcp-option=3,192.168.1.1
dhcp-option=15,alltech.local
dhcp-boot=pxelinux.0
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,bootx64.efi
except-interface=wan0
dhcp-authoritative
# /etc/init.d/dnsmasq
# change...
dnsmasq=/usr/sbin/dnsmasq
# to...
dnsmasq=/usr/local/sbin/dnsmasq
apt-get download shim-signed
ar vx shim-signed_1.6+0.4-0ubuntu4_amd64.deb
tar -xvJf data.tar.xz
cp ./usr/lib/shim/shim.efi.signed ./bootx64.efi
# !! now you're ready to copy ./bootx64.efi to your tftproot
rm -rf ./usr data.tar.xz control.tar.gz debian-binary shim-signed_1.6+0.4-0ubuntu4_amd64.deb
wget -O grubx64.efi http://archive.ubuntu.com/ubuntu/dists/trusty/main/uefi/grub2-amd64/current/grubnetx64.efi.signed
# !! now copy ./grubx64.efi to your tftproot
apt-get download grub-common
ar vx grub-common_2.02~beta2-9ubuntu1_amd64.deb
tar -xvJf data.tar.xz
cp ./usr/share/grub/unicode.pf2 ./
# !! now copy unicode.pf2 to your tpftproot under grub/fonts (e.g. /tftpboot/grub/fonts/)
rm -rf ./usr data.tar.xz control.tar.gz debian-binary grub-common_2.02~beta2-9ubuntu1_amd64.deb
# /tftpboot/grub/grub.cfg
set default="0"
set timeout=-1
if loadfont unicode ; then
set gfxmode=auto
set locale_dir=$prefix/locale
set lang=en_US
fi
terminal_output gfxterm
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
set linux_gfx_mode=keep
export linux_gfx_mode
menuentry 'Linuxmint Qiana' {
gfxmode $linux_gfx_mode
linux (pxe)/vmlinuz-3.15.3 $vt_handoff root=/dev/nfs initrd=initrd.img-qiana nfsroot=192.168.1.15:/exports/nfsrootqiana ip=dhcp rw
initrd (pxe)/initrd.img-qiana
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment