Bug 1488557 - [RFE] diskimage-builder support whole disk images with UEFI whole disk image support for overcloud nodes
Summary: [RFE] diskimage-builder support whole disk images with UEFI whole disk image ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: diskimage-builder
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Upstream M1
: 15.0 (Stein)
Assignee: Yolanda Robla
QA Contact: mlammon
URL:
Whiteboard:
Depends On: 1438574
Blocks: 1646907 1677770
TreeView+ depends on / blocked
 
Reported: 2017-09-05 16:55 UTC by mlammon
Modified: 2022-08-16 12:38 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1646907 1677770 (view as bug list)
Environment:
Last Closed: 2019-06-20 10:19:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Boot Fail console (2.94 MB, image/jpeg)
2017-09-05 16:55 UTC, mlammon
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 533490 0 'None' MERGED GPT partitioning support 2020-12-02 15:41:35 UTC
OpenStack gerrit 573726 0 'None' MERGED Fix bootloader packages for rhel 2020-12-02 15:41:35 UTC
OpenStack gerrit 576041 0 'None' MERGED Fix bootloader for efi on rhel systems 2020-12-02 15:41:36 UTC
OpenStack gerrit 576098 0 'None' MERGED Convert labels to upper case 2020-12-02 15:42:02 UTC
OpenStack gerrit 576495 0 'None' MERGED Add overcloud-secure-uefi element 2020-12-02 15:42:02 UTC
OpenStack gerrit 576503 0 'None' MERGED Add security hardened images that can boot from uefi 2020-12-02 15:41:35 UTC
Red Hat Issue Tracker OSP-4689 0 None None None 2022-08-16 12:38:52 UTC
Red Hat Knowledge Base (Solution) 3559511 0 None None None 2018-08-10 02:59:21 UTC

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


Note You need to log in before you can comment on or make changes to this bug.