site  contact  subhomenews

Kernel with EFI vars

October 29, 2014 — BarryK
All of my computers, desktops and laptops, have traditional BIOSes, but for a few days now I have had in my possession a laptop with Windows 8.1 and UEFI boot firmware.

As all computers with Windows 8.x have UEFI firmware, and given that I have one of these in my possession, I suppose that I should investigate how to get Quirky to boot on them.

I am a bit nervous about changing the partitions, as I bought this laptop for someone, and will be giving it to them soon.
However, I will at least attempt to get Quirky to boot off a USB stick.

This page was a good starting point, to modify things from a running Windows:
http://www.instructables.com/id/Dual-Boot-Ubuntu-and-Windows-8-UEFI/

UEFI firmware
In the Control Panel -> System and Security -> Power Options -> Choose what the power buttons do,
I clicked "Change settings that are currently unavailable"
Then in "Shutdown settings" I disabled "Turn on fast startup"
Then clicked "Save changes" button.

I then rebooted, and pressed the F2 key to bring up the boot firmware setup (UI is like the old BIOS setup). Note, some computers might require the DEL key to do this.
Note also, the prior step in the Control Panel is required to be able to use the F2 key to bring up the firmware setup.

In the firmware menu, "Security" section, there is "Secure Boot [enabled]", and I pressed the "-" key to disable, then saved.

The firmware also has a "Boot order" section, however my Quirky Unicorn USB stick is for the old BIOS computers. I do need to choose the USB stick as first in the boot order, however, it is necessary to build a UEFI-capable Quirky Unicorn USB stick.

UEFI-capable Linux
I am starting from scratch here, haven't got a clue. This is a great beginner's guide:
http://www.rodsbooks.com/efi-bootloaders/index.html

To get things rolling, it seems that I need to make some changes in the kernel. I have recompiled the 3.16.6 Linux kernel with these changes:

Processor type and features 

[*] EFI runtime service support
[ ] EFI stub support

Firmware drivers
EFI (Extensible Firmware Interface) support
<m> EFI variable support via sysfs
<

...they are two different sections, you have to enable the first, before the second one becomes available. The second one provides a module named "efivars".

The new .config file:
http://bkhome.org/sources/kernel-3.16.6-efivars/

The new PET (27MB):
http://ftp.nluug.nl/os/Linux/distr/quirky/quirky6/x86/packages/pet_packages-unicorn/linux_kernel-3.16.6-nopae-builtin_aufs_f2fs_squashfs_zram-efivars-i586.pet

I am planning to install QU on a USB stick, using Syslinux 6.x, as the 6.x series supports UEFI booting.
There is a utility needed as part of the setup process, "efibootmgr", that requires the kernel "efivars" module.

Tags: linux