Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1488557

Summary: [RFE] diskimage-builder support whole disk images with UEFI whole disk image support for overcloud nodes
Product: Red Hat OpenStack Reporter: mlammon
Component: diskimage-builderAssignee: Yolanda Robla <yroblamo>
Status: CLOSED CURRENTRELEASE QA Contact: mlammon
Severity: medium Docs Contact:
Priority: medium    
Version: 12.0 (Pike)CC: bfournie, hfukumot, iwienand, jcoufal, knoha, mburns, racedoro, rhel-osp-director-maint, sasha, yroblamo
Target Milestone: Upstream M1Keywords: FutureFeature, Triaged
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1646907 1677770 (view as bug list) Environment:
Last Closed: 2019-06-20 10:19: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:
Embargoed:
Bug Depends On: 1438574    
Bug Blocks: 1646907, 1677770    
Attachments:
Description Flags
Boot Fail console none

Description mlammon 2017-09-05 16:55:54 UTC
Created attachment 1322332 [details]
Boot Fail console

Description of problem:

Need to have diskimage-builder support whole disk images with UEFI for bz[2]. The whole disk image support with GPT partition and UEFI boot partition would be required most likely with diskimage-builder.  Recent testing using diskimage-builder showing whole disk image built with MBR type by default.

Please see doc [3] under section 8.14.1.1 MBR and GPT considerations
"UEFI systems
Only GPT is allowed on UEFI systems. In order to install on a formatted disk with a MBR, you must first reformat it."


How reproducible:
100% and is testing using Bare metal setup

Steps to Reproduce:
1. Deploy osp 12 undercloud [1] update undercloud.conf per UEFI documentation
2. register nodes
3. perform introspection (see [2] bz 1479386 for workaround
4. deploy overcloud nodes

Actual results:

Please see console image (attachment)

You can see our hardened image is msdos(MBR).  We believe this is the reason why we can't deploy this image under UEFI.  This same hardened image works with default BIOS boot
(undercloud) [stack@undercloud images]$ guestfish -a overcloud-hardened-full.qcow2

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> run
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00
><fs> mount /dev/sda /
libguestfs: error: mount: /dev/sda on / (options: ''): mount: /dev/sda is write-protected, mounting read-only
mount: unknown filesystem type '(null)'
><fs> mount /dev/sda1 /
><fs> list-filesystems
/dev/sda1: xfs
/dev/sda2: unknown
/dev/sda5: xfs
/dev/sda6: xfs
/dev/sda7: xfs
/dev/sda8: xfs
/dev/sda9: xfs
><fs> list-partitions
/dev/sda1
/dev/sda2
/dev/sda5
/dev/sda6
/dev/sda7
/dev/sda8
/dev/sda9

><fs> part-get-parttype /dev/sda
msdos


Expected results:
We expect to successfully deploy rhel whole disk image with UEFI

Additional info:
[0] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/11/html/director_installation_and_usage/appe-alternative_boot_modes#appe-Alternative_Boot_Modes-UEFI
[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/11/html/director_installation_and_usage/appe-alternative_boot_modes#appe-Alternative_Boot_Modes-UEFI
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1479386
[3] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-disk-partitioning-setup-x86.html#sect-bootloader-x86

Comment 1 Yolanda Robla 2017-09-06 08:40:07 UTC
Support for GPT in block devices need to be added to diskimage-builder.

Comment 2 mlammon 2017-09-06 15:37:57 UTC
It was discussed and agreed this is not a bug rather a new feature [RFE].  I have updated the subject to reflect this being a RFE

Comment 6 Ian Wienand 2018-01-18 06:23:17 UTC
There is some progress here; [1] proposes GPT support for dib.  It's still an open question how to get UEFI bootloaders installed in the image, but this is a start.

[1] https://review.openstack.org/#/c/533490/

Comment 7 Ramon Acedo 2018-03-27 09:18:53 UTC
Ian, is there any additional work to add support for UEFI boot loader (grub2-efi) to dib in the context of building the overcloud-full image? If so, could you add it here? Thanks!

Comment 8 Ian Wienand 2018-03-28 22:30:35 UTC
I couldn't 100% say; for a basic use-case, I would think no.  However if you start adding custom layout partitions or lvm+uefi for example ... then that probably needs some tweaking.  

Per [1], appending the "block-device-efi" element should flip the build into making an efi boot partition and installing grub-efi.    

[1] https://docs.openstack.org/diskimage-builder/latest/user_guide/building_an_image.html#disk-image-layout

Comment 9 Bob Fournier 2018-04-16 14:38:33 UTC
Moving to OSP-15.

Comment 10 Yolanda Robla 2018-06-16 06:45:37 UTC
Currently there is no support for it, but I started to work on that this week.

Comment 11 Bob Fournier 2018-08-29 20:31:33 UTC
It looks like all fixes have landed, can we move this to POST?

Comment 19 Bob Fournier 2018-10-26 00:04:55 UTC
Looks like all patches have merged, moving to POST.

Comment 26 Yolanda Robla 2018-11-06 09:47:11 UTC
I started the backport to 13, opening a new bug to track it https://bugzilla.redhat.com/show_bug.cgi?id=1646907