stuck in grub rescue mode after installing ubuntu alongside Windows 8

8,604

You made the classic mistake (which the installer should prevent or at least warn you about, IMHO) of installing in BIOS/CSM/legacy mode to a computer that's already booting Windows in EFI mode. Given your current situation, your best hope of recovery is as follows:

  1. Download and prepare the USB flash drive or CD-R version of my rEFInd boot manager. (You can do this with any working computer.)
  2. Enter the firmware setup tool on the non-booting computer. I know you said you can't do this, but there must be a way to do it, even if it involves setting a jumper to clear the NVRAM or temporarily unplugging the hard disk.
  3. In the firmware setup utility, disable Secure Boot. Note that the procedure to do this varies from one computer to another, so I can't offer a step-by-step procedure.
  4. Boot the rEFInd medium. It should present options to boot both Linux and Windows. Test them both. If either doesn't work, it may be necessary to do something to fix the problem, so post back with details.
  5. Boot to Linux.
  6. Identify your EFI System Partition (ESP). This is a FAT partition that shows up in parted or GParted as having its "boot flag" set, or in gdisk as having a type code of EF00. It's normally one of the first two or three partitions on the disk, but it can reside elsewhere.
  7. Type sudo mkdir -p /boot/efi.
  8. If it's not already mounted there, mount your ESP on /boot/efi, as in sudo mount /dev/sda2 /boot/efi if the ESP is /dev/sda2.
  9. Install the Debian-package version of rEFInd.
  10. Edit /etc/fstab to ensure that the ESP will be mounted at /boot/efi when you reboot. (This step is recommended, but not required.)

At this point, your computer should boot from the hard disk using rEFInd. That said, there are buggy EFIs out there, so it's possible you'll run into problems. If so, post back with details.

If you want to use Secure Boot, you can do so, but you'll need to take extra steps to get rEFInd working with Secure Boot. See the rEFInd Secure Boot documentation for details.

One more point: Ubuntu 13.10 was released recently, so you might want to use it instead of 13.04. That said, I've not yet done a 13.10 installation, so I'm not sure if it's got any real advantages over 13.04. Chances are it does something better, though, at least on EFI-based systems, since EFI development for Linux has been proceeding at a fairly rapid clip over the past couple of years.

Share:
8,604

Related videos on Youtube

Gurpreet
Author by

Gurpreet

Updated on September 18, 2022

Comments

  • Gurpreet
    Gurpreet over 1 year

    I tried to install ubuntu 13.04 on my new Lenovo G500 which came pre-installed with Windows 8. I shrunk the main OS (Win 8) partition and then disabled fast boot in the power options in Win 8. Then I entered the UEFI and changed the mode to Legacy mode. Then booted from the Live USB drive and installed ubuntu. During installation I created 2 mount points (/ and swap) and when I tried to proceed it warned me of a requirement to have another boot partition of 1MB in size. I did that too. May be this was a mistake (dont know). Then tried to run ubuntu and things were fine. Restarted the laptop to see if Win 8 also worked. It did not and was asking to insert the Win 8 disk. I recalled there was a boot repair utility for ubuntu. I installed that and tried to repair the boot partition so that both OS would boot normally. The boot repair utility changed the mode to UEFI (I saw that happening) and then when I restarted the laptop I got the following message

    error: file '/boot/grub/i386-pc/normal.mod' not found grub rescue>

    Now the problem is that I am not able to restore my system. I am not able to get into the BIOS. Nor does the laptop recognize a Live USB drive, nor do I have a Windows installer CD. Can anyone help me with this situation?

  • mgiuffrida
    mgiuffrida over 9 years
    Before trying this, I tried a Windows repair disk. Now my PC boots into a Windows error screen (0xc000000e). I've disabled Secure Boot and can boot the UEFI version of rEFInd from a USB drive. It gives me two options: boot\vmlinuz-3.11.0-26-generic.efi.signed and boot\vmlinuz-3.11.0-15-generic. I've followed these steps for 3.11.0-15 since 3.11.0-25 hung. Except for step 10, I'm not sure what to do there. Rebooting without the rEFInd flash drive still takes me to the Windows error screen.
  • Rod Smith
    Rod Smith over 9 years
    Some computers have broken EFIs that boot only the fallback boot loader (EFI/BOOT/bootx64.efi) or the Windows boot loader (EFI/Microsoft/Boot/bootmgfw.efi). If you've got such a firmware, you can work around it by renaming rEFInd (or whatever boot loader you want to use). For rEFInd, see [here](file:///home/rodsmith/homepage/refind/installing.html‌​#naming) for more details.