Bug 1686470 - " grub2-mkconfig -o /boot/grub2/grub.cfg " does not find any fedora kernels
Summary: " grub2-mkconfig -o /boot/grub2/grub.cfg " does not find any fedora kernels
Keywords:
Status: CLOSED DUPLICATE of bug 1678445
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 30
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-07 14:06 UTC by Shlomi Fish
Modified: 2019-03-11 10:46 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-03-11 10:46:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Grub2 files as requested - my system is BIOS-based and i upgraded from f29 (692 bytes, application/x-7z-compressed)
2019-03-07 17:43 UTC, Shlomi Fish
no flags Details
grubenv (1.00 KB, text/plain)
2019-03-08 11:21 UTC, Shlomi Fish
no flags Details
grub.cfg (7.73 KB, text/plain)
2019-03-08 11:22 UTC, Shlomi Fish
no flags Details

Description Shlomi Fish 2019-03-07 14:06:32 UTC
Description of problem:

On my Acer Laptop with f30 x64:

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg 2>&1 | tee -a g.txt 
Generating grub configuration file ...
Found Windows 7 on /dev/sda1
done
[root@localhost ~]# less /boot/grub2/grub.cfg                                  

And none of the fedora kernels were found. I need to use 40_custom.

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


How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Javier Martinez Canillas 2019-03-07 14:10:32 UTC
That's expected, Fedora 30 now uses BootLoaderSpec snippets instead of having the menu entries in grub2.cfg:

https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault

You should be able to still use 40_custom

Comment 2 Shlomi Fish 2019-03-07 14:53:39 UTC
(In reply to Javier Martinez Canillas from comment #1)
> That's expected, Fedora 30 now uses BootLoaderSpec snippets instead of
> having the menu entries in grub2.cfg:
> 
> https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault
> 
> You should be able to still use 40_custom

Thanks for the reply. So how do I boot using these snippets? I do not see them in grub2 when booting.

Comment 3 Javier Martinez Canillas 2019-03-07 15:44:30 UTC
(In reply to Shlomi Fish from comment #2)
> (In reply to Javier Martinez Canillas from comment #1)
> > That's expected, Fedora 30 now uses BootLoaderSpec snippets instead of
> > having the menu entries in grub2.cfg:
> > 
> > https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault
> > 
> > You should be able to still use 40_custom
> 
> Thanks for the reply. So how do I boot using these snippets? I do not see
> them in grub2 when booting.

Did you install F30 or upgrade from F29? Also, is this an EFI or legacy BIOS install?

Can you please share the following:

1) Content of /etc/grub2-efi.cfg (or /etc/grub2.cfg for legacy BIOS install)
2) Content of /boot/grub2/grubenv
3) The files in /boot/loader/entries

Comment 4 Shlomi Fish 2019-03-07 17:43:49 UTC
Created attachment 1541916 [details]
Grub2 files as requested - my system is BIOS-based and i upgraded from f29

Comment 5 Javier Martinez Canillas 2019-03-08 10:26:12 UTC
(In reply to Shlomi Fish from comment #4)
> Created attachment 1541916 [details]

Thanks, but the grub2.cfg and grubenv are symlinks so you should share the actual file they point to. Could you please share your /boot/grub2/grub.cfg?

> Grub2 files as requested - my system is BIOS-based and i upgraded from f29

So then I wonder why your grubenv is a symlink, do you any grub2-efi-* packages installed?

Comment 6 Shlomi Fish 2019-03-08 11:20:07 UTC
(In reply to Javier Martinez Canillas from comment #5)
> (In reply to Shlomi Fish from comment #4)
> > Created attachment 1541916 [details]
> 
> Thanks, but the grub2.cfg and grubenv are symlinks so you should share the
> actual file they point to. Could you please share your /boot/grub2/grub.cfg?
> 
> > Grub2 files as requested - my system is BIOS-based and i upgraded from f29
> 
> So then I wonder why your grubenv is a symlink, do you any grub2-efi-*
> packages installed?

$ rpm -qa '*efi*'
efi-filesystem-4-2.fc30.noarch
grub2-efi-x64-2.02-71.fc30.x86_64
python3-olefile-0.46-2.fc30.noarch
efi-srpm-macros-4-2.fc30.noarch
efivar-libs-37-1.fc30.x86_64
efivar-37-1.fc30.x86_64
perl-String-RewritePrefix-0.007-12.fc30.noarch
efibootmgr-16-5.fc30.x86_64
grub2-tools-efi-2.02-71.fc30.x86_64

I'll attach the files

Comment 7 Shlomi Fish 2019-03-08 11:21:12 UTC
Created attachment 1542090 [details]
grubenv

Comment 8 Shlomi Fish 2019-03-08 11:22:15 UTC
Created attachment 1542091 [details]
grub.cfg

Comment 9 Javier Martinez Canillas 2019-03-08 11:25:23 UTC
(In reply to Shlomi Fish from comment #6)
> (In reply to Javier Martinez Canillas from comment #5)
> > (In reply to Shlomi Fish from comment #4)
> > > Created attachment 1541916 [details]
> > 
> > Thanks, but the grub2.cfg and grubenv are symlinks so you should share the
> > actual file they point to. Could you please share your /boot/grub2/grub.cfg?
> > 
> > > Grub2 files as requested - my system is BIOS-based and i upgraded from f29
> > 
> > So then I wonder why your grubenv is a symlink, do you any grub2-efi-*
> > packages installed?
> 
> $ rpm -qa '*efi*'
> efi-filesystem-4-2.fc30.noarch
> grub2-efi-x64-2.02-71.fc30.x86_64


Right, so you shouldn't have this package installed since you are doing a legacy BIOS install. In fact, installing will break your grubenv since it overwrites it with a broken symlink.

After removing the package you should create the grubenv again with "grub2-editenv create" and update the variables in grubenv again with "grub2-mkconfig -o /boot/grub2/grub.cfg"

Comment 10 Javier Martinez Canillas 2019-03-08 11:31:41 UTC
All your files looks correct. So you say that GRUB doesn't show you the menu entries that are defined in /boot/loader/entries/*.conf but does show you the ones you have defined in 40_custom?

Comment 11 Javier Martinez Canillas 2019-03-11 10:46:16 UTC

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


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