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
This commit is contained in:
Shivanand Tendulker 2015-04-09 01:30:57 -07:00
parent 22461e4b41
commit f7a57c9827
2 changed files with 14 additions and 7 deletions

View File

@ -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 }}
}

View File

@ -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,