diff --git a/etc/examples/grub.cfg.ww b/etc/examples/grub.cfg.ww new file mode 100644 index 00000000..cf7c8165 --- /dev/null +++ b/etc/examples/grub.cfg.ww @@ -0,0 +1,28 @@ +# This file is autogenerated by warewulf +# Host: {{.BuildHost}} +# Time: {{.BuildTime}} +# Source: {{.BuildSource}} +echo "================================================================================" +echo "Warewulf v4 now booting with grub" +echo +uri="(http,{{.Ipaddr}}:9873)/provision/${net_default_mac}?assetkey=" +kernel="${uri}&stage=kernel" +container="${uri}&stage=container&compress=gz" +system="${uri}&stage=system&compress=gz" +echo "Warewulf Controller: {{.Ipaddr}}" +echo "Trying to load a kernel... " +linux $kernel wwid=${net_default_mac} +if [ x$? = x0 ] ; then +echo "Loading initrd..." +initrd $system $container +echo "Booting..." +boot +else +echo "MESSAGE: This node is unconfigured. Please have your system administrator add a" +echo " configuration for this node with HW address: ${net_default_mac}" +echo "" +echo "Rebooting in 1 minute..." +sleep 60 +reboot +fi +