Boot from USB/DVD in EFI Mode

0

I would like to perform a clean UEFI installation of Windows from a USB/DVD. That involves reformatting the disk to GPT and re-creating the EFI sector.

My question is: how to boot from a peripheral in the first place? There are no such settings in the BIOS, and "UEFI Firmware Settings" makes no sense as I currently have Windows installed in MBR/Legacy mode.

I might be misunderstanding the principle behind EFI though... does it scan all connected physical drives for EFI sectors? When I last installed Windows I assumed this (apparently wrongly) - the PC refused to boot from DVD, with some weird error message. I was forced to install it in Legacy mode. It could be different for USB, but I'm hesitant to attempt this blindly again.

I have a Lenovo Z50-70 with a Novo button... dunno if that's the key.

The voice of the Internet seems divided. On one hand "gurus" always say "enable safe mode"; on the other hand "other gurus" always say "boot in Legacy mode".

Help. Thanks.

willywonkadailyblah

Posted 2015-09-27T15:22:39.633

Reputation: 268

Answers

1

There is no such thing as an "EFI sector." The Extensible Firmware Interface (EFI; version 2.x is called the Unified EFI, or UEFI) is a type of firmware. It replaces the older Basic Input/Output System (BIOS) on most computers introduced since mid-2011, and on some sold before then. Although many people, and even companies, apply the term "BIOS" to their EFIs, IMHO this is confusing, since the two are so very different. Calling an EFI a BIOS leads one to drag in BIOS knowledge that's simply wrong when applied to EFIs.

EFIs boot by reading files from a FAT filesystem, not boot sectors from a disk or partition, as BIOS does. On a hard disk, this filesystem is normally stored on an EFI System Partition (ESP). When booting from a hard disk, the NVRAM stores the partition identifier and filename of the preferred boot program(s) so that the motherboard can find it. When booting from a removable disk such as a USB drive, the computer normally looks for a file called EFI/BOOT/bootx64.efi, or variants of that for other CPU types, on the removable disk. (Most computers also use this as a last-ditch fallback filename in case there are no valid NVRAM entries.)

Thus, to make a removable disk bootable, you must ensure that it uses FAT (or at least has a FAT partition) and that a valid boot loader is stored on the medium as EFI/BOOT/bootx64.efi. If you're trying to boot a disk image you've downloaded from somewhere, such as a Linux installer, it might or might not have the right files.

To actually boot from a removable disk, you may need to use the firmware's built-in boot manager. From a user interface point of view, this is a minor extension of the boot device selector that's been present on BIOS-based computers for over a decade. Typically, you access it by hitting Esc, Enter, or a function key just after you power on; but details vary greatly from one computer to another. Also, many EFIs include a Compatibility Support Module (CSM), which enables the machine to boot using BIOS-mode boot loaders. If the CSM is active, the boot manager may show two entries for an external device. The entry with the string "UEFI" boots the EFI boot loader, and the one without that string boots the BIOS boot loader. (This assumes that both are present, of course; if one is missing, its entry may also be missing, or the entry might not work.)

Rod Smith

Posted 2015-09-27T15:22:39.633

Reputation: 18 427

my bios does not have a "CSM" mode, but a "Legacy" mode; this seems different to what you're saying 'cos I can only install onto an MBR disk in this mode, not GPT. so I need to boot in UEFI mode which doesn't allow booting from peripherals – willywonkadailyblah – 2015-09-30T14:46:58.847

"Legacy mode" is just another name for a boot via the CSM; the two are synonymous, at least in this context. ("Legacy" can also apply to other things, though, like USB keyboards, in which context it refers to making a USB keyboard look like a PS/2 keyboard.) It is possible to boot from external devices in EFI mode; however, those disks must have EFI boot loaders installed on them, stored in the fallback filename (EFI/BOOT/bootx64.efi), as noted in my response. Read my EFI Boot Loaders for Linux page for more information.

– Rod Smith – 2015-10-02T12:28:59.967