-
Notifications
You must be signed in to change notification settings - Fork 4
/
boot.ipxe
35 lines (28 loc) · 1.33 KB
/
boot.ipxe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!ipxe
# Related to https://bugs.gentoo.org/396467
# How to use:
# * Download undionly.kpxe or ipxe.usb from http://boot.ipxe.org
# * replace any pxelinux.0 with undionly.kpxe, or even better configure dhcpd to point to undionly.kpxe
# * setup http server hosting this and the below files (http is faster then tftp)
# * PXE boot a machine (or use usb image), and you should see iPXE start and a prompt for pressing Ctrl-B - do so
# * dhcp - to get ip
# * chain http://server/boot.ipxe - (this file) to boot
# https://github.com/NiKiZe/Gentoo-iPXE for more info, use discussions for questions
# dnsmasq.conf minimal sample, see README for more details
# dhcp-match=set:ipxe-ok,175,19
# dhcp-boot=tag:!ipxe-ok,undionly.kpxe
# dhcp-boot=tag:ipxe-ok,http://gentoo.ipxe.se/boot.ipxe
# other files below will be loaded relative to this scripts path
# allow for external keymap setting
isset ${keymap} || set keymap dokeymap
# allow for external cmdline options
isset ${cmdline} || set cmdline vga=791
# http://ipxe.org/cmd/kernel
# cmdline initrd= is needed in efi mode
kernel gentoo root=/dev/ram0 init=/linuxrc ${keymap} looptype=squashfs loop=/image.squashfs cdroot initrd=combined.igz ${cmdline}
# http://ipxe.org/cmd/initrd
initrd combined.igz
# Let's see what we got
imgstat
# boot the currently selected image (it was selected by the kernel line)
boot