Bug 1919 - Accommodate EFI via the live image "install" label
Summary: Accommodate EFI via the live image "install" label
Status: VERIFIED FIXED
Alias: None
Product: Other YP Layers
Classification: Build System, Metadata & Runtime
Component: layers (show other bugs)
Version: 1.2
Hardware: x86 Multiple
: High major
Target Milestone: 1.3 M3
Assignee: Darren Hart
QA Contact:
URL:
Whiteboard: (P1)(done)
Depends on: 1636 2527
Blocks:
  Show dependency tree
 
Reported: 2012-01-18 12:23 UTC by Darren Hart
Modified: 2012-10-11 12:54 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Hart 2012-01-18 12:23:37 UTC
EFI support has been added to the bootimg class which allows the "boot" label to work on EFI machines. The "install" label runs an install script which installs legacy boot GRUB 2, and will not work on EFI-only machines.

The installer needs a way to determine an EFI installation should be performed, I suspect the BOOT_LABEL should be changed to INSTALL-EFI or similar to make the scenario easy to detect.

To install as EFI, the target disk should have a GPT partition table with a small FAT32 FS on the first partition and an EXT3 partition for the rootfs. The EFI partition should contain the following layout:

EFI/
  YOCTO/
    yocto.efi
    grub.cfg
    vmlinuz
    initrd (optional)

The grub.cfg will contain the standard kernel APPEND and set root to something like /dev/sda2 to pick up the rootfs installed there (this is the same as the legacy install).
Comment 1 Darren Hart 2012-01-19 14:17:03 UTC
Note: Rather than installing grub-efi to the harddisk, we should consider using efibootmgr to install boot targets for the EFI Shell. This eliminates a secondary boot loader. The shell itself offers all the configurability we normally expect from grub for manipulating kernel parameters and the like.

This would involve adding efibootmgr to the live image for EFI machines and doing something like the following in the install-efi script:

efibootmgr --create --gpt --disk /dev/sdX --part Y --write-signature --label "Yocto 1.2 (core-image-sato)" --loader '\efi\yocto\bzImage.efi ${APPEND}'
Comment 2 Darren Hart 2012-05-02 15:34:12 UTC
I'm bumping the priority of this as we've seen an uptake in EFI systems and working around this issue is painful. Getting it right will take some research and likely some new recipes. Bumping the sizing as well.
Comment 4 Alexandru Palalau 2012-10-11 12:54:37 UTC
Verified on master branch.
Latest commit ID: a691562e5daac69556f1dae28b3cffaa38f51fc8
There are only two grub entries: boot and install.
The install parameters include LABEL=install-efi.
The installation process was completed successfully with a core-image-minimal image.