diff --git a/ironic/drivers/modules/initial_grub_cfg.template b/ironic/drivers/modules/initial_grub_cfg.template index 3c1a2d76db..a4cf15079b 100644 --- a/ironic/drivers/modules/initial_grub_cfg.template +++ b/ironic/drivers/modules/initial_grub_cfg.template @@ -1,7 +1,4 @@ -set default=initial -set timeout=5 -set hidden_timeout_quiet=false +echo Booting from $prefix + +source {{ tftp_root }}/$net_default_mac.conf -menuentry "initial" { -configfile {{ tftp_root }}/$net_default_mac.conf -} diff --git a/ironic/tests/unit/common/test_pxe_utils.py b/ironic/tests/unit/common/test_pxe_utils.py index 55661cd6d4..50cfb5ee0d 100644 --- a/ironic/tests/unit/common/test_pxe_utils.py +++ b/ironic/tests/unit/common/test_pxe_utils.py @@ -1248,7 +1248,7 @@ class TestPXEUtils(db_base.DbTestCase): def write_to_file(path, contents): self.assertIn('/grub/grub.cfg', path) self.assertIn( - 'configfile /tftpboot/$net_default_mac.conf', + 'source /tftpboot/$net_default_mac.conf', contents ) diff --git a/releasenotes/notes/grub-default-template-change-a7bacdef4543a9ae.yaml b/releasenotes/notes/grub-default-template-change-a7bacdef4543a9ae.yaml new file mode 100644 index 0000000000..a23c62de06 --- /dev/null +++ b/releasenotes/notes/grub-default-template-change-a7bacdef4543a9ae.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes the default grub initial configuration to be simpler and directly + load the generated configuration file. The template also includes output + which also help operators understand the context as to where the node is + booting from, should issues be encountered.