Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1685223 - Can't boot on EFI from Boom boot entry: "blscfg.mod not found" error
Summary: Can't boot on EFI from Boom boot entry: "blscfg.mod not found" error
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: grub2
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Bootloader engineering team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-04 17:22 UTC by Mikel Olasagasti
Modified: 2019-03-26 12:25 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3958521 None None None 2019-03-04 17:22:50 UTC

Description Mikel Olasagasti 2019-03-04 17:22:50 UTC
Description of problem:

Boom is able to create snapshots, grub shows the Snapshot submenu, but fails when selected with the following message:

    error: file `/EFI/redhat/x86_64-efi/blscfg.mod' not found.
    error: can't find command `bls_import'.

Version-Release number of selected component (if applicable):

grub2-2.02-0.65.el7_4.2.x86_64	
lvm2-python-boom-0.9-14.el7_6.2.noarch

How reproducible:

Always


Steps to Reproduce:

1. Create a snapshot:
   lvcreate -L 20G -n root_snapshot -s rhel/root
2. Create a boom entry for the rollback:
   boom create --title "Root Snapshot" --rootlv rhel/root_snapshot
3. Reboot

Additional info:

Being an UEFI server, the following command has been used to generate the new grub conf:

grub2-mkconfig > /boot/efi/EFI/redhat/grub.cfg

File boot/efi/EFI/redhat/grub.cfg contains the following entry:

### BEGIN /etc/grub.d/42_boom ###
submenu "Snapshots" {
    insmod blscfg
    bls_import
}

Comment 4 Bryn M. Reeves 2019-03-04 17:56:09 UTC
It's possible that it's as simple as we are not currently building the BLS module for EFI images on RHEL7. The grub.macros file has:

%define do_efi_build_images()                                   \
GRUB_MODULES="  all_video boot btrfs cat chain configfile echo  \\\
                efifwsetup efinet ext2 fat font gfxmenu gfxterm \\\
                gzio halt hfsplus iso9660 jpeg loadenv loopback \\\
                lvm mdraid09 mdraid1x minicmd normal part_apple \\\
                part_msdos part_gpt password_pbkdf2 png reboot  \\\
                regexp search search_fs_uuid search_fs_file     \\\
                search_label serial sleep syslinuxcfg test tftp \\\
                video xfs"                                      \
GRUB_MODULES+=%{efi_modules}                                    \
%{expand:%%{mkimage %{1} %{2} %{3} %{4} %{5} %{6} %{7}}}        \
%{nil}


Which includes many of the loadable modules normally installed to /boot/grub2/i386-pc in a non-EFI build.

I'll try to make some test builds tomorrow to see if that's the case.

Comment 5 Bryn M. Reeves 2019-03-04 17:58:32 UTC
... and RHEL8 has:

%define do_efi_build_images()                                   \
GRUB_MODULES="  all_video boot blscfg btrfs                     \\\
                               ^^^^^^
                cat configfile                                  \\\
                echo efi_netfs efifwsetup efinet ext2           \\\
                fat font gfxmenu gfxterm gzio                   \\\
                halt hfsplus http iso9660 jpeg                  \\\
                loadenv loopback linux lvm lsefi                \\\
                mdraid09 mdraid1x minicmd net                   \\\
                normal part_apple part_msdos part_gpt           \\\
                password_pbkdf2 png                             \\\
                search search_fs_uuid search_fs_file            \\\
                search_label serial sleep syslinuxcfg test tftp \\\
                video xfs"      

I'll get a test build together tomorrow, confirm that it works as expected, and move this over to grub2 for the next release.

Comment 6 Bryn M. Reeves 2019-03-05 11:16:19 UTC
OK, I made some progress on this. With the change hinted at in comment #5, I can successfully build new Grub2 packages and install them to the EFI system.

We get a little further - the BLS module loads correctly, but now it can't find the loader/entries path due to a broken GRUB_BLS_CONFIG_PATH for the EFI build:

  error: file '/EFI/fedora/loader/entries' not found.

  Press any key to continue...

The RHEL8 branch has the correct value for this: '/EFI/redhatloader/entries', so I've tweaked the BLS patch for RHEL7 slightly to use this location and have another build running now.

