FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2018
    Location
    Chicago
    Posts
    3

    [Solved] F28/Win10 Dual boot EFI:grub wiped out (overwritten?) - can't boot Fedora

    I have been working on an install of F28 along win10 on my daughter's new laptop. I used the live USB, selecting the existing /dev/sda1 EFI partition to mount as /boot/efi. Then installed Fedora root (/) to a new EXT4 partition, /dev/sda5.

    Everything was working OK until my daughter took it in for the first day of summer school. Apparently she was working in Windows and someone (the teacher) was helping her log in to a website and hit the "power" button... which was setup to shut down the computer in Windows. As she explains it, the screen went blank and she apparently reacted by repeatedly hitting the power button until Windows started back up. Since Windows uses a tally of "failed power-up's" to launch recovery, my deduction is that she either triggered Windows "recovery" process that mucked up things, or windows update was triggered and then interrupted leaving a corrupted system and also leading to Windows recovery doing it's "magic" to zonk Fedora.

    Anyway, the machine came home and I went to reboot it into F28 but there was no grub menu. Holding down 'esc' to get the 'Starup Overide" menu from the EFI-BIOS still showed "Fedora" but selecting it just caused the machine to dump into the EFI-BIOS menus.

    I launched Fedora from a live USB and inspected /dev/sda5 and all Fedora's files appears to still be there. However the 'Fedora' folder on the EFI partition doesn't seem to have any -----.efi files.

    I attempted to solve this using a slightly modified formula of one for rebuilding grub I found on the Internet (I don't know much sys admin stuff, but I can usually fumble along from breadcrumbs found online):

    Code:
    su
    mount /dev/sda5 /mnt
    mount /dev/sda1 /mnt/boot/efi
    mount --bind /dev /mnt/dev
    mount --bind /proc /mnt/proc
    mount --bind /sys /mnt/sys
    mount -o bind /run /mnt/run
    
    cp /etc/resolv.conf /mnt/etc/resolv.conf    #without this DNF wouldn't run
    
    chroot /mnt
    
    dnf reinstall grub2-efi grub2-efi-modules shim    #
    grub2-mkconfig -o /efi/EFI/fedora/grub.cfg
    
    exit
    reboot
    https://forums.fedoraforum.org/showt...n-I-restore-it
    https://forums.fedoraforum.org/showt...ion-Live-media

    Got through that finally with only some error about /bin/bash after the chroot part, but as far as I could tell /bin/bash was fine. Dnf reinstalled grub, mkconfig ran without any errors, but there was no change in the startup behavior.

    One thread offered an alternative to grub2-mkconfig, instead calling for grub2-install /dev/sda,
    https://wiki.gentoo.org/wiki/GRUB2, but another page said not to do that with UEFI, https://ask.fedoraproject.org/en/que...rub2-efi-boot/

    I found another similar approach posted here that attempted to solve through WIndows, but I was unable able to follow what was going on there. https://forums.fedoraforum.org/showt...n-I-restore-it I tried using some {bootcfg} type command in the Windows terminal run as Admin, but it did nothing as far as I could tell.

    After a ton of reading and all that effort, I am still stuck with a machine that only boots Win10. Interestingly the menu option for Fedora is still detected by the BIOS "startup sequence override" screens, it just doesn't do anything to try to edit them in the BIOS. I have tried directing it to every ----.efi file I could find under any of the /boot/efi directories. Like I said, the /boot/efi/Fedora directory is empty.

    I am hoping that:
    (1) someone can illuminate me on whether Windows 10 is known to kill Fedora's Grub files like this without any particular warning like this, and if my theory about it being due to the behind-the-scenes way that WIndows Update superstitiously inserts its process into shutdown / restart cycles...
    and
    (2) perhaps there is something that stands out that I missed that would make this process work? Or a different approach to fixing it using Fedora -- not Windows.

    Thanks in advance for any input/suggestions!

    *** UPDATE ** I broke down and restored my Clonezilla backup image, but I think this would have worked if I had used grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg ***
    Last edited by gde061; 15th June 2018 at 12:57 PM.

  2. #2
    Join Date
    Aug 2007
    Posts
    203

    Re: F28 / Win10 Dual boot EFI: grub wiped out (overwritten?) -- can't boot to Fedora

    There may be an extra step you have to do. Did you look at the efi boot variables stored on your MB to see which OS is booted first ?

    sudo efibootmgr -v

    If Windows is still first then you need to use efibootmgr to change the order. You should do this after the chroot before rebooting so it would reboot into grub.

  3. #3
    Join Date
    Jun 2018
    Location
    Chicago
    Posts
    3

    Re: F28 / Win10 Dual boot EFI: grub wiped out (overwritten?) -- can't boot to Fedora

    Quote Originally Posted by amiga
    There may be an extra step you have to do. Did you look at the efi boot variables stored on your MB to see which OS is booted first ?

    sudo efibootmgr -v

    If Windows is still first then you need to use efibootmgr to change the order. You should do this after the chroot before rebooting so it would reboot into grub.
    I had not checked that... the order does have Windows first. However the interesting thing is that on the sda1 partition where the entries for fedora point, where there should be .efi files, there was nothing. Taking a closer look, it appears when I rebuilt grub with mkconfig I took the command directly from a guide where the stuff was in the /EFI directory and not /boot/EFI. Because of how I mapped sda1 in the second step, it didn't work right.

    However I only noticed that after looking at the paths from efibootmgr's output. I went ahead and redid the boot order with efibootmgr using this guide: https://www.linuxbabe.com/command-li...otmgr-examples

    However, as of last night I had already broke down and restored an image I had made using Clonezilla. But the suggestion helped me understand what was probably going on, so thanks!

    I'm marking as solved, even though I'm not 100% sure but it's working as of this morning.

  4. #4
    Join Date
    Jun 2018
    Location
    Chicago
    Posts
    3

    Re: F28 / Win10 Dual boot EFI: grub wiped out (overwritten?) -- can't boot to Fedora

    Thanks, the order did indeed have Windows 1st. I followed this guide to reorder it. However I had already given up on sorting it out properly and took the easy out of restoring my backup image, so I'm not sure if it would have solved the problem or not.

    https://www.linuxbabe.com/command-li...otmgr-examples

Similar Threads

  1. Dual Boot F27 Win10 Boot/EFI Incomplete
    By jbkt23 in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 19th March 2018, 03:25 AM
  2. Yoga 900 Dual Boot Fedora23+Win10
    By nicnac in forum Hardware & Laptops
    Replies: 4
    Last Post: 22nd December 2016, 09:36 PM
  3. [SOLVED]
    Brand new laptop / F25 install / Dual boot Win10 / Anaconda resize / Failure
    By slapshotct in forum Installation, Upgrades and Live Media
    Replies: 12
    Last Post: 16th December 2016, 09:17 PM
  4. F24 & Windows 10 Dual Boot Problem - No Win10
    By pjmcg in forum Installation, Upgrades and Live Media
    Replies: 5
    Last Post: 3rd July 2016, 05:15 PM
  5. Xp install wiped out grub on a fc6 dual boot system, how to restore?
    By cuban_cigar in forum EOL (End Of Life) Versions
    Replies: 6
    Last Post: 3rd June 2007, 02:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •