Bug 2092116

Summary: Software Raid on a BiosBoot system using GPT partitioning scheme doesn't work
Product: [Fedora] Fedora Reporter: Stephen Gallagher <sgallagh>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 37CC: anaconda-maint-list, awilliam, bugzilla, jonathan, kellin, pboy, robatino, vanmeeuwen+fedora, vponcova, w
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-22 16:21:48 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:
Bug Depends On:    
Bug Blocks: 2009539    

Description Stephen Gallagher 2022-05-31 20:19:08 UTC
(Copied from https://pagure.io/fedora-server/issue/87 )

When we want to make GPT the default partitioning, we must ensure the installability of a software raid as well. At the same time, we must continue to maintain the availability of a software raid even with MBR (DOS) partitioning. 

**Testcase 1: GPT**

1. Provide a BiosBoot system with 2 connected hard disks
2. Delete any existing partition table on all hard disks by overwriting the  first mbs
[...]# dd if=/dev/zero of=/dev/sd[a|b|c]  status=progress 
3. Boot the installation disk, select the first installation option (w/o media check) and press <tab> to access the kernel command line. At the end add "inst.gpt" (w/o the ") and press <enter> to start the installation
4. Select "Installation Destination", tick all (at least 2) harddisks, and custom storage configuration. Select "DONE"
5. The partitioning form opens. Tick the "+" sign and a form "Add a new Mount Point" opens
      1. select /boot as the mount point
      2. enter 1 Gib as size
      3. Tick "Add Mount Point"
  A new mount point is created on sda1 
6. The "Device Type" is shown as "Standard Partition"
      1. Modify to RAID and select appropriate RAID level (e.g. 1)
      2. update settings
Device on the left column changes from sda1 to "boot" (beyond "New Fedora x installation")
7. Use the "+" sign to add another Moint Point
      1. select / as the mount point
      2. enter 15 Gib as size (the same as a default installation would choose)
      3. Tick "Add Mount Point"
You find a new moint point of device type LVM, a VG fedoara_fedora of the exact size you entered above
8. Modify Volume Group
      1. Select Raid level RAID1 (or according to your number of disks)
      2. leave size policy on "Automatic"
      3. update the choices
On the left side you find a device "fedora_fedora:root
9. select DONE
       1. You get a message you need a special partition biosboot on a GPT system
       2. Close gets you back to configuration screen
       3. use the "+" sign as above to add a partition of type biosboot and size of 1 MiB ad advised in the message
       4. Anaconda creates a biosboot as the first partition (sda1)
       5. try to change Device Type to RIAD, it is always reset to sda1 as soon as you select " update settings".
10. select DONE again, you get a list of partitioning tasks the system is about to perform, sda with 3 partitions, all other with 2
11. Begin installation

*Expected result*
1. Anaconda should install a biosboot partition on all disks included in the boot raid.
2. The system should continue to boot with any one of the disks broken (removed), specifically w/o the original start disk (sda).



**Testcase 2: MBR**

1. Provide a BiosBoot system with 2 connected hard disks
2. Ensure every disk contains a (empty) MBR (DOS) partition label
3. Boot the installation disk, select the first installation option (w/o media check)  to start the installation
4. Select "Installation Destination", tick all (at least 2) harddisks, and custom storage configuration. Select "DONE"
5. The partitioning form opens. Tick the "+" sign and a form "Add a new Moint Point" opens
       1. select /boot as the mount point
       2. enter 1 GiB as size
       3. Tick "Add Mount Point"
A new mount point is created on sda1 
6. The "Device Type" is shown as "Standard Partition"
       1. Modify to RAID and select appropriate RAID level (e.g. 1)
       2. update settings
Device on the left column changes from sda1 to "boot" (beyond "New Fedora x installation")
7. Use the "+" sign to add another Moint Point
      1. select / as the mount point
      2. enter 15 Gib as size (the same as a default installation would choose)
      3. Tick "Add Mount Point"
You find a new moint point of device type LVM, a VG fedoara_fedora of the exact size you entered above
8. Modify Volume Group
     1. Select Raid level RAID1 (or according to your number of disks)
     2. leave size policy on "Automatic"
     3. update the choices
On the left side you find a device "fedora_fedora:root
9. select DONE
you get a list of partitioning tasks the system is about to perform
10. Begin installation

*Expected result*
1. Anaconda should install a MBR record on all disks included in the boot raid (check log file).
2. The system should continue to boot with any one of the disks broken (removed), specifically w/o the original start disk (sda).

Comment 1 Fedora Blocker Bugs Application 2022-05-31 20:22:14 UTC
Proposed as a Blocker for 37-final by Fedora user sgallagh using the blocker tracking app because:

 Due to the [GPTforBIOSbyDefault](https://fedoraproject.org/wiki/Changes/GPTforBIOSbyDefault) Change, this issue will need to be addressed prior to Final or it will violate the Final criterion "The installer must allow the user to choose which disk the system bootloader will be installed to, and to choose not to install one at all."

Comment 2 Peter Boy 2022-06-03 21:59:18 UTC
Regarding Testcase 1 GPT the current result is:

Anaconda shows a message: 

"The following error occurred while installing the bootloader. The system will 
not be bootable. Would you like to ignore this and continue with installation?

boot loader install failed"


If you continue anyway, the reboot after installation ends up with:
"Error: No boot disk has been detected or the disk has failed."

Comment 3 Chris Murphy 2022-06-06 15:24:27 UTC
Looks like this is a dup of bug 2088113.

Comment 4 Ben Cotton 2022-08-09 13:17:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 5 Adam Williamson 2022-08-22 16:21:48 UTC

*** This bug has been marked as a duplicate of bug 2088113 ***