This won't be the final word on this however: boom is also going to need some changes in order to correctly detect the different path to the loader directory (it might be possible to work around it by futzing paths in boom.conf, or by using command line or environment variable overrides, but it's not ideal and not something we want to dump on users).

Comment 7 Bryn M. Reeves 2019-03-05 11:21:25 UTC
With this 2nd change to fix GRUB_BLS_CONFIG_PATH, and relocating the /boot/loader/entries directory to /boot/efi/EFI/redhat/loader/entries, I'm not able to access the Snapshots sub-menu and to boot Boom boot entries on RHEL7 with EFI.

Comment 9 Javier Martinez Canillas 2019-03-05 18:21:40 UTC
Hello Bryn,

(In reply to Bryn M. Reeves from comment #6)
> OK, I made some progress on this. With the change hinted at in comment #5, I
> can successfully build new Grub2 packages and install them to the EFI system.
> 
> We get a little further - the BLS module loads correctly, but now it can't
> find the loader/entries path due to a broken GRUB_BLS_CONFIG_PATH for the
> EFI build:
> 
>   error: file '/EFI/fedora/loader/entries' not found.
> 
>   Press any key to continue...
> 
> The RHEL8 branch has the correct value for this:
> '/EFI/redhatloader/entries', so I've tweaked the BLS patch for RHEL7
> slightly to use this location and have another build running now.
> 
> This won't be the final word on this however: boom is also going to need
> some changes in order to correctly detect the different path to the loader
> directory (it might be possible to work around it by futzing paths in
> boom.conf, or by using command line or environment variable overrides, but
> it's not ideal and not something we want to dump on users).

For RHEL8 the same /boot/loader/entries path is used for both legacy BIOS and EFI. That is, the BLS snippets are not expected to be in the ESP but in /loader/entries in the boot partition (or /boot/loader/entries in the root partition if there's no boot partition).

So I'm not sure if is worth to make boom to support creating BLS snippets in the ESP, instead I think we should just make GRUB in RHEL7 to also use /boot/loader/entries in both cases.

Comment 10 Bryn M. Reeves 2019-03-06 09:16:59 UTC
> For RHEL8 the same /boot/loader/entries path is used for both legacy BIOS and EFI.

Even better. This makes life simpler for us, and I agree that having RHEL7 use this scheme too would be ideal - I was just trying to get what I found in RHEL7's packages to more-or-less work, right now it seems a little broken for the BLS/EFI case.

Comment 11 Bryn M. Reeves 2019-03-06 09:20:40 UTC
> right now it seems a little broken for the BLS/EFI case.

Specifically, it's missing the blscfg module in the EFI image, and uses a fedora path inside the ESP for loader/entries.

Comment 12 Javier Martinez Canillas 2019-03-06 09:28:27 UTC
(In reply to Bryn M. Reeves from comment #10)
> > For RHEL8 the same /boot/loader/entries path is used for both legacy BIOS and EFI.
> 
> Even better. This makes life simpler for us, and I agree that having RHEL7

Ok, lets change the component to grub2 then.

> use this scheme too would be ideal - I was just trying to get what I found
> in RHEL7's packages to more-or-less work, right now it seems a little broken
> for the BLS/EFI case.

Yes, agreed. I guess that's why the module was only available for legacy BIOS. So since is broken, wasn't available for EFI and we are using a different scheme for Fedora/ RHEL8 (that's already compatible with boom), I think that the best approach would be to just align RHEL7 to that as well.

Comment 13 Bryn M. Reeves 2019-03-06 09:30:46 UTC
Gotcha - that makes sense. I think with that approach there are no necessary changes in boom, we can ship the same packages on RHEL7/8. I'll move this over to grub2 now, and file a new bug if there do turn out to be any boom changes needed.

Comment 14 Mikel Olasagasti 2019-03-26 12:25:35 UTC
Provided testing packages from #8 to customer. Now they can see the snapshot entry but fails when selecting a snapshot to boot with the following error:

error: no server is specified.
error: you need to load the kernel first.

Press any key to continue...


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