Bug 1391022

Summary: Localboot doesn't work with RHEL6
Product: Red Hat OpenStack Reporter: Derek Higgins <derekh>
Component: openstack-ironic-python-agentAssignee: Lucas Alvares Gomes <lmartins>
Status: CLOSED WONTFIX QA Contact: Raviv Bar-Tal <rbartal>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: mburns, mlopes, slinaber
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Red Hat Enterprise Linux 6 only contains GRUB Legacy, while OpenStack bare metal provisioning (ironic) only supports the installation of GRUB2. As a result, deploying a partition image with local boot will fail during the bootloader installation. As a workaround, if using RHEL 6 for bare metal instances, do not set boot_option to local in the flavor settings. You can also consider deploying a RHEL 6 whole disk image which already has GRUB Legacy installed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-02 13:38:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Derek Higgins 2016-11-02 12:21:17 UTC
Using localboot on RHEL6 images fails when installing the bootloader with the following error

chroot /tmp/tmpBo_mZh /bin/bash -c "/usr/sbin/grub-install /dev/vda"
Exit code: 127
Stdout: u''
Stderr: u'/bin/bash: /usr/sbin/grub-install: No such file or directory'


as grub-install is available at the path "/sbin/grub-install" not "/usr/sbin/grub-install"

Adding a symbolic link to the image so it finds the grub-install command shows another failure
$ ln -s /usr/sbin/grub-install -> /sbin/grub-install

chroot /tmp/tmpb2FNYF /bin/bash -c "/usr/sbin/grub-install /dev/vda"
Exit code: 1
Stdout: u\''
Stderr: u\'The file /boot/grub/stage1 not read correctly.'


netboot works find as IPA doesn't attempt to install a bootloader

Comment 1 Lucas Alvares Gomes 2016-11-02 13:38:50 UTC
Hi Derek,

So I believe this happens because RHEL6 only have GRUB Legacy and Ironic only supports installing GRUB2. 

As you said, netboot should work. And if localboot is a requirement, what can be done is to create a whole disk image with RHEL6 + GRUB Legacy installed and deploy it [0].



[0] http://docs.openstack.org/project-install-guide/baremetal/draft/configure-integration.html#configure-the-image-service