Bug 1942081 - Twice search --fs-uuid [UUID] in grub.cfg
Summary: Twice search --fs-uuid [UUID] in grub.cfg
Keywords:
Status: CLOSED DUPLICATE of bug 1940524
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 34
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-23 15:46 UTC by dzug.koeln-muenchen
Modified: 2021-03-23 16:21 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-03-23 16:21:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description dzug.koeln-muenchen 2021-03-23 15:46:31 UTC
Description of problem:
The grub2-mkconfig script, particular the 10_linux helper, generates two lines with `search --fs-uuid --set=root [UUID]`.

Snippet of generated grub.cfg (commented):
```
### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 65b145b1-1906-4b7a-b80d-d73945995a3c # actual root partition, contains /boot
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root E34E-23EE # EFI system partition, remove this line to solve the issue

# many comments

if [ -z "${kernelopts}" ]; then
  set kernelopts="root=UUID=65b145b1-1906-4b7a-b80d-d73945995a3c ro  "
fi

insmod blscfg
blscfg
### END /etc/grub.d/10_linux ###
```

This error prevents the blscfg module from loading the menu entries. The system is only bootable via GRUB CLI.

Version-Release number of selected component (if applicable):
grub2-common-2.06~rc1-1.fc34.noarch
grub2-tools-minimal-2.06~rc1-1.fc34.x86_64
grub2-tools-2.06~rc1-1.fc34.x86_64
grub2-pc-modules-2.06~rc1-1.fc34.noarch
grub2-pc-2.06~rc1-1.fc34.x86_64
grub2-efi-ia32-2.06~rc1-1.fc34.x86_64
grub2-tools-extra-2.06~rc1-1.fc34.x86_64
grub2-efi-ia32-cdboot-2.06~rc1-1.fc34.x86_64
grub2-efi-x64-cdboot-2.06~rc1-1.fc34.x86_64
grub2-efi-x64-modules-2.06~rc1-1.fc34.noarch
grub2-tools-efi-2.06~rc1-1.fc34.x86_64
grub2-efi-x64-2.06~rc1-1.fc34.x86_64

How reproducible:
Simply install or upgrade, or run `grub2-mkconfig`

Actual results:
No Linux menu entries in GRUB

Expected results:
Normal menu entries

Additional info:
/etc/default/grub:
```
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="resume=UUID=88514c41-3b12-4e82-ad2f-6abf00da67f9 rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
```

Comment 1 Javier Martinez Canillas 2021-03-23 16:21:09 UTC

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


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