Fresh install broke grub and bootloaders (and maybe partition tables)

Hi, I need help.

I just tried to install Fedora 31 on my laptop over my older Antergos installation (I am dual booting Windows as well). In Anaconda, I selected the old Antergos mount points and reformatted them for Fedora. This includes /home, /, /boot/efi, and swap. Now, my bootloaders are not working and I can’t boot into any menu or either operating system. From my BIOS, I try to load grub (still labeled antergos-grub) or Windows Boot Manager; the screen flashes and nothing happens. Selecting Linux Boot Manager tries to being me into Fedora I think, but it brings me to a tty that says I’m in emergency mode.

I can’t figure out what to do short of wiping my entire drive. I don’t know what I need to link, but I’ve included some files that I get while booted with a Live USB. I tried following this guide, but that didn’t fix anything.

$ efibootmgr -v
BootCurrent: 001B
Timeout: 0 seconds
BootOrder: 001B,0001,001D,001E,0005,0000,001A,0017,0018,0019,001C
Boot0000* Windows Boot Manager  HD(1,GPT,8f7ea8c0-5cdf-4dce-b5b3-0dfbe5446dd0,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...e................
Boot0001* antergos_grub HD(1,GPT,8f7ea8c0-5cdf-4dce-b5b3-0dfbe5446dd0,0x800,0x82000)/File(\EFI\antergos_grub\grubx64.efi)
Boot0005* Linux Boot Manager    HD(4,GPT,836b09fc-fe05-41f1-b782-0582517be0ec,0xa688000,0x100000)/File(\EFI\goofiboot\goofibootx64.efi)
Boot0010  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu     FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen      FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics    FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Startup Interrupt Menu        FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0015  Rescue and Recovery   FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0016  MEBx Hot Key  FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
Boot0017* USB CD        VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot0018* USB FDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0019* NVMe0 VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot001A* ATA HDD0      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot001B* USB HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot001C* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot001D  Other CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35406)
Boot001E  Other HDD     VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f606)
Boot001F* IDER BOOT CDROM       PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,1,0)
Boot0020* IDER BOOT Floppy      PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,0,0)
Boot0021* ATA HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0022* ATAPI CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
$ grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
 
### BEGIN /etc/grub.d/00_header ###
set pager=1
 
if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi
 
if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi
 
export menuentry_id_option
 
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi
 
function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
 
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}
 
if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  769722eb-8081-49c6-862d-6b6936a2ced4
else
  search --no-floppy --fs-uuid --set=root 769722eb-8081-49c6-862d-6b6936a2ced4
fi
    font="/usr/share/grub/unicode.pf2"
fi
 
if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###
 
### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi
### END /etc/grub.d/01_users ###
 
### BEGIN /etc/grub.d/08_fallback_counting ###
insmod increment
# Check if boot_counter exists and boot_success=0 to activate this behaviour.
if [ -n "${boot_counter}" -a "${boot_success}" = "0" ]; then
  # if countdown has ended, choose to boot rollback deployment,
  # i.e. default=1 on OSTree-based systems.
  if  [ "${boot_counter}" = "0" -o "${boot_counter}" = "-1" ]; then
    set default=1
    set boot_counter=-1
  # otherwise decrement boot_counter
  else
    decrement boot_counter
  fi
  save_env boot_counter
