No GRUB after Ubuntu install

25,506

Your problem is that you're attempting to mix BIOS-style and EFI-style booting. Windows 7 is installed in EFI mode, as indicated by the use of a GUID Partition Table (GPT) with an EFI System Partition (ESP) as /dev/sda1 that contains Windows EFI boot files such as EFI/Microsoft/Boot/bootmgfw.efi. Your Ubuntu installation is in BIOS mode, though, as indicated by the presence of GRUB code in the MBR, the presence of a BIOS Boot Partition (/dev/sda5), the lack of any Ubuntu EFI boot loaders in the ESP, and the fact that you attempted to install the i386 version.

The cleanest solution is to wipe your current Ubuntu installation, download an AMD64 version, and install it in EFI mode. Unfortunately, the Ubuntu installer doesn't make it clear that you're running in EFI mode vs. BIOS mode. To make that determination, you should open a shell and look for the directory /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've probably booted in BIOS mode. If you boot an AMD64 installer and find that this directory is absent, try again, but use whatever tool your computer offers to select the boot device, and be sure to select the one for your CD or USB flash drive that includes "EFI" or "UEFI" as part of its description.

Another solution is to install my rEFInd boot manager in Windows. Edit the refind.conf file so that the scanfor line is uncommented and includes the hdbios item. rEFInd should then give you boot options for Windows and for a generic BIOS option. The latter should launch GRUB, which in turn will take you to Linux. Using two boot managers complicates the startup process, so it's better to install a 64-bit version of Ubuntu unless you've got a compelling reason to use a 32-bit version. (Such compelling reasons to go 32-bit are rare these days.)

Yet another solution is to use your computer's own boot manager, which you typically access by pressing F2, F8, or some other function key during startup. You should have options to boot Windows in EFI mode or to boot from your hard disk in BIOS/legacy mode. (The exact names used vary from one installation to another.) This is likely to be the most awkward solution in the long run, but you might consider it acceptable, especially if your firmware has a better-than-average boot manager.

Share:
25,506

Related videos on Youtube

andrekk
Author by

andrekk

Updated on September 18, 2022

Comments

  • andrekk
    andrekk over 1 year

    The main issue of the problem is that i can't load Ubuntu 12.10 desktop - i386 after install near win7basic (windows 7 was preinstalled on my laptop). I've tried manual reconfiguring of file system, have tried automatic one. also tried to install ubuntu 12.04 - destop - amd64. None of errors were noticed during the installation process. But after install windows 7 starts automatically. seems to me that nothing changed within winloader. I know that not so much info i put in here, but i'll answer any questions.

    • Admin
      Admin over 11 years
      So you're saying you don't get the option to boot Ubuntu? It just goes straight to Windows?
    • Admin
      Admin over 11 years
      Yes. Just like that.
    • Admin
      Admin over 11 years
      Can you give us some hardware information?
    • Admin
      Admin over 11 years
      to Web-E - i think, not, because first was win7, ubuntu comes after...
    • Admin
      Admin over 11 years
      to iSeth: yes. Boot-Repair said smth about that.
  • andrekk
    andrekk over 11 years
    Now have just tried Boot-Repair. If someone's interested: paste.ubuntu.com/1467542
  • andrekk
    andrekk over 11 years
    Is EasyBCD used just for cases when ubuntu installed first and then comes Win7 loader that destroys grub?
  • jrg
    jrg over 11 years
    While this might answer the question, it is preferred that you include the essential parts of the answer here. Thanks!
  • nastys
    nastys over 11 years
    @user116845 EasyBCD is used for editing Windows Vista+ Bootloader Entries. To add an Ubuntu entry you must install GRUB to your Ubuntu partition.
  • andrekk
    andrekk over 11 years
    Ok, i got it. Fortunately, i've found the right way to solve the problem. Didn't know anything about EFI before today, so thank you for some piece of explanation. Besides, i had one-minute trouble with loading win7 loaders (Invalid EFI filepath error), but somehow this issue was solved by one-time running BootRepair. After that, just as you told, now i'm offered of three or so variants in GRUB. But for now i have no inconvenience with that.
  • Zelphir Kaltstahl
    Zelphir Kaltstahl about 7 years
    Although /sys/firmware/efiexisted, the GRUB didn't show up on reboot. Seems this is not guaranteed to work.