XUbuntu 12.04 GRUB recovery after separate Windows 7 install

5,017

The top answer at this link worked like a charm for me. I just installed Windows 8 onto the same machine as my Xubuntu so it overwrote the grub loader and used the Windows bootloader. This switched it back to using the grub loader. Hope it helps!

How can I repair grub? (How to get Ubuntu back after installing Windows?)

Share:
5,017

Related videos on Youtube

Slava Fomin II
Author by

Slava Fomin II

Updated on September 18, 2022

Comments

  • Slava Fomin II
    Slava Fomin II almost 2 years

    I have a RAID drive: /dev/mapper/isw_bjeeefeied_Lightspeed with root Linux partition at: /dev/mapper/isw_bjeeefeied_Lightspeed7.

    I've installed Windows 7 on the separate partition so it rewritten the boot loader.

    Now i'm trying to reinstall GRUB2 to the MBR using XUbuntu's LiveCD.

    I'm doing:

    sudo mount /dev/mapper/isw_bjeeefeied_Lightspeed7 /mnt
    
    sudo grub-install --recheck --root-directory=/mnt /dev/mapper/isw_bjeeefeied_Lightspeed
    
    /usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/mapper/isw_bjeeefeied_Lightspeed7.  Check your device.map.
    Auto-detection of a filesystem of /dev/mapper/isw_bjeeefeied_Lightspeed7 failed.
    Try with --recheck.
    If the problem persists please report this together with the output of "/usr/sbin/grub-probe --device-map="/mnt/boot/grub/device.map" --target=fs -v /mnt/boot/grub" to <[email protected]>
    

    Here's the output of requested command:

    /usr/sbin/grub-probe --device-map="/mnt/boot/grub/device.map" --target=fs -v /mnt/boot/grub
    
    /usr/sbin/grub-probe: info: cannot open `/mnt/boot/grub/device.map'.
    /usr/sbin/grub-probe: info: changing current directory to /dev/mapper.
    deps dm_task creation failed
    deps dm_task creation failed
    deps dm_task creation failed
    /usr/sbin/grub-probe: info: no mapping exists for `/dev/mapper/isw_bjeeefeied_Lightspeed7'.
    /usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/mapper/isw_bjeeefeied_Lightspeed7.  Check your device.map.
    
    • "/boot" is not a separate filesystem in my case.

    How can i properly reinstall GRUB2 to the MBR so i can boot my XUbuntu desktop as well as Windows 7?