UEFI booting – basic concepts
In an earlier post, I mentioned my preliminary experience with UEFI, and I said that I was viewing that as a learning experience. This is the first of three posts about UEFI. I’ll mostly concentrate on opensuse, though other linux distros are dealing with the same issues. The other two posts will be about UEFI and opensuse 12.2, and about UEFI and opensuse 12.3 (currently nearing final release).
Historically, early PCs depended on the BIOS, which was ROM (read-only memory) provided by the computer vendor to provide basic coding. Early PC operating systems relied on the BIOS to handle much of their I/O. Later operating systems, such as OS/2 and Windows 95, had their own internal code for handling I/O, and mainly used the BIOS during booting, a time when I/O was needed before the operating system was loaded.
As a result of these change in the software world, much — but not all — of what the BIOS did is now provided by the operating systems themselves. So the old idea of the BIOS has become updated, and UEFI is the intended replacement. My guess is that people will continue to use the name “BIOS” because it is easier to pronounce than “UEFI”.
Booting an operating system with the BIOS was conceptually simple. BIOS code would load one sector from the disk (the MBR) into memory, and then jump to code in that sector. For a floppy drive, that would begin the operating system loading. For a hard drive, that MBR code would identify which partition to boot, load the first sector of that partition (the PBR) into memory, and jump to code from that sector. Loading the operating system would then proceed.
The BIOS booting scheme was used for early computers with 360K floppy disks, and the IBM XT, with a 10 MB hard drive that was described as so big that nobody would ever fill it. Today, many computers come with a 1 TB drive, which is about 100,000 times the capacity of that XT hard drive. The BIOS had to be tweaked to allow these larger drives. But the possibilities of tweaking for larger capacity have just about run out. A new scheme was needed.
With UEFI booting, there is a special partition dedicated to booting. It is the EFI partition, and it is required to be formatted as a vfat file system — typically using FAT32. Each operating system has its own directory within that EFI file system, where it places a boot loader program and auxilliary files needed for booting. The UEFI system then runs the appropriate boot loader to boot a particular operating system.
There has been some criticism of the UEFI scheme. Whether or not it was a wise plan, I will leave for others to argue. However, there no question that the old BIOS/MBR booting scheme was running out of steam.
The new booting scheme affects booting from external media such as a CD or DVD or USB. Most of the UEFI computers are able to fall back to BIOS mode, so that older methods still work. However, if you boot an installer in BIOS mode, you might not be able to setup what is needed for later booting of the installed system in UEFI mode. So the external media also need to be able to boot in UEFI mode. However, there are still many older computers around that do not support UEFI, so install media also needs to bootable in BIOS mode. It is the need for this dual capability that makes things harder.
To be bootable in UEFI mode, install media needs to appear as if a multi-partition device with an EFI partition. And it needs to have the UEFI boot structures setup in that EFI partition. Because it needs to also be usable in a BIOS based system, the install media needs a hybrid format that can appear to be UEFI structured on a UEFI computer and MBR structured on a BIOS based computer.
That’s a brief overview of the idea behind UEFI. A web search will give you many sites with more detailed information.