fi
### END /etc/grub.d/08_fallback_counting ###
 
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora 31 (KDE Plasma)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-769722eb-8081-49c6-862d-6b6936a2ced4' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  769722eb-8081-49c6-862d-6b6936a2ced4
        else
          search --no-floppy --fs-uuid --set=root 769722eb-8081-49c6-862d-6b6936a2ced4
        fi
        linux   /boot/vmlinuz-5.3.7-301.fc31.x86_64 root=UUID=769722eb-8081-49c6-862d-6b6936a2ced4 ro  
        initrd  /boot/initramfs-5.3.7-301.fc31.x86_64.img
}
submenu 'Advanced options for Fedora 31 (KDE Plasma)' $menuentry_id_option 'gnulinux-advanced-769722eb-8081-49c6-862d-6b6936a2ced4' {
        menuentry 'Fedora (5.3.7-301.fc31.x86_64) 31 (KDE Plasma)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-5.3.7-301.fc31.x86_64-advanced-769722eb-8081-49c6-862d-6b6936a2ced4' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  769722eb-8081-49c6-862d-6b6936a2ced4
                else
                  search --no-floppy --fs-uuid --set=root 769722eb-8081-49c6-862d-6b6936a2ced4
                fi
                linux   /boot/vmlinuz-5.3.7-301.fc31.x86_64 root=UUID=769722eb-8081-49c6-862d-6b6936a2ced4 ro  
                initrd  /boot/initramfs-5.3.7-301.fc31.x86_64.img
        }
        menuentry 'Fedora (5.3.7-301.fc31.x86_64) 31 (KDE Plasma) (recovery mode)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-5.3.7-301.fc31.x86_64-recovery-769722eb-8081-49c6-862d-6b6936a2ced4' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  769722eb-8081-49c6-862d-6b6936a2ced4
                else
                  search --no-floppy --fs-uuid --set=root 769722eb-8081-49c6-862d-6b6936a2ced4
                fi
                linux   /boot/vmlinuz-5.3.7-301.fc31.x86_64 root=UUID=769722eb-8081-49c6-862d-6b6936a2ced4 ro single
                initrd  /boot/initramfs-5.3.7-301.fc31.x86_64.img
        }
}
 
### END /etc/grub.d/10_linux ###
 
### BEGIN /etc/grub.d/10_reset_boot_success ###
insmod increment
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  set menu_hide_ok=1
else
  set menu_hide_ok=0
fi
# Reset boot_indeterminate after a successful boot, increment otherwise
if [ "${boot_success}" = "1" ] ; then
  set boot_indeterminate=0
else
  increment boot_indeterminate
fi
# Reset boot_success for current boot
set boot_success=0
save_env boot_success boot_indeterminate
### END /etc/grub.d/10_reset_boot_success ###
 
### BEGIN /etc/grub.d/12_menu_auto_hide ###
if [ x$feature_timeout_style = xy ] ; then
  if [ "${menu_show_once}" ]; then
    unset menu_show_once
    save_env menu_show_once
    set timeout_style=menu
    set timeout=60
  elif [ "${menu_auto_hide}" -a "${menu_hide_ok}" = "1" ]; then
    set orig_timeout_style=${timeout_style}
    set orig_timeout=${timeout}
    if [ "${fastboot}" = "1" ]; then
      # timeout_style=menu + timeout=0 avoids the countdown code keypress check
      set timeout_style=menu
      set timeout=0
    else
      set timeout_style=hidden
      set timeout=1
    fi
  fi
fi
### END /etc/grub.d/12_menu_auto_hide ###
 
### BEGIN /etc/grub.d/20_linux_xen ###
 
### END /etc/grub.d/20_linux_xen ###
 
### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###
 
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Fedora 31 (KDE Plasma) (on /dev/sda5)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-38477496-842d-4e28-80a8-ec7747076ee5' {
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  38477496-842d-4e28-80a8-ec7747076ee5
        else
          search --no-floppy --fs-uuid --set=root 38477496-842d-4e28-80a8-ec7747076ee5
        fi
        linux /boot/vmlinuz-0-rescue-f86ca3721d4f4e3886da6bd3574d9be5 root=/dev/sda5
        initrd /boot/initramfs-0-rescue-f86ca3721d4f4e3886da6bd3574d9be5.img
}
submenu 'Advanced options for Fedora 31 (KDE Plasma) (on /dev/sda5)' $menuentry_id_option 'osprober-gnulinux-advanced-38477496-842d-4e28-80a8-ec7747076ee5' {
        menuentry 'Fedora 31 (KDE Plasma) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-0-rescue-f86ca3721d4f4e3886da6bd3574d9be5--38477496-842d-4e28-80a8-ec7747076ee5' {
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt5'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  38477496-842d-4e28-80a8-ec7747076ee5
                else
                  search --no-floppy --fs-uuid --set=root 38477496-842d-4e28-80a8-ec7747076ee5
                fi
                linux /boot/vmlinuz-0-rescue-f86ca3721d4f4e3886da6bd3574d9be5 root=/dev/sda5
                initrd /boot/initramfs-0-rescue-f86ca3721d4f4e3886da6bd3574d9be5.img
        }
        menuentry 'Fedora 31 (KDE Plasma) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.3.7-301.fc31.x86_64--38477496-842d-4e28-80a8-ec7747076ee5' {
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt5'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  38477496-842d-4e28-80a8-ec7747076ee5
                else
                  search --no-floppy --fs-uuid --set=root 38477496-842d-4e28-80a8-ec7747076ee5
                fi
                linux /boot/vmlinuz-5.3.7-301.fc31.x86_64 root=/dev/sda5
                initrd /boot/initramfs-5.3.7-301.fc31.x86_64.img
        }
}
 
# Other OS found, undo autohiding of menu unless menu_auto_hide=2
if [ "${orig_timeout_style}" -a "${menu_auto_hide}" != "2" ]; then
  set timeout_style=${orig_timeout_style}
  set timeout=${orig_timeout}
fi
### END /etc/grub.d/30_os-prober ###
 
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
        fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###
 
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
 
### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

grub.cfg

$ fdisk -l
Disk /dev/sda: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: WDC  WDS250G2B0B
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 43C26263-B599-4E62-9ABA-7C43F831A5C2
 
Device         Start       End   Sectors  Size Type
/dev/sda1       2048    534527    532480  260M EFI System
/dev/sda2     534528    567295     32768   16M Microsoft reserved
/dev/sda3     567296 231241727 230674432  110G Microsoft basic data
/dev/sda4  231243776 232292351   1048576  512M EFI System
/dev/sda5  232292352 358117375 125825024   60G Linux filesystem
/dev/sda6  358117376 366505983   8388608    4G Linux swap
/dev/sda7  366505984 450392063  83886080   40G Linux filesystem
/dev/sda8  450392064 452440063   2048000 1000M Windows recovery environment
 
 
Disk /dev/sdb: 3.74 GiB, 4000317440 bytes, 7813120 sectors
Disk model: Cruzer          
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7aa014a1
 
Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *        0 3623039 3623040  1.7G  0 Empty
/dev/sdb2         172   21887   21716 10.6M ef EFI (FAT-12/16/32)
/dev/sdb3       21888   67407   45520 22.2M  0 Empty
 
 
Disk /dev/loop0: 1.64 GiB, 1743392768 bytes, 3405064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
 
Disk /dev/loop1: 6.36 GiB, 6817841152 bytes, 13316096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
 
Disk /dev/loop2: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
 
Disk /dev/mapper/live-rw: 6.36 GiB, 6817841152 bytes, 13316096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
 
Disk /dev/mapper/live-base: 6.36 GiB, 6817841152 bytes, 13316096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

In the last screenshots, there’s extra unallocated space in my drive. Before my Fedora installation process, I successfully increased the sizes of my Windows, home, and root partitions.

1 Like

Hi @deditionis welcome to the commuty

Check it (try restore the bootlader)

Bootloading with GRUB2 :: Fedora Docs

you have 2 ESP be careful to select the right one. I would like help you more but it was long time ago i had 2 OS (in my PC and i forgot a lot about it).

Regards.

1 Like

Hi, thanks for the help! I’ve since tried some other troubleshooting, ending up nowhere, as dictated by my post on r/fedora. I’ve reinstalled Fedora again, and chose standard partitions instead of my initial LVM, then tried to do what you linked.

At the step grub2-install /dev/sda, there was an error:

grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory

Hi,

What mode did you select to boot the USB UEFI or LEGACY ?

