UEFI

Version: 

Section: 

System

On this page:

Background

UEFI (Unified Extensible Firmware Interface) is the replacement for legacy BIOS. In 2005, Intel's initial specification for EFI (Extensible Firmware Interface) was contributed to the UEFI Forum which manages and licenses the spec going forward. Beginning with the introduction of Microsoft's Windows 8, most modern PCs now ship with UEFI firmware. But at this stage in the deployment of UEFI, many offerings differ in their implementation of the UEFI spec. As a result, methods of installing Linux may vary considerably depending on make and model of the computers being used.

Key Elements

Like BIOS, most UEFI implementations are accessible via pre-defined keystrokes during POST (Power on Self Test). Each computer or motherboard vendor uses different keys (e.g., Backspace, F2, F12) to access UEFI, but setup is similar to BIOS setup. Key areas include:

  • Fast Boot. UEFI typically offers the ability to vary the speed at which the firmware boots. Implementations may offer the ability to 'disable' or significantly slow the speed of the boot process. This can be important in increasing the ability of the firmware to recognize installation or Live media such as USB thumbdrives or DVDs.
     
  • Secure Boot. UEFI firmware will nearly always offer the ability to disable/enable Secure Boot. Though this is a requirement to boot Windows 10 products, the ability to disable Secure Boot is often critical to boot the installation media of some Linux distributions.
     
  • Native UEFI. This is the default boot option. It is important to note that Native UEFI can operate without Secure Boot enabled. This is often the configuration required to boot various Linux OSs, since many distributions do not offer the signed code required for Secure Boot.
     
  • Legacy BIOS Compatibility. Options vary considerably in this area. Some implementations call this option CSM (Compatibility Support Module), others call it Legacy BIOS OPROM (Option ROM), so users should be prepared to study the documentation more closely here than other firmware options. Regardless, each UEFI specification will offer the ability to emulate or include enough legacy BIOS code to provide compatibility with Linux versions that are expecting a legacy BIOS interface.

MX-17 - UEFI Compatibility

MX-17 is designed to be compatible with UEFI firmware, but implementations still vary widely among computer and motherboard manufacturers. As a result the following configurations are currently supported.

  • MX-17 64-bit installation supports two boot modes: Native UEFI & Legacy BIOS. At present, MX-17 64-bit supports installations using UEFI boot mode and UEFI with Legacy BIOS boot mode. Both modes require Secure Boot OFF.
     
  • MX-17 32-bit installation requires UEFI with Legacy BIOS. Currently, MX-17 32-bit installations require UEFI firmware in Legacy BIOS boot mode (CSM, Legacy OPROM, etc.) and Secure Boot OFF.

 

MX-17 64-bit UEFI Installation

Linux-only Environment

Users wishing to create a Linux-only environment on UEFI-based machines with pre-installed Windows 10, should start with Step 1. Users looking to install a LInux-only environment on UEFI-based machines with no pre-installed OS, should skip to Step 2. 

Step 1: Removing Pre-Installed Windows 10.

WARNING: this will effectively remove Windows 10 and make your machine only bootable via Linux

Wipe the disk by creating a new GPT partition table. Operating from DVD or USB, use gparted go to Device --> Create Partition Table -->Select GPT instead of MS-DOS from the option pull down menu. This step will effectively wipe the disk. 

 

Step 2: GPT Paritioning

GUID Partition Table (GPT) partitioning is the modern replacement for Master Boot Record (MBR) partitioning. 

  • Create an EFI System Partition (ESP). Using gparted, go to Partition --> New to create the first partition, format it as FAT32, and make the size 100 MB (yes, it is small). Then go to Manage Flags and select 'boot' and 'esp' ('esp' should be selected by default when you select 'boot').  The EFI System Partition (ESP) will be created as sda1 and will store boot code for each OS in use going forward.
     
  • Create other partitions. Using gparted, go to Partition-->New to create other partitions for your planned OS and data installations. the MX-17 installer will automatically detect the ESP on sda1, but will also detect additional partitions sda2, sda3...etc., so you can use them for further OS installations as necessary. 

 

Step 3: Linux Installation

The MX-17 64-bit Linux installer requires the following UEFI firmware configuration. Make your changes by access your UEFI firmware Setup utility. 

  • Fast Boot OFF. UEFI firmware should allow you to either disable Fast Boot, or minimize its speed. This is may help if your installation media is on USB flashdrive.
     
  • Native UEFI ON. Make sure that Native UEFI is ON, and any Legacy BIOS compatibility mode is disabled.
     
  • Secure Boot OFF. Secure Boot ON is the default, but needs to be disabled as it is not supported by MX-17.

 

The installer offers selection of your GPT partitions just as it has offered selection of MBR partitions in the past. After installing critical files, the installer detects your ESP and offers to install GRUB on:

  • ESP. Pre-selected and installs GRUB to the EFI System Partition (ESP), the GPT equivalent of Master Boot Record (MBR).
     
  • root. Installs GRUB at the beginning of the root partition--for experts only.

Post installation, boot to your UEFI firmware setup or boot selection screen. MX-17 will appear as a listing beginning with 'MX-17' or 'MX17' and select it to boot to the UEFI GRUB menu. If other OSs are installed they will also appear with their respective distribution identifiers at the UEFI boot selection screen.

 

