Difference between revisions of "UEFI Firmware"

From ThinkWiki
Jump to: navigation, search
(Enabling UEFI boot in Debian)
(Models featuring UEFI: Add ThinkPad W530)
 
(5 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
=== UEFI Firmware ===
 
=== UEFI Firmware ===
UEFI (Unified Extensible Firmware Interface) is a modernized replacement to BIOS (Basic Input/Output System). The specification is maintained by the collaborative non-profit UEFI Forum. UEFI is supported by both recent versions of both Linux and Windows. UEFI firmware with legacy BIOS support has started appearing on Sandybrige (220,420,520,etc.) Thinkpads. On supported machines, the firmware configuration utility (Thinkvantage->F1 on machine starup) has the option of enabling one or both UEFI/BIOS as well as providing the option to specify the order with which the machine tries to boot.
+
UEFI (Unified Extensible Firmware Interface) is a modernized replacement to BIOS (Basic Input/Output System). The specification is maintained by the collaborative non-profit UEFI Forum. UEFI is supported by both recent versions of both Linux and Windows. UEFI firmware with legacy BIOS support has started appearing on Sandybrige (220,420,520,etc.) Thinkpads. On supported machines, the firmware configuration utility (Thinkvantage->F1 on machine startup) has the option of enabling one or both UEFI/BIOS as well as providing the option to specify the order with which the machine tries to boot.
 
</div>
 
</div>
 
|}
 
|}
Line 17: Line 17:
 
#Install 64-bit Debian in BIOS mode to an MBR partitioned disk.
 
#Install 64-bit Debian in BIOS mode to an MBR partitioned disk.
 
#Install Kernel 3.0-rc1 or later. Enable CONFIG_EFI,CONFIG_FB_EFI,CONFIG_EFI_VARS,CONFIG_EFI_PARTITION.  
 
#Install Kernel 3.0-rc1 or later. Enable CONFIG_EFI,CONFIG_FB_EFI,CONFIG_EFI_VARS,CONFIG_EFI_PARTITION.  
#Create a small ~ 200MB Partition formatted to fat32 and enable the "boot" flag. The first partition is likely a good choice, but may not be strictly required. The "boot" flag is also likely superstitious.  
+
#Create a small ~ 200MB Partition formatted to fat32 and enable the "boot" flag. The first partition is a good choice, but is not strictly required. The "boot" flag is also likely superstitious.  
 
#Burn some form of live cd that allows you access your Debian install in case something goes wrong and you are unable to boot.  
 
#Burn some form of live cd that allows you access your Debian install in case something goes wrong and you are unable to boot.  
 
#Mount the fat32 partition at /boot/efi<br><tt>sudo mkdir /boot/efi<br>sudo mount /dev/sda1 /boot/efi</tt>
 
#Mount the fat32 partition at /boot/efi<br><tt>sudo mkdir /boot/efi<br>sudo mount /dev/sda1 /boot/efi</tt>
 
#Install the efi version of grub<br> <tt>aptitude install grub-efi-amd64</tt>
 
#Install the efi version of grub<br> <tt>aptitude install grub-efi-amd64</tt>
 
#Now run grub-install (ignore warnings about efivars)<br><tt>sudo grub-install /dev/sda<br>sudo update-grub</tt>
 
