RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2022805 - Unify the default partitioning scheme used by all non-EDGE RHEL-9 images
Summary: Unify the default partitioning scheme used by all non-EDGE RHEL-9 images
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: osbuild-composer
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Tomáš Hozza
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-12 16:02 UTC by Tomáš Hozza
Modified: 2022-05-17 13:37 UTC (History)
8 users (show)

Fixed In Version: osbuild-composer-42-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 13:30:01 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-102635 0 None None None 2021-11-12 16:04:25 UTC
Red Hat Product Errata RHBA-2022:2522 0 None None None 2022-05-17 13:30:28 UTC

Description Tomáš Hozza 2021-11-12 16:02:24 UTC
Description of problem:
During the work on porting the official RHEL-8.5 and 9.0 EC2 image definitions from kickstarts to Image Builder, it has been determined that the default partitioning scheme used by EC2 images is different compared to what has been previously used by Image Builder for all images, including EC2 images.

The EC2 image definitions were ported as they were defined in the respective kickstarts to not introduce any regressions (especially on RHEL-8). As a result, Image Builder now uses a different default partitioning scheme for EC2 RHEL images and any other types of RHEL images (for ones that use partitions).

This bug requests unification of the default partitioning scheme for all RHEL images supported by osbuild-composer on all architectures. This would affect mainly the x86_64 and aarch64 architectures and the RHEL KVM guest image and RHEL EC2 images.


The current state:
The default partitioning scheme used by RHEL KVM Guest image:
 - In general, the default partitioning scheme does not use a separate /boot partition on any of the supported architectures.
 - x86_64 architecture
   - defined in Image Builder as https://github.com/osbuild/osbuild-composer/blob/117886a75fdf2cb00ae66047792181d59818d266/internal/distro/rhel90beta/partition_tables.go#L9-L45
   - Uses GPT.
   - Uses hybrid partitioning scheme (BIOS + UEFI) without a separate /boot partition.
 - aarch64 architecture
   - defined in Image Builder as https://github.com/osbuild/osbuild-composer/blob/117886a75fdf2cb00ae66047792181d59818d266/internal/distro/rhel90beta/partition_tables.go#L46-L76
   - Uses GPT.
   - Uses UEFI partitioning scheme without a separate /boot partition.

The default partitioning scheme used by RHEL EC2 images:
 - x86_64 architecture
   - defined in Image Builder as https://github.com/osbuild/osbuild-composer/blob/117886a75fdf2cb00ae66047792181d59818d266/internal/distro/rhel90beta/partition_tables.go#L116-L139
   - Uses GPT.
   - Uses legacy (BIOS) partitioning scheme without a separate /boot partition.
 - aarch64 architecture
   - defined in Image Builder as https://github.com/osbuild/osbuild-composer/blob/117886a75fdf2cb00ae66047792181d59818d266/internal/distro/rhel90beta/partition_tables.go#L140-L182
   - Uses GPT.
   - Uses UEFI partitioning scheme with a separate /boot partition.


Proposed change:
1. Make the default partitioning scheme on all architectures for all images to use a separate /boot partition.
   - This would affect the RHEL KVM guest image.
   - This would affect the RHEL EC2 x86_64 images (the base EC2, EC2-HA, and EC2-SAP).
   - Having the separate /boot would be useful going forward once Image Builder would allow users to customize partitioning while using LVM.
2. Use a hybrid partitioning scheme (UEFI + BIOS) on all x86_64 EC2 images.
   - This would make the partitioning scheme consistent with what is being used for the RHEL KVM guest image as well as with that Image Builder uses for Azure and VMWare images.


Additional information:
 - x86_64 EC2 images produced by Image Builder with a hybrid partitioning scheme before RHEL-8.5 worked just fine in AWS. AWS documentation states that most Intel-based instances can run both UEFI and Legacy BIOS (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html).
 - A separate /boot partition is needed in case the root partition is encrypted or uses LVM.

Comment 1 Tomáš Hozza 2021-11-16 12:30:31 UTC
After a discussion within the Image Builder team, it seems impractical to have only one default partitioning scheme. My original goal was to get rid of the separate default partitioning scheme used by EC2 images, especially since the x86 image used only legacy BIOS Boot partition. We determined that EDGE images may have a special requirements, therefore we agreed to unify the default partitioning scheme only for non-EDGE images.

The sizes used for relevant partitions are currently 

- /boot/efi
  - guest image - 100 MB
  - EC2 image - 200 MB
- /boot
  - guest image - N/A
  - EC2 image - 500 MB


The RHEL-8 documentation (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/partitioning-reference_installing-rhel-as-an-experienced-user) suggests 200 MB for /boot/efi and 1TB for /boot. There is no such documentation for RHEL-9.

The proposal that we agreed on is to use:
- /boot/efi - 200 MB
- /boot - 500 MB

Comment 2 Tomáš Hozza 2021-11-24 12:34:35 UTC
Draft PR submitted in the upstream - https://github.com/osbuild/osbuild-composer/pull/2019

Comment 8 errata-xmlrpc 2022-05-17 13:30:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: osbuild-composer), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2522


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