Installing Ubuntu on a GPT partitioned drive

7,671

First, under Linux, the EFI System Partition (ESP) is normally mounted at /boot/efi, not at /EFI or /EFI Boot. The Ubuntu installer calls the ESP the "EFI boot partition," IIRC, and you may be using that term but adding / to its start. Thus, your setup may be correct, but your description is a bit unclear. I mention this because precision is important; there are a lot of subtle distinctions in EFI that get overlooked or that are easily distorted, and misunderstandings or miscommunication can lead one down a false path.

Second, I thought that Ubuntu did not give options about where to install the boot loader in an EFI-mode installation, although I could be mistaken. Thus, if you're seeing such an option, it could be that you've accidentally booted the installer in BIOS mode rather than in EFI mode. You can check this by dropping to a shell and looking for a directory called /sys/firmware/efi. If that directory is present, you've booted in EFI mode. If it's absent, you've probably booted in BIOS mode. If you find that you've booted in EFI mode, you should try again, but look for boot options to control the boot mode of your Ubuntu installation medium.

Share:
7,671
Ali
Author by

Ali

Updated on September 18, 2022

Comments

  • Ali
    Ali almost 2 years

    I have changed my system to boot from UEFI instead of BIOS and have installed Windows 7 on my internal SSD which has GPT partition type.

    I am trying to install Ubuntu 13.04 on my external HDD. My machine is a Lenovo W520. My HDD is a 1TB USB3 WD.

    Here is some of what I have been trying:

    1. My laptop is set to boot in UEFI mode.
    2. I have 64 bit version of Ubuntu, on my bootable flash disk
    3. I took out my SSD before installing Ubuntu
    4. Before installation my external HDD was also partitioned as GPT and it only had one 950GB partition
    5. I tried two different methods:

      • First: When I let the Ubuntu to install itself automatically, without changing anything, the installation completed but Ubuntu did not boot. SSD was out and I am sure the systems boots in UEFI mode.

      • Second: I tried to do the partitioning myself in the following order, but I still have the same problem, I am sure my HDD is partitioned as GPT:

        • /EFI Boot
        • /(root)
        • /swap
        • /home

    I chose to install the bootloader in /EFI boot.

    Please let me know what I am doing wrong.
    Thanks

    Update: I was sure that Windows, on SSD, boots in UEFI mode. However, I disconnected my HDD and the windows did boot from SSD.I used the live USB to boot Ubuntu and let it do the partitioning and install Ubuntu on the external HDD. I still had the same problem and Ubuntu did not boot. Then I used the live USB and installed Boot-Repair. After running Boot-repair and a restart everything was good, and Ubuntu did boot from HDD. However, there is a line before booting into Ubuntu: ata_id[279]: HDIO_GET_IDENTITY failed for '/dev/sdb': Invalid argument But the system boots.

    Boot Info Script: Here is a Boot Info Script I got after using Boot Repair.

    I tried to change the partitioning and partition sizes. After reading here, I changed the partitioning using Gparted.
    I also installed the bootloader in /dev/sda1 which is flagged as the /boot partition. As expected after installation and a reboot, Ubuntu did not boot. So by following this and this posts, I tried to register the bootloader to the EFI. But I was not successful. I even noticed that my machine might have this problem, and I changed the /EFI/Ubuntu/bootx64.efi name and location but no effect, Ubuntu did not want to boot. Again, I used boot repair to solve the boot problem and it worked like the previous time and I am in Ubuntu. But I really like to know what is causing this problem. The interesting thing is that Boot Repair has created all possible folders and files. Is there a way that I know which folders are being used for boot? These are the different folders and files:
    -/boot/efi/EFI/Boot/bootx64.efi
    -/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi and bootx64.efi
    -/boot/efi/EFI/ubuntu/bootx64.efi and grubx64.efi

  • Ali
    Ali about 11 years
    I remember I checked whether I have booted to BIOS or UEFI and I am sure there was a /sys/firmware/efi directory.
  • Serrano
    Serrano over 8 years
    @Ali From your comment it seems that this did not solve your problem. Did you manage to fix it, and if so, consider posting an answer.
  • Ali
    Ali over 8 years
    @SerranoPereira It was a long time ago and I don't clearly remember what I did. But as I've mentioned in my edit, I fixed the problem using the boot-repair tool. But later I faced the same problem and noticed there was a problem with the bootable USB drive. I think I used rufus to make it bootable for a UEFI system. Good luck.