diskimage-builder/diskimage_builder
Clark Boylan 3294aecca2 Properly set grub2 root device when using efi
We've noticed that centos8 arm64 images have a root devices of
/dev/mapper/loop7p3 which make sense within a dib image build context
but not at boot time. Dib intends to use labels to set the root device
but when efi is used we end up running grub2-mkconfig against the efi
grub config path before we configure grub to use labels.

Fix this by running grub2-mkconfig after its configuration is set.
This should avoid confusion and complicated paths through the scripts
that configure this for us. We then copy the resulting config to the efi
specific grub.cfg location for platforms that have it.

There is also a small refactoring that is done to try and make the ~3
boot variants more clear:

 1) Booting with legacy bios
 2) Booting with uefi without a signed shim that directly calls grub
 3) Booting with uefi and a signed shim that calls grub

Options 1 and 2 share the /boot/grub*/grub.cfg file. Option 3 needs its
grub.cfg to live alongside distro specific efi target.

Change-Id: Ie9790da9d1bbea58197b37b15a48e77f8a93c1ac
2021-04-07 15:46:10 -07:00
..
block_device Merge "Switch from unittest2 compat methods to Python 3.x methods" 2020-07-13 02:21:12 +00:00
elements Properly set grub2 root device when using efi 2021-04-07 15:46:10 -07:00
lib Remove dib-block-device console entrypoint 2020-11-09 16:43:19 +11:00
tests Switch from unittest2 compat methods to Python 3.x methods 2020-07-07 11:11:28 +08:00
__init__.py Bump hacking to 0.9.x series 2014-07-21 10:15:41 +02:00
disk_image_create.py Remove virtualenv activation 2020-06-11 16:49:15 +10:00
element_dependencies.py Uncap hacking 2020-02-24 10:34:46 +11:00
logging_config.py Add timestamp output filter 2017-06-16 15:58:50 +10:00
paths.py Move diskimage-image-create to an entry point 2016-11-02 05:12:11 +00:00
version.py Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00