#Now run grub-install (ignore warnings about efivars)<br><tt>sudo grub-install /dev/sda<br>sudo update-grub</tt>
#This should have created /boot/efi/efi/debian/grubx64.efi. In order to make this actually work without running efibootmgr (which is not possible in bios mode), just copy it to /boot/efi/efi/boot/bootx64.efi<br><tt>sudo cp /boot/efi/efi/debian/grubx64.efi /boot/efi/efi/boot/bootx64.efi</tt>
+
#This should have created /boot/efi/efi/debian/grubx64.efi. In order to make this actually work without running efibootmgr (which is not possible in bios mode), just copy it to /boot/efi/efi/boot/bootx64.efi<br><tt>sudo mkdir /boot/efi/efi/boot/</tt><br><tt>sudo cp /boot/efi/efi/debian/grubx64.efi /boot/efi/efi/boot/bootx64.efi</tt>
#Reboot, enter the Thinkvantage menu and set "UEFI only" or "UEFI First". Hopefully you still get a grub menu and it will actually boot the 3.0 kernel.
+
#Reboot, enter the Thinkvantage menu and set "UEFI only" or "UEFI First". Hopefully you still get a grub menu and it will actually boot the 3.0 kernel. Older kernels appear to freeze with a blank screen as soon as grub loads them.
 +
 
 +
== Models featuring UEFI ==
 +
* ThinkPad {{P14s}}
 +
* ThinkPad {{W530}}
  
 
== Links ==
 
== Links ==
 
*[https://help.ubuntu.com/community/UEFIBooting UEFI Ubuntu Community Documentation]
 
*[https://help.ubuntu.com/community/UEFIBooting UEFI Ubuntu Community Documentation]
 
*[https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface UEFI on Arch Wiki]
 
*[https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface UEFI on Arch Wiki]

Latest revision as of 07:02, 5 September 2023

UEFI Firmware

UEFI (Unified Extensible Firmware Interface) is a modernized replacement to BIOS (Basic Input/Output System). The specification is maintained by the collaborative non-profit UEFI Forum. UEFI is supported by both recent versions of both Linux and Windows. UEFI firmware with legacy BIOS support has started appearing on Sandybrige (220,420,520,etc.) Thinkpads. On supported machines, the firmware configuration utility (Thinkvantage->F1 on machine startup) has the option of enabling one or both UEFI/BIOS as well as providing the option to specify the order with which the machine tries to boot.

Current Status

Though the specification has been around since the late '90s, UEFI only recently started appearing on commodity hardware. Macs are a slight exception, though they do not strictly adhere to the UEFI standard. Linux can boot as usual in BIOS mode, however the ELILO boot loader or recent versions of Grub 2 are necessary to boot in UEFI mode. Linux 3.0-rc1 is reported to successfully boot in UEFI mode (details below), but older versions hang after the kernel gets loaded by grub.

Enabling UEFI boot in Debian

The following are steps to successfully boot in pure UEFI mode ("UEFI only" startup config menu). There are likely some that are redundant or unnecessary.

  1. Install 64-bit Debian in BIOS mode to an MBR partitioned disk.
  2. Install Kernel 3.0-rc1 or later. Enable CONFIG_EFI,CONFIG_FB_EFI,CONFIG_EFI_VARS,CONFIG_EFI_PARTITION.
  3. Create a small ~ 200MB Partition formatted to fat32 and enable the "boot" flag. The first partition is a good choice, but is not strictly required. The "boot" flag is also likely superstitious.
  4. Burn some form of live cd that allows you access your Debian install in case something goes wrong and you are unable to boot.
  5. Mount the fat32 partition at /boot/efi
    sudo mkdir /boot/efi
    sudo mount /dev/sda1 /boot/efi
  6. Install the efi version of grub
    aptitude install grub-efi-amd64
  7. Now run grub-install (ignore warnings about efivars)
    sudo grub-install /dev/sda
    sudo update-grub
  8. This should have created /boot/efi/efi/debian/grubx64.efi. In order to make this actually work without running efibootmgr (which is not possible in bios mode), just copy it to /boot/efi/efi/boot/bootx64.efi
    sudo mkdir /boot/efi/efi/boot/
    sudo cp /boot/efi/efi/debian/grubx64.efi /boot/efi/efi/boot/bootx64.efi
  9. Reboot, enter the Thinkvantage menu and set "UEFI only" or "UEFI First". Hopefully you still get a grub menu and it will actually boot the 3.0 kernel. Older kernels appear to freeze with a blank screen as soon as grub loads them.

Models featuring UEFI

Links