Bug 2054606 - Bootloader configuration has failed: Failed to find a suitable stage1 device
Summary: Bootloader configuration has failed: Failed to find a suitable stage1 device
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: anaconda
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 2008126
TreeView+ depends on / blocked
 
Reported: 2022-02-15 10:21 UTC by Jan Stodola
Modified: 2023-08-15 07:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-15 07:28:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
custom partition config, showing efi partition (526.83 KB, image/jpeg)
2022-05-06 00:28 UTC, Anthony Symons
no flags Details
error in anaconda (1000.65 KB, image/jpeg)
2022-05-06 00:28 UTC, Anthony Symons
no flags Details
error blocking install outside of disk paritioning (601.98 KB, image/jpeg)
2022-05-06 00:29 UTC, Anthony Symons
no flags Details
EFI error reported (251.54 KB, image/png)
2023-01-26 10:22 UTC, minlxs
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-112317 0 None None None 2022-02-15 10:37:15 UTC

Description Jan Stodola 2022-02-15 10:21:20 UTC
Description of problem:
Installation with a custom partitioning in kickstart fails with the following error:

Starting automated install.............Saving storage configuration... 
...Failed to save boot loader configuration 
Failed to find a suitable stage1 device


Error in storage.log:
...
DEBUG:anaconda.modules.storage.bootloader.bootloader:Drive is set to 'sda'.
DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type disk
ERROR:anaconda.modules.storage.partitioning.base_partitioning:Bootloader configuration has failed: Failed to find a suitable stage1 device
INFO:anaconda.threading:Thread Failed: AnaTaskThread-CustomPartitioningTask-1 (140735860830576)
ERROR:anaconda.modules.common.task.task:Thread AnaTaskThread-CustomPartitioningTask-1 has failed: Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/partitioning/base_partitioning.py", line 54, in run
    self._run(self._storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/partitioning/automatic/noninteractive_partitioning.py", line 43, in _run
    self._setup_bootloader(storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/partitioning/automatic/noninteractive_partitioning.py", line 132, in _setup_bootloader
    setup_bootloader(storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/bootloader/execution.py", line 44, in setup_bootloader
    executor.execute(storage=storage, dry_run=dry_run)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/bootloader/execution.py", line 82, in execute
    storage.bootloader.set_stage1_device(storage.devices)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/bootloader/base.py", line 597, in set_stage1_device
    raise BootLoaderError(msg)
pyanaconda.modules.storage.bootloader.base.BootLoaderError: Failed to find a suitable stage1 device


Partitioning defined in the kickstart file:

zerombr
clearpart --all --initlabel
bootloader --location=mbr --leavebootorder
reqpart
part /boot --size 1000
part pv.01 --grow --size 10000
volgroup vg pv.01
logvol /  --grow --size=8000 --name=root --vgname=vg
logvol swap  --fstype=swap --recommended --name=swap --vgname=vg


So far I've seen this problem on one ppc64le system.
When running a kickstart or manual installation using anaconda autopart, the installation is successful on the same system.

Version-Release number of selected component (if applicable):
RHEL-8.6.0-20220213.3
anaconda-33.16.6.5-1.el8
python3-blivet-3.4.0-9.el8

How reproducible:
Always with the provided kickstart file on a specific system.

Steps to Reproduce:
1. Run a kickstart installation using the provided kickstart commands.

Actual results:
Installation fails, the installer is unable to find a suitable stage1 device.

Expected results:
Successful installation.

Comment 3 Jan Stodola 2022-02-15 11:54:09 UTC
Also reproducible on rhel-9, bug 2054636.

Comment 4 Anthony Symons 2022-05-06 00:28:00 UTC
Created attachment 1877455 [details]
custom partition config, showing efi partition

Comment 5 Anthony Symons 2022-05-06 00:28:44 UTC
Created attachment 1877456 [details]
error in anaconda

Comment 6 Anthony Symons 2022-05-06 00:29:25 UTC
Created attachment 1877457 [details]
error blocking install outside of disk paritioning

Comment 7 Anthony Symons 2022-05-06 00:35:30 UTC
This bug is also affecting anaconda installs on a system (macbook) with EFI dual boot on x86_64. Custom partitioning must be used because the EFI partition is shared, but the error is hit stating that the efi system partion cant be of type EFI. I think there is a logic error where the correct format is listed as the first problem. In my case the partition is vfat, and anaconda classifies it as type efi (as it is). I am attempting to mount it on /boot/efi which is a valid path.

May 05 19:56:10 localhost.localdomain anaconda[3292]: anaconda: ui.gui.spokes.custom_storage: Clicked on the info bar: Failed to find a suitable stage1 device: EFI System Partition cannot be of type efi.; EFI System Partition cannot be of type hfs+.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type hfs+.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type xfs.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type lvmpv. ((<AnacondaWidgets.SpokeWindow object at 0x7f7a0cc07510 (AnacondaSpokeWindow at 0x55dbe77cbd70)>,))
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type file
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(/LiveOS/rootfs.img) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type file
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(/overlay (deleted)) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type file
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(/run/initramfs/live/LiveOS/squashfs.img) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type lvmvg
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(almalinux) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type lvmlv
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(almalinux-root) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type lvmlv
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(almalinux-swap) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type dm
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(live-base) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type dm
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(live-rw) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type loop
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(loop0) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type loop
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(loop1) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type loop
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(loop2) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type disk
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda1) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda1) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda2) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda2) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda3) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda3) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda4) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda4) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda5) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda5) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type disk
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sdb) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type disk
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sdc) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.execution:No usable drive with a valid stage1 was found.
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type lvmvg
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(almalinux) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type lvmlv
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(almalinux-root) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type lvmlv
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(almalinux-swap) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:stage1 device cannot be of type disk
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda1) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda1) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda2) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda2) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda3) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda3) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda4) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda4) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda5) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: DEBUG:anaconda.modules.storage.bootloader.efi:MacEFIGRUB.is_valid_stage1_device(sda5) returning False
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: ERROR:anaconda.modules.storage.partitioning.base_partitioning:Bootloader configuration has failed: Failed to find a suitable stage1 device: EFI System Partition cannot be of type efi.; EFI System Partition cannot be of type hfs+.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type hfs+.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type xfs.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type lvmpv.
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]:     storage.bootloader.set_stage1_device(storage.devices)
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]:   File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/bootloader/base.py", line 597, in set_stage1_device
May 05 19:59:15 localhost.localdomain org.fedoraproject.Anaconda.Modules.Storage[3300]: pyanaconda.modules.storage.bootloader.base.BootLoaderError: Failed to find a suitable stage1 device: EFI System Partition cannot be of type efi.; EFI System Partition cannot be of type hfs+.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type hfs+.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type xfs.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type lvmpv.