If you’re talking about the BIOS setting, then UEFI.

I am talking about it just to avoid confusion

Check the links in these post

Append:

Look the report bug (what was not really a bug) 1101352 – [UEFI] grub2-install grub2-install: error: modinfo.sh doesn't exist

I see here that I shouldn’t be using grub2-install. I’ve since done some more troubleshooting, and now I have a working Windows and Windows boot loader, as well as a freshly installed Fedora partitions. However, Fedora isn’t an option to select on efibootmgr, even though os-prober finds both Windows and Fedora, and the command sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg seems to have worked properly, as seen by the output

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.7-301.fc31.x86_64
Found initrd image: /boot/initramfs-5.3.7-301.fc31.x86_64.img
grub2-probe: error: cannot find a GRUB drive for /dev/sdb3.  Check your device.map.
Found Fedora 31 (KDE Plasma) on /dev/sda4
Found Windows Boot Manager on /dev/sda7@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done

I’m trying to now figure out why my computer refuses to install GRUB properly.

1 Like

Maybe it is because it is looking for grub in the path /dev/sdb3 What device does it be? In your first post you showed have a /dev/sdb model cruzer of 4 GB (maybe it was the a USB?) where the boot partition was there. You should check why is looking there and if you have 2 ESP on 2 disk.

Regards.

sdb is my flash drive; the partitions in sdb were created with Fedora Media Writer. Are you saying that grub is being installed into the flash drive and not onto sda?

My partitions look like this now.

Disk /dev/sda: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: WDC  WDS250G2B0B
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 43C26263-B599-4E62-9ABA-7C43F831A5C2

Device         Start       End   Sectors  Size Type
/dev/sda1    1161216 231835647 230674432  110G Microsoft basic data
/dev/sda2  231835648 233883647   2048000 1000M Windows recovery environment
/dev/sda3  233883648 235980799   2097152    1G Linux filesystem
/dev/sda4  235980800 361809919 125829120   60G Linux filesystem
/dev/sda5  445020160 453408767   8388608    4G Linux swap
/dev/sda6  361809920 435210239  73400320   35G Linux filesystem
/dev/sda7  443598848 444758015   1159168  566M EFI System
/dev/sda8  444758016 445020159    262144  128M Microsoft reserved

Partition table entries are not in disk order.


Disk /dev/sdb: 3.74 GiB, 4000317440 bytes, 7813120 sectors
Disk model: Cruzer          
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7aa014a1

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *        0 3623039 3623040  1.7G  0 Empty
/dev/sdb2         172   21887   21716 10.6M ef EFI (FAT-12/16/32)
/dev/sdb3       21888   67407   45520 22.2M  0 Empty

No but sometimes is better don’t paste information about your live use because sometimes persons like me forget to read all information and just stop in the detail of a fail. It is ok just was me.

If all get ok. after than you did regenerate grub did you see that output from efibootmgr to see than entries is actives and his order

Note than you can also select in your BIOS different files EFI to run windows or Fedora but don’t try if you don’t know or didn’t it before.

At least the report of your grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg looks like it did find the entries.

Can you post output of these commands to see a bit more, you can avoid post about your removable usb

efibootmgr -v
lsblk -f
sudo ls /boot/efi/EFI/fedora

Regards

I’m trying to find where my BIOS would met me select an EFI file to run, but I think I have to find out how to get to the EFI shell.

All of these outputs below are from a fresh reboot to the live USB.

efibootmgr -v

BootCurrent: 001B
Timeout: 0 seconds
BootOrder: 001B,001D,0000,001A,0017,0018,0019,001C,001E
Boot0000* Windows Boot Manager  HD(7,GPT,951b31a1-fa3f-437e-bb8e-c2891d5df26b,0x1a70c800,0x11b000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...e................
Boot0010  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu     FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen      FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics    FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Startup Interrupt Menu        FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0015  Rescue and Recovery   FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0016  MEBx Hot Key  FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
Boot0017* USB CD        VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot0018* USB FDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0019* NVMe0 VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot001A* ATA HDD0      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot001B* USB HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot001C* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot001D  Other CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35406)
Boot001E  Other HDD     VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f606)
Boot001F* IDER BOOT CDROM       PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,1,0)
Boot0020* IDER BOOT Floppy      PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,0,0)
Boot0021* ATA HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0022* ATAPI CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)

