metal/installer/pxe-network-installer/pxe-network-installer/pxe-grub.cfg.static

71 lines
1.5 KiB
Plaintext
Executable File

default=0
# If the default menu fails then menu entry 8 is used.
fallback=8
timeout=10
GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
mac=$net_default_mac
# net_default_mac is the network interface that was used to load grub.
# We need to convert from 01:00:1e:67:56:9d:c1 to 01-00-1e-67-56-9d-c1 to
# match the config file format.
regexp --set=new '(^..)' "$mac"
conf=$new
regexp --set=new '^.{3}(.{2})' "$mac"
conf=$conf-$new
regexp --set=new '^.{6}(.{2})' "$mac"
conf=$conf-$new
regexp --set=new '^.{9}(.{2})' "$mac"
conf=$conf-$new
regexp --set=new '^.{12}(.{2})' "$mac"
conf=$conf-$new
regexp --set=new '^.{15}(.{2})' "$mac"
conf=$conf-$new
# First try to load the mac config, if it does not exist yet (its created when a
# personality is assigned to a node) then grub.conf is loaded again. We timeout
# for 10 sec between re-tries.
# Menu 0
menuentry 'Waiting for this node to be configured.' {
insmod net
insmod efinet
configfile pxelinux.cfg/efi-01-$conf
}
menuentry ' ' {
echo " "
}
menuentry 'This system has been configured with static management' {
echo " "
}
menuentry 'and infrastructure IP address allocation. This requires' {
echo " "
}
menuentry 'that the node be manually provisioned in System' {
echo " "
}
menuentry "Inventory using the 'system host-add' CLI, GUI, or" {
echo " "
}
# Menu 6
menuentry 'sysinv-api equivalent.' {
echo " "
}
# Menu 7
menuentry ' ' {
echo " "
}
# Menu 8
menuentry 'Node not configured.' {
insmod net
insmod efinet
configfile grub.cfg
}