FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2008
    Posts
    175

    grub rescue> Boot fails: Example commands to boot+fix Windows 10 + Linux dual boot

    grub rescue> Boot fails: Example "grub rescue" commands to boot and fix (Windows 10 update broke Windows 10 + Linux dual boot):
    --------------------------------------------------------------------------------------------------------------==---------------
    Explanation:
    ------------
    Windows 10 "Upgrade to Windows 10 Home, version 1511, 10586" (sent out in November/December 2015) creates an additional Windows partition and can break grub2 from booting a dual boot Windows 10 and Linux system.

    The example below has hd0 as the primary boot hard drive. Windows was originally on the first partition, with linux /boot on the 2nd partition, and the rest of the Linux LVM partition(s) on 3rd partition.

    The example below was using the following partitions setup prior to applying "Upgrade to Windows 10 Home, version 1511, 10586":
    -------------------------------------------------------------------------------------------------------------------------------
    Dual boot Windows 10 and Fedora Linux system
    Before Windows 10 1511, 10586 upgrade:
    Partition 1 (hd0,msdos1) Windows primary partition
    Partition 2 (hd0,msdos2) Linux /boot partition
    Partition 3 (hd0,msdos3) Linux LVM partition (/ and possibly other partitions)

    Windows 10 "Upgrade to Windows 10 Home, version 1511, 10586" created a new partition right after partition 1, between partition 1 and 2, which created the following:
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Partition 1 (hd0,msdos1) Windows primary partition
    Partition 2 (hd0,msdos2) Windows rescue/upgrade/whatever partition
    Partition 3 (hd0,msdos3) Linux /boot partition
    Partition 4 (hd0,msdos4) Linux LVM / and other partition(s)
    etc...

    So, Windows 10 "Upgrade to Windows 10 Home, version 1511, 10586" breaks grub2 because boot block grub2 still thinks it should boot grub2 from (hd0,msdos2) when it now needs to boot from (hd0,msdos3).

    Also NOTE: You may have to disable "Secure Boot" in BIOS to allow Linux to boot. Windows may re-enable "Secure Boot" with this upgrade 1511.
    ----------------------------------------------------------------------------------------------------------------------------------------------

    Output you see on boot after starting to install Microsoft "Upgrade to Windows 10 Home, version 1511, 10586"
    ---------------------------------------------------------------------------------------------------
    .
    error: unknown filesystem.
    Entering rescue mode...
    grub rescue>

    Show current partitions:
    ------------------------
    grub rescue> ls
    (hd0) (hd0,msdos4) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)

    Notes, for above example:
    -------------------------
    (hd0) is hard drive 0
    (hd1) is hard drive 1
    (hd0,msdos4) is hard drive 0 partition 4
    (hd0,msdos3) is hard drive 0 partition 3
    (hd0,msdos2) is hard drive 0 partition 2
    (hd0,msdos1) is hard drive 0 partition 1
    (hd1,msdos1) is hard drive 1 partition 1
    etc...

    Show current grub boot settings:
    --------------------------------
    grub rescue> set
    prefix=(hd0,msdos2)/grub2
    root=hd0,msdos2

    Notes for above example:
    ------------------------
    prefix = location of your /boot partition and path to /boot/grub2 directory (while being in /boot, so just /grub2)
    root = location of your /boot partition

    Find your current /boot partition containing /boot/grub2 (for example, you want the directory containing grub.cfg):
    -------------------------------------------------------------------------------------------------------------------
    grub rescue> ls (hd0,msdos2)/grub2
    error: unknown filesystem.

    grub rescue> ls (hd0,msdos1)/grub2
    error: unknown filesystem.

    grub rescue> ls (hd0,msdos4)/grub2
    error: unknown filesystem.

    grub rescue> ls (hd0,msdos3)/grub2
    ./ ../ grubenv themes/ device.map i386-pc/ locale/ fonds/ grub.cfg

    Success, we see grub.cfg on the msdos3 partition now, so our new /boot partition is (hd0,msdos3)

    Change current boot grub settings to use correct partition:
    -----------------------------------------------------------
    grub rescue> set prefix=(hd0,msdos3)/grub2
    grub rescue> set root=hd0,msdos3

    Verify new settings are pointing to your new grub2 partition:
    -------------------------------------------------------------
    grub rescue> set
    prefix=(hd0,msdos3)/grub2
    root=hd0,msdos3

    Start grub2 back to "normal" and get the grub boot menu with new grub2 partition settings:
    ------------------------------------------------------------------------------------------
    grub rescue> insmod normal
    grub rescue> normal

    You should now see the normal grub boot menu, including a boot timer.
    Quickly select your Linux boot option and boot Linux, before the system boots Windows (if Windows is your default boot).
    NOTE: You need to boot linux to make the new grub settings permanent for future system boots.

    After logging into Linux:
    Open a command line, then run the following to save settings on boot:
    NOTE: This is assuming your Linux boot drive is /dev/sda
    (To verify your Linux boot drive, run df /boot and look at the /dev/sd? setting for your system.)
    --------------------------------------------------------------------------------------------------------------
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    sudo grub2-install /dev/sda

    Your system should now be reconfigured to boot with your active partition table, using the new partition number for your Linux /boot partition.

    Test your systems boot with:
    sudo reboot

    NOTE: When you next boot to Windows 10, Windows 10 will continue with it's upgrade (mine was at 30% complete) and will reboot at least one more time to finish the Upgrade to Windows 10 1511.

  2. #2
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    45

    Re: grub rescue> Boot fails: Example commands to boot+fix Windows 10 + Linux dual boo

    I had same trouble and easy fix was to get "Ultimate boot CD" which has boot recovey on it. It got me back up and running when nothing else worked. It is easy to use and works! Solved my problems fast and saved the trouble of re installing fedroa when disk failed to boot and just gave me "Grub rescue> prompt"

  3. #3
    Join Date
    May 2016
    Location
    London
    Posts
    1

    Re: grub rescue> Boot fails: Example commands to boot+fix Windows 10 + Linux dual boo

    Had similar issue with win7, 8 and 8.1 and found this article helpful:
    http://twomorecents.com/cant-boot-li...as-taken-over/

  4. #4
    Join Date
    Dec 2016
    Location
    Italy
    Posts
    1

    Arrow Re: grub rescue> Boot fails: Example commands to boot+fix Windows 10 + Linux dual boo

    my partitions are not msdos, they are gpt. therefore the ls command lists the following:
    grub rescue>(hd0) (hd0,gpt8) (hd0,gpt7) (hd0,gpt6) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)

    here is out put of set
    grub rescue>set
    prefix=(hd0,gpt7)/boot/grub
    root=hd0,gpt

    I think Ubuntu 12.04 uses grub2 bootloader but here set results grub. does it mean ubuntu is deleted?

    I try to find my current /boot partition and typing the following results:

    grub rescue>(hd0,gpt7)/boot/grub (i tried with all gpt 1,2..8)
    err: unknown file system

    I desperately tried different paths , but nothing found containing grub.cfg

    I Installed ubuntu 12.04 alongside windows8 then updated to windows 10 in December 2015. windows is in UEFI mode and I installed ubuntu in Legacy BIOS mode in my acer machine. Windows 10 has been updated many times since then I dont remember the last time i used my ubuntu os.
    now I try to Install it from a USB ISO file and it says no OS detected in this machine .

    I am almost novice to ubuntu and I appreciate your help guys!
    Last edited by mebrex; 16th December 2016 at 06:25 PM.

  5. #5
    Join Date
    Mar 2012
    Location
    München, Deutschland
    Posts
    897

    Wink Re: grub rescue> Boot fails: Example commands to boot+fix Windows 10 + Linux dual boo


Similar Threads

  1. dual boot with xp issue - grub can't boot into windows
    By JohnRock in forum Installation, Upgrades and Live Media
    Replies: 7
    Last Post: 10th January 2010, 03:26 AM
  2. Boot Failure w Grub installed to non-MBR partition w/Windows 7 dual boot
    By kamikazepipes in forum Installation, Upgrades and Live Media
    Replies: 14
    Last Post: 3rd January 2010, 01:19 AM
  3. Grub fails to boot Vista in an F8-Vista dual boot
    By kpfuser in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 2nd May 2008, 02:57 PM
  4. Dual-Boot Linux and Windows XP with GRUB on SATA
    By debudayan in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 31st July 2007, 06:17 PM
  5. Dual Boot probl Win XP and FC 3: no boot menu and automatical boot to windows
    By siwask in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 18th February 2005, 04:57 AM

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
  •