13

I have a Lenovo u410 ultrabook. It's sata scheme consists of a 30gb SSD and a 1tb hdd in a raid0 with intel rapid start technology. I removed IRST and disabled the raid0. I want to install ubuntu on the ssd and /home/ on the 1gb hdd. I foolishly erased the efi partition on the 1tb and attempted to recreate it by formatting the ssd and creating a new GPT partition table. I made a 250mb fat32 partition (/dev/sda1) and filled the rest ~24gb with an ext4 partition (/dev/sda2)

I made a live USB using a 12.04.2 iso and universal usb installer. The installation completes fine however at the end I get the error "Failed to install grub-efi to /target/ the system will not boot". I tried to open terminal and update grub however it's not there and when trying to install grub-efi from the repo I get flagged for missing a lot of dependencies. Ubiquity crashes after the error message.

I had success a few months ago installed 12.10 using my friends usb cd drive however I broke the system and cant be down until I next see him. Is there a huge difference in 12.10 and LTS that would stop this install from working smoothly?

My net goal is to have Ubuntu running on the machine with steam (tf2 and bastion) and eclipse IDE. If 12.10 is better suited, and can solve this efi issue then I'll gladly install that however from my understanding LTS would be more stable and still run the modern updates of Quantal.

Will 12.10 install grub-efi flawlessly? and if not how can I install grub-efi from the live usb onto a solid state drive /dev/sda with efi boot on /dev/sda1, ext4 mounted as root on /dev/sda2, and /home/ on the hard disk /dev/sdb2?

Conclusion: LTS wasn't capable of handling the uefi environment. Downloading and installing 12.10 worked flawlessly. Raring worked fine too, however it was unstable with the drivers necessary for steam.

Hardware: Lenovo U410 ultrabook
HDs: 30 GB SSD, 1 T HDD with raid0
Ubuntu: 12.04

1
  • You can solve it choosing on boot screen the device option that doesn't use UEFI.
    – user266005
    Apr 6 '14 at 18:21
6

Ubuntu's been making slow but steady improvements in its EFI support for the last several versions, so yes, there are differences between 12.04 and 12.10 that could be important. That said, the fact that you got a bunch of dependency errors when you tried to install grub-efi suggests that a more fundamental problem might be the root cause -- perhaps there was a network problem that prevented a string of other packages from installing, for instance. If so, trying again at a later time might correct matters.

That said, on an EFI system, IMHO it's better to use 12.10 than 12.04. This is especially true if it's a recent computer that shipped with Windows 8, since such computers also invariably use Secure Boot, which Ubuntu 12.10 supports but Ubuntu 12.04 doesn't. This isn't the root cause of your problem, though, since 12.04's installation disc won't boot at all if Secure Boot is active; I mention it only for the benefit of others who might read this page.

1
  • My computer shipped with Windows 7, and has a 15$ upgrade to 8. My computer is ivy bridge, does that help center the cause? There is an option in the bios pertaining to uefi however when I disable it I see 'secure boot disabled' and I get a grey broken looking grub menu on the live usb and it fails to boot. If I enable it, I get grub EFI and the live session works fine. I'll download 12.10 after work and try again with that then and see if theres a difference. Is there an askbubuntu equivalent to bumping or will you be available when I chime back in?
    – mikeymop
    Feb 23 '13 at 19:50
12

This error was solved for me by making sure there was an internet connection available to the installer.

When I chose not to connect I got this error.

4
  • Weird; me too. I had this error and just tried again with Internet connected and it worked. Jan 5 '14 at 22:16
  • Worked for me too after connecting...
    – Mohit Jain
    Jul 28 '14 at 18:14
  • Merely having a connection was not sufficient for me. I also had to check "download updates" at the start of the install process.
    – ʇsәɹoɈ
    Jul 8 '15 at 23:35
  • Same here with xubuntu 14.04. Installing offline yields the error. Simply having an internet connection fixed it. The "download updates" option was not required.
    – jox
    Sep 3 '17 at 16:54
7

In my case, I skip install grub by running ubiquity from terminal using the following command:

ubiquity -b

It also means that you have to install grub by your bare hand.

After ubuntu has been installed. DON'T restart because you haven't had bootloader yet. You have to install grub on your pc.

sudo mount /dev/sdXY /mnt

sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

grub-install /dev/sdX

grub-install --recheck /dev/sdX

update-grub

This link will help you: http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

Update: Thanks for Mikko Östlund's comment.

In case you separate your EFI system partition and Ubuntu partition, when running grub-install /dev/sdX you may get error message cannot find EFI directory. You have to do mount /dev/sdXY /boot/efi. Then run the grub-install /dev/sdX and the remaining commands with success. And reboot.

4
  • 1
    Can we PLEASE file this issue and solution upstream. This is NOT something I want to explain to my grandmom over the phone. Mar 22 '17 at 20:13
  • For me, there was a little flaw in these instructions. My case was this: Mar 24 '17 at 14:35
  • 1
    Getting error message "cannot find EFI directory" when running the "grub-install /dev/sd.." command above? Keep reading! For me, there was a little flaw in these instructions. My case was this: I had the ESP-partition on /dev/sda1 and my new ubuntu intall on /dev/sda2. So, in your instructions above, I substituted "a" for "X" and "2" for "Y". Fine. But, when running "grub-install /dev/sda" I got error message "cannot find EFI directory". I then realized that I had to do "mount /dev/sda1 /boot/efi". Then I ran the "grub-install /dev/sda" and the remaining commands with success. And rebooted. Mar 24 '17 at 14:49
  • @MikkoÖstlund Thanks for your help. I will update my answer.
    – thangdc94
    Mar 24 '17 at 18:15
2

You should have

/boot/efi    

and about 100MB ,then everything is ok...

mine is

sda1 /boot/efi  100MB
sda2 /          100G
sda3 /swap      16384MB    
sdb1 /home      3TB
0

Try to disable BIOS QuickBoot/FastBoot and Intel Smart Response Technology (SRT).
Then install Ubuntu 12.10 <- IMPORTANT 12.10
Then try to install, if nedeed, grub-efi-amd64-signed

Regards,

1
  • I had already disabled Intel SRT. Quickboot isn't an option in the notebooks BIOS. I have to use 12.10 to install, if I try to install raring is fails so I usually just install 12.10 and then dist-upgrade to raring. Once on a kernel 3.8 or newer everything gets a little more stable.
    – mikeymop
    Aug 12 '13 at 4:05
0

In my case, on a Lenovo X230 laptop, I also reproducible got this error. Things got solved by:

setting in the BIOS `Boot tab➝UEFI/BIOS boot mode´ to legacy.

Before, the setting was a ‘smart mix’ of UEFI/LEGACY („legacy first“). Pure UEFI might sound more logical but all I can say is: it works. Even in a dual-boot context with two linux distros around.

0

This was happening to me with Xubuntu 16.04.2 installer. Certainly you could disable UEFI and do a traditional install, but in my case I would be losing the faster POST times.

This problem is caused because the Efi System Partition (ESP) partition is missing. It must be a FAT32 partition marked as bootable. You can create it with GParted, fdisk or your tool of choice. Then the installer will detect it and mount it as /boot/efi, solving thus the problem.

There's more info and details about the size, type, etc. in the ArchLinux wiki page about ESP (it applies to Ubuntu too).

Not the answer you're looking for? Browse other questions tagged or ask your own question.