Skip to content

Instantly share code, notes, and snippets.

@spaced
Last active November 26, 2018 12:40
Show Gist options
  • Save spaced/e664cf03ea1d1688f02ecc92ea6bf0c1 to your computer and use it in GitHub Desktop.
Save spaced/e664cf03ea1d1688f02ecc92ea6bf0c1 to your computer and use it in GitHub Desktop.
ipxe matchbox coreos

#clone ipxe cd src write script.pxe:

#!ipxe

echo yeaaaa
echo lets go down the rabbit hole..
dhcp
#set net0/ip 192.168.0.100
#set net0/netmask 255.255.255.0
#set net0/gateway 192.168.0.1
#Configure a DNS server
#  set dns 192.168.0.1
#
#shell
chain http://matchbox.foo:8080/boot.ipxe

build iso

mkdir -p /tmp/uefibootable_ipxe/src/EFI/BOOT
cd ipxe/src
(make bin-x86_64-efi/ipxe.efi EMBED=script.ipxe) && \
(cp bin-x86_64-efi/ipxe.efi /tmp/uefibootable_ipxe/src/EFI/BOOT/BOOTX64.EFI) && \
(cd /tmp/uefibootable_ipxe/out && mkisofs -o boottest.iso ../src)

run matchbox docker

mkdir -p /tmp/matchbox
docker run \
  -v /tmp/matchbox:/var/lib/matchbox \
  -p 8080:8080
  --rm quay.io/coreos/matchbox:latest \                                                                                           1 ↵
  -address=0.0.0.0:8080 \
  -log-level=debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment