Ubuntu – How to install Ubuntu on an (U)EFI device with existing GPT

gptre-installationuefi

I had Ubuntu 11.04 running till now. Now I want to reinstall Ubuntu with nearly fresh 12.04. I had much trouble last time to install Ubuntu because of EFI. Yet somehow I somehow got it running. But I can't remember how.

Now I have a gpt partition with my personal data on sda4, an EFI partition on sda1 and between a swap and a root partition. I want to install Ubuntu on the root partition without clearing the hole SSD.

Everytime I try to install ubuntu my "BIOS" can't find it. When I press the right key at the right time I get an overview over the possible booting options. There is a "grub" entry but when I enter it I get to the overview again after a redraw of the display.

I tried all possibilities for the bootloader section (yes I installed Ubuntu 5 times today) and have no clue how to get my system running again. I also tried repairing grub via chroot. What should I do?

edit: Yes the installation completes without error. But as far as I can tell grub isn't even loaded. I would say my computer knows it should start grub, but can't excess the ssd. Or it doesn't find what it is looking for. And this behaviour didn't change by installing elilo(though I can't tell if I did it right). Grub is usually going to some shell when started with errors, but here simply nothing happens.

Best Answer

If I understand correctly, your problem is that your boot loader is broken after Ubuntu installation has completed; when you launch GRUB from your firmware, it dumps you back to the firmware's boot manager. If that's incorrect (if you're having problems getting the installer to start, for instance), please clarify.

My recommendation is that you install another boot loader. In my experience, GRUB 2 is the least reliable of the available Linux boot loaders, and when it malfunctions, it's usually easier to replace it than to try to fix it. If this is a Linux-only system, I recommend you try ELILO. If you're dual-booting with Windows, either use ELILO in conjunction with rEFInd or try Fedora's patched GRUB Legacy. You can install any of these from the Ubuntu installer in its "try before installing" mode, but you may need to do a sudo apt-get install efibootmgr followed by use of that tool to add the new boot program to the firmware's list of boot programs. See my Web page on EFI boot loaders for more information, including details of how to use efibootmgr.

The drawback to doing this is that you'll need to manage your boot loader manually; the scripts for updating the boot loader when you update your kernel will no longer work. Thus, you'll have to be sure to upgrade your boot loader configuration whenever you upgrade your kernel.