lsblk -f (only sda)

sda                                                                                                 
├─sda1      BitLocker                                                                               
├─sda2      ntfs         WinRE_DRV              804ACBDE4ACBCEDA                                    
├─sda3      ext4                                39d18fc6-6203-47a1-a016-5f4bb3705efc                
├─sda4      ext4                                697ff0db-7ce5-4e52-aac6-b14871d36670                
├─sda5      swap                                cf384bf8-5dc2-4407-9554-e12eb26ab5e0                [SWAP]
├─sda6      ext4                                8cadb9ce-f6b8-471e-b917-f87dfcbea523                
├─sda7      vfat         SYSTEM                 0055-7469                                           
└─sda8             

/boot/efi/EFI/fedora

BOOTIA32.CSV  fonts        gcdx64.efi    grubx64.efi  mmx64.efi  shimia32.efi         shimx64.efi
BOOTX64.CSV   gcdia32.efi  grubia32.efi  mmia32.efi   shim.efi   shimia32-fedora.efi  shimx64-fedora.efi

After running grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg, the directory looks like

BOOTIA32.CSV  gcdia32.efi  grubia32.efi  mmx64.efi     shimia32-fedora.efi
BOOTX64.CSV   gcdx64.efi   grubx64.efi   shim.efi      shimx64.efi
fonts         grub.cfg     mmia32.efi    shimia32.efi  shimx64-fedora.efi

efibootmgr has the same output before and after running grub2-mkconfig.

Maybe my UEFI is overriding my GRUB on a system reboot?

Output of

sudo ls /boot/efi/EFI/

/boot/efi/EFI/.

BOOT  fedora

And just in case: /boot/efi/EFI/BOOT

BOOTIA32.EFI  BOOTX64.EFI  fbia32.efi  fbx64.efi

If you did have only one ESP there would be also the entry of “Microsoft” but there is not.

do the command lsblk -f only show that information ? because i can see all it:

[jorge@f31 ~]$ lsblk -f
NAME         FSTYPE      LABEL      UUID                                   FSAVAIL FSUSE% MOUNTPOINT
sda                                                                                       
└─sda1       ext4        ARCHIVADOR 2f2f56a3-c161-4004-91b6-fb9f6c40022f    172,8G    16% /mnt/2f2f56a3-c161-4004-91b6-fb9f6c40022f
sdb                                                                                       
├─sdb1       vfat                   3632-7517                               579,2M     3% /boot/efi
├─sdb2       ext4                   eb889234-bb74-4cdc-a4f2-5e9e077b1e18      660M    25% /boot
└─sdb3       LVM2_member            Uc2mTp-7n2u-unVi-C2Mg-VOnC-g2WD-XLHcEx                
  ├─fedora_localhost--live-root
  │          ext4                   01f34d4b-847c-4035-9bea-5f141bcc5163     57,3G    11% /
  ├─fedora_localhost--live-swap
  │          swap                   faf45196-5083-4836-8851-6f9d37187f62                  [SWAP]
  └─fedora_localhost--live-home
             ext4                   cde5a47e-3909-4153-b6a2-bee2e83b5aaf    136,1G     4% /home
sr0                                                                                       

I only have fedora and it is that you can see that do show

jorge@f31 ~]$ lsblk
NAME                            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                               8:0    0 223,6G  0 disk 
└─sda1                            8:1    0 223,6G  0 part /mnt/2f2f56a3-c161-4004-91b6-fb9f6c40022f
sdb                               8:16   0 232,9G  0 disk 
├─sdb1                            8:17   0   600M  0 part /boot/efi
├─sdb2                            8:18   0     1G  0 part /boot
└─sdb3                            8:19   0 231,3G  0 part 
  ├─fedora_localhost--live-root 253:0    0    70G  0 lvm  /
  ├─fedora_localhost--live-swap 253:1    0   7,9G  0 lvm  [SWAP]
  └─fedora_localhost--live-home 253:2    0 153,4G  0 lvm  /home