To show the filesystem type only I have temporarily mounted it to /mnt/efi and taken a look.

[root@localhost mnt]# mount |grep efi
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
[root@localhost mnt]# mount /dev/sda1 /mnt/efi/
[root@localhost mnt]# ls /mnt/efi/EFI
APPLE  Boot  refind  tools
[root@localhost mnt]# umount /mnt/efi

Comment 8 Anthony Symons 2022-05-06 00:40:28 UTC
[root@localhost mnt]# mount /dev/sda1 /mnt/efi/
[root@localhost mnt]# mount |grep efi
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /mnt/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
[root@localhost mnt]# ls /mnt/efi/EFI
APPLE  Boot  refind  tools
[root@localhost mnt]# umount /mnt/efi

Comment 9 Anthony Symons 2022-05-06 00:55:48 UTC
Just adding that I noticed after posting this that I need to click reformat on the former partitions and re-specify their mount paths so that anaconda knows they're for a new install. Once this was done, and all partitions were listed under the 'new install' category, the same error persisted.

Comment 10 Jan Stodola 2022-05-06 13:38:27 UTC
Hello Anthony, the problem you descried is probably a different issue than the one originally reported. Could you please create a new bug for your issue and also attach the installer logs? You can find them as /tmp/*log files in the installation environment. Thanks.

Comment 12 minlxs 2023-01-26 10:21:22 UTC
Facing this issue in RHEL 9.1 with anaconda 34.25.1.14-1.el9 when building UEFI systems and GRUB2 UEFI in Satellite:
Section of the partition table:

zerombr
clearpart --all --initlabel
<% if @host.pxe_loader.include?('UEFI') -%>

  part /boot/efi --fstype="efi" --ondisk=<%= disk_sys %> --size=200 --fsoptions="umask=0077,shortname=efi"
  
  <%- if (@host.operatingsystem.family == 'Redhat' && @host.operatingsystem.major.to_i >= 7 ) -%>
    part /boot --fstype="<%= fstype %>" --ondisk=<%= disk_sys %> --size=1024
  <% else -%>
    part /boot --fstype="ext4" --ondisk=<%= disk_sys %> --size=1024
  <% end -%>

  part pv.01 --fstype="lvmpv" --ondisk=<%= disk_sys %> --size=1024 --grow
  part pv.02 --fstype="lvmpv" --ondisk=<%= disk_app %> --size=1024 --grow

  volgroup <%= vol_sys_name %> --pesize=4096 pv.01
  volgroup <%= vol_app_name %> --pesize=4096 pv.02


Error:
Failed to save boot loader configuration
Failed to find a suitable stage1 device: EFI System Partition cannot be of type xfs.; EFI System Partition must be mounted on one of /boot/efi.; EFI System Partition cannot be of type lvmpv

Comment 13 minlxs 2023-01-26 10:22:44 UTC
Created attachment 1940556 [details]
EFI error reported

Comment 14 Jan Stodola 2023-01-26 11:54:03 UTC
minlxs, comments 12/13 look like a different problem to me. Since this is a RHEL-8 bug, could you please open a new bug against RHEL-9 and attach the generated kickstart file and the installer log files from /tmp?
Thank you.

Comment 16 RHEL Program Management 2023-08-15 07:28:26 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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