diff options
author | Shivanand Tendulker <stendulker@gmail.com> | 2015-04-09 01:30:57 -0700 |
---|---|---|
committer | Shivanand Tendulker <stendulker@gmail.com> | 2015-04-10 09:09:53 -0700 |
commit | f7a57c982726041092e6496eb68c90b37e8620a8 (patch) | |
tree | e02d028b64923009196c320171d289e46f743c5c | |
parent | 22461e4b416acc9e58c9b0cbc5eea4fd0f9d60a2 (diff) | |
download | ironic-f7a57c982726041092e6496eb68c90b37e8620a8.tar.gz |
Fix for automated boot iso issue with IPA ramdisk
Autogenerated boot iso for iscsi_ilo driver fails when
Fedora based IPA ramdisk is used for deploy in UEFI boot mode.
The keywords used (linux and initrd) in grub.cfg template are
specific to Ubuntu only. They are not recognized by Fedora.
Have changed it to keywords (linuxefi and initrdefi) which are
recognized by both Ubuntu and Fedora deploy ramdisks.
Also the menuentry name has been changed to 'boot_partition' in
grub config file. This is done to make it consistent with pxe
driver's elilo config file wherein menuentry name for the final
boot of user image is 'boot_partition'.
Closes-Bug: 1441691
Change-Id: Ia6fdbf4868e6606a18b33ce2b75f29f701a31b35
-rw-r--r-- | ironic/common/grub_conf.template | 10 | ||||
-rw-r--r-- | ironic/tests/test_images.py | 11 |
2 files changed, 14 insertions, 7 deletions
diff --git a/ironic/common/grub_conf.template b/ironic/common/grub_conf.template index 746a43d97..2a979d2d6 100644 --- a/ironic/common/grub_conf.template +++ b/ironic/common/grub_conf.template @@ -1,4 +1,8 @@ -menuentry "install" { -linux {{ linux }} {{ kernel_params }} -- -initrd {{ initrd }} +set default=0 +set timeout=5 +set hidden_timeout_quiet=false + +menuentry "boot_partition" { +linuxefi {{ linux }} {{ kernel_params }} -- +initrdefi {{ initrd }} } diff --git a/ironic/tests/test_images.py b/ironic/tests/test_images.py index fb1da9dbc..b610d4b0a 100644 --- a/ironic/tests/test_images.py +++ b/ironic/tests/test_images.py @@ -424,12 +424,15 @@ class FsImageTestCase(base.TestCase): self.assertEqual(expected_cfg, cfg) def test__generate_grub_cfg(self): - kernel_params = ['key1=value1', 'key2'] options = {'linux': '/vmlinuz', 'initrd': '/initrd'} - expected_cfg = ("menuentry \"install\" {\n" - "linux /vmlinuz key1=value1 key2 --\n" - "initrd /initrd\n" + expected_cfg = ("set default=0\n" + "set timeout=5\n" + "set hidden_timeout_quiet=false\n" + "\n" + "menuentry \"boot_partition\" {\n" + "linuxefi /vmlinuz key1=value1 key2 --\n" + "initrdefi /initrd\n" "}") cfg = images._generate_cfg(kernel_params, |