sr0                              11:0    1  1024M  0 rom  
[jorge@f31 ~]$ sudo ls /boot/efi/EFI/
[sudo] lösenord för jorge: 
BOOT  fedora
[jorge@f31 ~]$ efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0005,0004,0001,0002,0003
Boot0000* Fedora	HD(1,GPT,f7918d34-a203-4775-a93d-26c66176c358,0x800,0x12c000)/File(\EFI\FEDORA\SHIMX64.EFI)
Boot0001* UEFI:CD/DVD Drive	BBS(129,,0x0)
Boot0002* UEFI:Removable Device	BBS(130,,0x0)
Boot0003* UEFI:Network Device	BBS(131,,0x0)
Boot0004* UEFI: Built-in EFI Shell 	VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0005* UEFI OS	HD(1,GPT,f7918d34-a203-4775-a93d-26c66176c358,0x800,0x12c000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
[jorge@f31 ~]$ LANG=C sudo fdisk -l
Disk /dev/sda: 223.58 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8F586EF5-EEA5-4B18-A9E1-60A8057112DF

Device     Start       End   Sectors   Size Type
/dev/sda1   2048 468860927 468858880 223.6G Linux filesystem


Disk /dev/sdb: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 860 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 87F4B839-68A3-894C-89B1-DF59CEC5998A

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048   1230847   1228800   600M EFI System
/dev/sdb2  1230848   3327999   2097152     1G Linux filesystem
/dev/sdb3  3328000 488396799 485068800 231.3G Linux LVM




Disk /dev/mapper/fedora_localhost--live-root: 70 GiB, 75161927680 bytes, 146800640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora_localhost--live-swap: 7.94 GiB, 8497659904 bytes, 16596992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora_localhost--live-home: 153.39 GiB, 164693540864 bytes, 321667072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

In this point i can not imagine how you did install. And to me the way more easy to install fedora trough windows would be:

1- Go to windows delete old linux partitions and create a new free volumen.
2- Install via ananconda with default settings in the new volumen than you did create.

The other option is wait for others mates than with all this information than you did provide can help you, because I am out of ideas right know.

Regards.

1 Like

I just wiped my entire disk, reinstalled Windows, did all of the Windows updates, shrunk the Windows partition, then installed Fedora on the shrunken space.

Now, there’s still no GRUB, there’s still no Fedora entry in my UEFI boot menu. When I select my drive, I get the screen

System BootOrder not found. Initializing defaults.
Creating boot entry "Boot(some number)" with label "Fedora" for file "\EFI\fedora\shimx64.efi"
Reset System

lsblk

NAME                            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                             7:0    0   1.6G  1 loop 
loop1                             7:1    0   6.4G  1 loop 
├─live-rw                       253:3    0   6.4G  0 dm   /
└─live-base                     253:4    0   6.4G  1 dm   
loop2                             7:2    0    32G  0 loop 
└─live-rw                       253:3    0   6.4G  0 dm   /
sda                               8:0    0 232.9G  0 disk 
├─sda1                            8:1    0   529M  0 part 
├─sda2                            8:2    0   100M  0 part 
├─sda3                            8:3    0    16M  0 part 
├─sda4                            8:4    0 112.3G  0 part 
├─sda5                            8:5    0     1G  0 part 
└─sda6                            8:6    0    99G  0 part 
  ├─fedora_localhost--live-swap 253:0    0     4G  0 lvm  [SWAP]
  ├─fedora_localhost--live-home 253:1    0    35G  0 lvm  
  └─fedora_localhost--live-root 253:2    0    60G  0 lvm  
sdb                               8:16   1   3.7G  0 disk 
├─sdb1                            8:17   1   1.7G  0 part /run/initramfs/live
├─sdb2                            8:18   1  10.6M  0 part 
└─sdb3                            8:19   1  22.2M  0 part

Okay, so manually adding the Fedora entry back into UEFI sort of works:

efibootmgr -c -d /dev/sda -p 2 -L Fedora -l \EFI\fedora\shimx64.efi

efibootmgr returns a list with Fedora as the first entry. However, when rebooting, it seems as if the boot order was not saved, and boots straight into Windows. The next time I boot back into my live USB and use efibootmgr , the Fedora entry was erased.

Looking elsewhere, this “solution” I found allows me to boot into Fedora, but not into Windows.

Can you post the output from fedora of this command to see the entries;

efibootmgr

to see if there is windows and this one is inactive,

If not is detected try run from fedora and how you did UEFI install the commands:

https://fedoraproject.org/wiki/GRUB_2#Updating_GRUB_2_configuration_on_UEFI_systems

https://fedoraproject.org/wiki/GRUB_2#Create_a_GRUB_2_configuration

sudo dnf reinstall grub2-efi shim

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

and after check the output of these commands.

Also please post the output of lsblk -f complete to see what partition do have the boot/efi.

I still don’t understand why you do post the output of the USB placed if you can run fedora from internal disk. Remove the USB and try run the commands above to avoid confusions and problems.

Regards.

efibootmgr

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 001D,0000,001A,001B,0017,0018,0019,001C,001E
Boot0000* Windows Boot Manager
Boot0010  Setup
Boot0011  Boot Menu
Boot0012  Diagnostic Splash Screen
Boot0013  Lenovo Diagnostics
Boot0014  Startup Interrupt Menu
Boot0015  Rescue and Recovery
Boot0016  MEBx Hot Key
Boot0017* USB CD
Boot0018* USB FDD
Boot0019* NVMe0
Boot001A* ATA HDD0
Boot001B* USB HDD
Boot001C* PCI LAN
Boot001D  Other CD
Boot001E  Other HDD
Boot001F* IDER BOOT CDROM
Boot0020* IDER BOOT Floppy
Boot0021* ATA HDD
Boot0022* ATAPI CD

I can run the same command I mentioned earlier to add a Fedora entry, but it disappears after reboot.

dnf reinstall grub2-efi shim runs correctly.

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done

lsblk -f

sda                                                                                                       
├─sda1                         ntfs        Recovery F200D44C00D41985                                      
├─sda2                         vfat                 3ED5-54E1                                49.5M    48% /boot/efi
├─sda3                                                                                                    
├─sda4                         ntfs                 8006D91E06D915CE                                      
├─sda5                         ext4                 7c0f1cda-ced9-4843-b439-e5fac9a2cd79    764.6M    15% /boot
└─sda6                         LVM2_member          W4h6FP-Vi7U-9WiO-A3Rm-MhE9-c07n-atAOW4                
  ├─fedora_localhost--live-swap
  │                            swap                 2becb17c-8bc3-4efe-8922-91c3cd4e3f91                  [SWAP]
  ├─fedora_localhost--live-home
  │                            ext4                 775534f3-ac08-4b26-ad4e-7d192da70533     32.2G     1% /home
  └─fedora_localhost--live-root
                               ext4                 e9397f05-eb3b-4a2e-a0d6-66874ad925eb     50.3G     9% /

Edit: If it wasn’t obvious, my system still does not have a UEFI entry for grub/fedora.

The only thing i can imagine (maybe is not the reason but maybe you should check it) do you have secure boot enable ? If you do disable it

After of boot fedora you can check it too

dmesg | grep -i secure\ boot

I have not more ideas :sweat_smile:

Regards

This is what that command outputs:

[    0.000000] secureboot: Secure boot disabled
[   12.986556] Bluetooth: hci0: Secure boot is enabled

What does that mean?

Edit: Secure boot is disabled in my BIOS settings.