Skip to content

Instantly share code, notes, and snippets.

@dizz
Created October 16, 2013 11:16
Show Gist options
  • Save dizz/7006183 to your computer and use it in GitHub Desktop.
Save dizz/7006183 to your computer and use it in GitHub Desktop.
PXE Default File
DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT discovery
LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0
<% for profile in @profiles -%>
LABEL <%= "#{profile[:template]} - #{profile[:hostgroup]}" %>
kernel <%= profile[:hostgroup].operatingsystem.kernel(profile[:hostgroup].architecture) %>
<% case profile[:hostgroup].operatingsystem.pxe_type -%>
<% when "kickstart" -%>
append initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> ks=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ksdevice=bootif network kssendmac
<% when "preseed" -%>
append initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> interface=auto url=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=unassigned-hostname locale=en_US console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA
<% end -%>
<% end -%>
LABEL discovery
MENU LABEL Boot Discovery
TEXT HELP
Boot the Foreman Discovery Image
Use TAB to edit options for specific needs.
ENDTEXT
KERNEL /boot/disco-vmlinuz
APPEND initrd=/boot/disco-initrd.gz foreman.ip=foreman.cloudcomplab.dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment