How do I install Ubuntu 12 on a 64bit PC with UEFI and GPT SSD disk, with no current OS?

6,677

Solution 1

This can be tricky because it's not obvious what your boot mode is when you run the installer. Most modern UEFI computers support booting in both BIOS mode and in EFI mode, and there's no system-to-system consistency about which mode gets used by default. I recommend using the "try before installing" mode and checking your boot mode by looking for the /sys/firmware/efi directory; if it's present, you've booted in EFI mode, and if not you've probably booted in BIOS mode.

If you've booted in BIOS mode, installation should proceed as usual, possibly including the 1MiB "bios_grub" partition that Marcappuccino mentioned. (This is needed only if you use GPT for partitions, though.) If the system doesn't boot at this point, then it probably means that the firmware is trying to boot in EFI mode. Perusing your firmware's boot options (from F2, F10, F12, Del, or some other key at boot time) may provide a clue about why it's not working.

If you've booted the installer in EFI mode, then installation should also proceed normally, although you don't need the bios_grub partition; instead, you need a ~100-500MiB EFI System Partition (ESP) with a FAT filesystem. The Ubuntu installer should create this automatically when it runs in EFI mode. If the computer doesn't boot when you reboot after this installation, then it might be trying to boot in BIOS mode -- again, checking your firmware settings might find a solution. More likely, though, something went wrong with the EFI boot loader installation. In EFI, boot loaders are normal files on the ESP, so you can check them out from an emergency system. If you mount the EFI at /boot/efi (its more-or-less standard location), look for the /boot/efi/EFI/ubuntu directory; it should hold a grub.efi file (or something with a similar name, like grubx64.efi; I don't recall precisely what Ubuntu uses). You can check that this file is correctly entered in the firmware's boot list by using the efibootmgr utility, which you may need to install with sudo apt-get install efibootmgr. Typing efibootmgr -v should produce a list of boot loaders. If you don't see GRUB in that list, then registering the boot loader may do the trick:

efibootmgr -c -l \\EFI\\ubuntu\\grub.efi -L Ubuntu

You may need to adjust this command, though, especially if your ESP isn't on /dev/sda1. See the program's man page for details.

If this doesn't work, you can copy/rename GRUB from its location in /boot/efi/EFI/ubuntu to live as /boot/efi/EFI/boot/bootx64.efi, or possibly /boot/efi/EFI/Microsoft/boot/bootmgfw.efi. The first name is the default EFI boot loader name, which the computer should boot if there are no other boot loaders available. The second is the name for Microsoft's boot loader, which some EFI implementations treat in a similar way (although really they shouldn't).

Solution 2

Did you add a 1MB biosgrup partition at installation? This is usually necessary for the newer GUID partition table for the BIOSes to recognise it or something (remember you are not limeted to four partitions like the Master Boot Record partition table so you can have as many as you want!)

Share:
6,677

Related videos on Youtube

user86288
Author by

user86288

Updated on September 18, 2022

Comments

  • user86288
    user86288 almost 2 years

    How do I install Ubuntu 12 on a new 64bit PC which has UEFI instead of BIOS and a GPT formatted SSD disk, with no current OS ? I have already tried and although it seemed to install, it would not boot/startup. I have temporarily given up trying to install Ubuntu and am using Windows 7, but I would far prefer Ubuntu !