Linux + Windows 10

Step 1: Partition for Linux

Make sure your computer is backed up and boot into your Windows environment.

  • At the Windows 'Start Menu' type ‘cmd’ (or go to Windows PowerShell) and type in 'compmgmt.msc' to take you to Computer Management. Then select Disk Management from the left hand column.
     
  • Right click on your C: drive and select ‘Shrink Volume…’ to whatever size you want. This should leave space as ‘Unallocated’ for your Linux volumes.
     
  • Note the second partition in this screenshot, the ‘Healthy (EFI System Partition).’ Under GPT partitioning this will become sda2. In some Windows 10 installations, this may be the first partition, or sda1. Either way, the MX-Installer will detect its presence and install the GRUB bootloader there along with the Windows 10 bootloader.

Computer-Manager.png

 

Step 2: Partition for Linux

Boot MX-17 Live media (USB thumbdrive or DVD).

  • Note that your ESP (EFI System Partition) has already been created by Windows.
     
  • Use GParted to add your Linux partitions. Format them as you would normally for ext4.
     
  • Create a Swap partition if necessary.

 

Step 3: Install Linux

Follow the instructions for a 64-bit installation of MX-17 starting at Step 3.

Note: During the installation process, the MX-Installer will automatically detect the ESP (EFI System Partition) and will pre-select ESP as the location to install GRUB along with your Windows 10 boot loader. ESP is the modern replacement for MBR (Master Boot Record). See the screenshot below.

ESP.png

Post installation, when you reboot and hit the proper keystroke interrupt to reach the UEFI firmware boot options, you should see the option of selecting the Windows or MX-17 boot manager. Though the user interface of each UEFI firmware implementation will vary in format, it should look something like this.

BootOptions.png

Note that MX-17 is the first boot option (in this particular installation), and that you are given the option of booting in UEFI but with Secure Boot OFF. Windows 10 will still boot and function in this mode, but will complain that Secure Boot is not properly installed. You can easily change the UEFI firmware settings to boot with Secure Boot ON if you like, but you will need to manually change that each time you want to boot into Windows 10 if want Secure Boot. Like many other distributions, MX-17 does not sign its code, and so does not currently support Secure Boot ON.

Step 4: Optional: Add Windows to GRUB Menu

Since selecting Windows or Linux via the UEFI boot menu requires determining the interrupt key for each particular PC's implementation, some users may find this inconvenient for everyday use. Adding Windows 10 to the GRUB menu can by-pass this annoyance and is relatively easy to accomplish:

  • Run update-grub. After Linux is installed, log into MX-17, and open a terminal as root. Run the command update-grub.
     
  • Reboot.  Windows should appear in the GRUB menu as a boot option.

 

MX-17 32-bit UEFI Installation

Scenario: All Linux Environment

Use Steps 1 & 2 for installation preparation.

Step 3: Linux Installation

The MX-17 32-bit Linux installer requires the following UEFI firmware configuration. Make your changes by access your UEFI firmware Setup utility. 

  • Fast Boot OFF. UEFI firmware should allow you to either disable Fast Boot, or minimize its speed.
     
  • Legacy BIOS Boot ON. Enable BIOS compatibility boot mode (e.g., CSM, Legacy BIOS OPROM).
     
  • Secure Boot OFF. Secure Boot ON is the default, but needs to be disabled as it is not supported by MX-17.

 

The installer will offer selection of your GPT partitions just as it has offered selection of MBR partitions in the past. After installing critical files, the installer will offer to install GRUB on:

  • MBR. Pre-selected and installs GRUB to MBR. (GRUB is actually installed to the Protective MBR, a compatibility function built into into GPT.)
     
  • root. Installs GRUB at the beginning of the root partition--for experts only.

Post installation, booting should take you directly to the GRUB boot loader screen.

 

UEFI Tips & Tricks

VIDEO: UEFI Boot Issues, and some settings to check!

UEFI in VirtualBox

Here's a nice trick for booting UEFI installations in VirtualBox without the need to edit the nsstartup file.

  • After installation of MX-17, go into the ESP partition and make a new folder called BOOT. Copy the grubx64.efi file from \EFI\MX15 to \EFI\BOOT and rename the file bootx64.efi. VirtualBox, like most 64bit UEFI implementations, will look for that file and folder automatically.
     
  • This is the "removable" device Boot folder, actually the same folder that the bootable removable media use. Some *real* UEFI systems may not like the \EFI\MX17 folder and file combo, but all systems should be able to boot from the \EFI\BOOT folder. In that sense \EFI\BOOT can act as a failsafe location for boot loaders, particularly if you are having troubleshooting UEFI boot problems. 

NOTE: Even though this workaround makes it easier to work in VirtualBox, be aware that other OSs (Windows for instance) may put a bootx64.efi file in \EFI\BOOT as well, so placing your own version of bootx64.efi in that location would wipe out those bootloaders. If you need to do this on a *real* machine, make a backup copy of any existing \EFI\BOOT\bootx64.efi first. You can always use the backup copy later simply by copying the backup copy to its original name.

 

Links

v. 20180213

 

Language: 

English