Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have just tried installing Ubuntu 11.10 on a newly bought Lenovo ThinkCentre Edge with EFI boot enabled. The machine came preloaded with Windows 7. I first opted to install Ubuntu 11.10 side-by-side with Win 7. Installation of Ubuntu finished with success, however, when I rebooted, it kept booting Windows. I could not make it boot Ubuntu.

I then reinstalled Ubuntu 11.10. This time I opted for the Use Entire Disk option and thus wiped Windows 7 from the machine. Hoping this would work, I was surprised to see that it still did not work. Even though the installation process went without any problems/errors, when rebooting it now just gives me "No bootable operating system. Insert bootable disk and press any key..."

I figure this is because of EFI. I have checked the System Setup (F1 during POST) to find a BIOS option to disable EFI/UEFI boot, however, there is no such option for this machine.

So my question is, how do I install Ubuntu on a machine with EFI? - Or, since Ubuntu is probably already installed: how do I make it boot Ubuntu?

Extra info:

I heard that this problem might be caused by a "Secure Boot" feature in the BIOS, although this should only be for Windows 8 machines and thus not a problem for this specific machine (Windows 7). So, I called the hardware vendor to ask for help on this issue. They do not know of any such "secure boot" setting in the BIOS that would prevent Linux from booting. They suggested that I called Lenovo support, and I did. At Lenovo support they did not know anything about a BIOS setting called secure boot. The also did not know of any limitations that would prevent Linux from booting.

I asked for the BIOS manual, and the provided this: http://download.lenovo.com/lenovo/co...ebsupport.html

Steps to get to BIOS manual:

  • Go to http://lenovo.com/websupport
  • Click ThinkCentre / ThinkPad
  • Click Denmark on the Europe country list
  • Click Quick Find and supply the model number: 1577-G3G This will give you the support page for ThinkCentre Edge 71 (1577-G3G).
  • At the right side of the page, click "Hardware Maintenance Manuals" in the section "Guides and Manuals".
  • Here you will find BIOS manual.

I did this. The BIOS manual does not mention EFI, UEFI nor secure boot.

share|improve this question
2  
As Ubuntu is already "successfully" installed, you should just need to reinstall grub-efi. That's exactly what i had to do yesterday: superuser.com/q/372962/37511 have a look at it. – Maxime R. Dec 30 '11 at 12:24
I tried following your instructions in the superuser.com post. It did not make Ubuntu boot :( – ervingsb Dec 30 '11 at 15:43
Could you give some details on your thread ubuntuforums.org/showthread.php?t=1901748 ? What worked and what didn't, any error messages, etc. – Maxime R. Dec 30 '11 at 17:45
None of the suggested procedures worked. What I mean by didn't work is that Ubuntu did not boot. I just get the "No bootable operating system found. Press any key to restart boot process..." instead of booting Ubuntu. – ervingsb Dec 30 '11 at 17:58

5 Answers

This is a modified post by nerasezi in the Ubuntu Forum

The main source for the UEFI was the Ubuntu UEFI guide

The following are the steps he did:

  1. Use a live CD which matches the UEFI architecture. Mostly x86-64. Boot up the live cd (xubuntu or lubuntu. Those are lightweight desktop but it should work with Ubuntu and kubuntu as well).

    Be sure your live system is booting in UEFI mode. You may check it on the UEFI setup, probably under Boot option or similar. In my case it just put the "UEFI" prefix before the device name.

  2. Once the live system is running set through the terminal a root password by typing
    sudo passwd root

    Then log out from the default live cd user and log in as root in gui mode. Plug in the hard drive. I use a USB3 portable HDD but in most cases the hard drive is a SATA internal drive. Anyway, be sure you've BACKED UP ALL YOUR DATA, cause the process is going to wipe off everything on the drive. Launch Gparted (a gui tool is much easier than the text one) and select the drive you're willing to install the system into. (Be sure to select the right one!) Point to the top menu and select Device>Create Partition Table... A warning message pops out. Click on Advanced and select "gpt". Say OK A new GPT disk layout had been created. Now you need to create partitions on it. It's very important that you create as the first and primary partition, a FAT32 volume and you need to assign the label EFI to it. Once the partition is created, right click on it and select "manage flags". Check the "boot" flag and say OK. Move on to the creation of the / partition (you may want to separate /home and /boot. Do it as you usually do. In my case I've just created the / partition), and a swap area. Always prefer primary partitions cause with GPT the 4 primary partition limitation has been removed. Close Gparted.

  3. Install the system into the hard drive "/" partition and remember to point here the bootloader (GRUB 1.99) to install to. If you've created a separete "/boot" partition, you have to choose that one for the bootloader installation.

  4. Here comes the part from the UEFIBooting guide:

    Building GRUB2 (U)EFI

    Download the latest grub2 source code ZIP file. ftp://ftp.gnu.org/gnu/grub/

    Building grub2 requires the following programs to be installed (build dependencies):

    bison autoconf automake flex autogen python (2.x series) (for autogen.sh if building from bzr repo) texinfo help2man gettext (NLS support) device-mapper freetype2 (libs)

    sudo apt-get install bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev freetype2-demos texinfo efibootmgr

    efibootmgr was added to the software you need to install because you will need it later on.

    For 64-bit (U)EFI:

export EFI_ARCH=x86_64 ./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix="" make

In case you have a 32-bit architecture, check the online documentation at the link I have provided at the top.

Install GRUB2 in (U)EFI systems

Determine your EFI SYSTEM PARTITION. (it should be /dev/sda1 or /dev/sdb1 if is set on the 2nd hd)

Then mount the partition at /mnt/EFISYS (or at any mountpoint you wish). The following code assumes /dev/sda1 to be EFISYS partition.

sudo mkdir -p /mnt/EFISYS

sudo modprobe dm-mod

sudo mount -t vfat -o rw,users /dev/sda1 /mnt/EFISYS

sudo mkdir -p /mnt/EFISYS/efi/grub

Then, build an EFI application for GRUB and copy it and the other modules:

Enter the "grub2 compiled source/grub-core" directory - Default : /usr/lib/grub/{EFI_ARCH}

grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot

sudo cp grub.efi *.mod *.lst /mnt/EFISYS/efi/grub

Note : The -p "" option is important for creating a portable grub.efi app. Now create a grub.cfg in /mnt/EFISYS/efi/grub :

sudo touch /mnt/EFISYS/efi/grub/grub.cfg

Make the firmware launch GRUB2 (U)EFI as default

For non-Mac UEFI systems, efibootmgr is used to modify the UEFI Firmware Boot Manager. This requires the kernel to be booted in UEFI mode and that the kernel processor architecture should match the firmware architecture (and 'noefi' is NOT used) for 'efivars' kernel module to be loaded and efibootmgr to access the boot manager variables. Initially the user is required to manually launch "efi/grub/grub.efi" from the firmware console itself if grub2-efi was installed in BIOS mode. Then efibootmgr should be run to create the boot entry.

sudo modprobe efivars

Enter the "grub2 compiled source/grub-core" directory

grub-probe --target=device /boot/efi/efi/grub/grub.efi

Assuming the output the grub-probe to be /dev/sda1

sudo efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "GRUB2" --loader "\\EFI\\grub\\grub.efi"

In the above command, /boot/efi/efi/grub/grub/efi can be split up as /boot/efi and /efi/grub/grub.efi, which translates to (/dev/sda) -> partition 1 -> \EFI\grub\grub.efi .

  1. Open Synaptic and remove all grub packages and install just the grub-efi packages (amd64 for me) and all the necessary dependencies. Once the installation is over, run sudo update-grub in the terminal. You should edit "grub.cfg" from /boot/grub and check that the disk UUID matches your disk and partitions, the voice "insmod part_" and "set root='(hd0," have "gpt" textline. If everything is ok, copy "grub.cfg" to the "efi/grub" on the EFI System Partition. If something i mentioned before, doesn't match, just edit grub.cfg and manually change them values. Then copy the file to the "efi/grub" directory on the Efi System Partition (should still be mounted under /mnt).

    Then when I rebooted the system, a new entry on the Boot tab under the UEFI setup has appeared, named GRUB2 and i set it as the default boot option.

share|improve this answer

Solved the EFI problem on my ACER notebook 5560G, it turned out that renaming the EFI directory and EFI file on the Wubi USB disk worked (thanks immerohnegott).

It forced a normal GRUB install on 2 premade partitions with GParted on a USB stick. The partitons were:

  • /boot (100 mb)
  • / (70 GB)

Reboot into Windows 7 and install the free version of EasyBCD. Add a new entry , Linux -- >> Grub 2 and it will search all partitions for the GRUB bootloader.

In this way the Windows "System Reserved" partition and the PQSERVICE Acer Hidden Partition are not touched.

share|improve this answer
Thank you. I refused to follow the steps by Luis Alvarado and this simple way did it for me. I'm not saying Luis' answer is not correct, but if I have to go to so much trouble just to get Ubuntu to boot, I'd rather use Windows. Yes, I said it. So folks, try this before trying to almost build your own linux from scratch. It might spare you from having to kick you UEFI board and your Ubuntu USB key out of the m-f window. – Gabriel Jul 31 '12 at 14:31

You need to figure out how to get your bios to boot the install cd in efi mode, not bios mode. You will know that it is booting in efi mode because you will get a grub menu instead of the usual syslinux one.

share|improve this answer
I think it is already booting in EFI mode. I get a GRUB menu. NOT the usual semi graphical menu with the Ubuntu logo. Just a black/white GRUB menu with three options: - Try ubuntu before install - INstall ubuntu - check for defects. – ervingsb Dec 31 '11 at 19:21
@ervingsb, that should do it then, assuming you told the installer to use the whole disk, rather than manual partitioning. – psusi Jan 1 '12 at 19:23
1  
Well, it did not. I gave up installing via USB. Someone on Ubuntu Forums suggested that I installed from a CDROM instead of USB. This made it work. – ervingsb Jan 2 '12 at 7:57

You can make USB bootable drives that work with the EFI system, I'm not as seasoned as some of y'all so I figured out a way that is easy and works :)

In a machine that has the EFI bios, insert a CD/DVD with Parted Magic (I had it on a HIREN Boot CD that I made into a CD instead of a USB) Boot from that CD/DVD.

Once you are in Parted Magic, insert an empty USB jump drive with at least 2GB memory. Open up the Unetbooten utility that is included in Parted Magic. Run the program and choose whatever distribution you are trying to load on the jump drive. Follow directions and wait for it to complete.

That USB drive should boot on any EFI system now. At least it worked for me :oP

share|improve this answer

Same problem here. I've 'solved' it by permanently booting from my SuperGrub CD. I don't mind doing it this way. I see it as a security feature; my SuperGrub CD is my additional key. When I check my harddisks in Ubuntu I can see that the Ubuntu-HDD is a non-MBR disk. Looks like repartition this disk an adding the MBR would fix the problem but I'm too lazy to go through all this trouble.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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