Results 1 to 3 of 3

Thread: UEFI for dummies

  1. #1
    Vive le pants! directhex's Avatar
    Join Date
    Jul 2003
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • MSI X99A Gaming 7
      • CPU:
      • Intel Core i7 5280k
      • Memory:
      • 32GiB ADATA DDR4
      • Storage:
      • Corsair Neutron XT 960GB
      • Graphics card(s):
      • MSI GTX 980 Gaming 4G Twin Frozr 5
      • PSU:
      • Corsair AX860i
      • Case:
      • NZXT H440
      • Operating System:
      • Ubuntu 17.10, Windows 10
      • Monitor(s):
      • Dell U2713HM
      • Internet:
      • FIOS

    UEFI for dummies

    You're an expert on fixing boot issues. Then something new comes along, changes everything, and suddenly the world is dark and scary. What to do? Well, you can read my guide, that's what!

    What is UEFI?

    A new (relatively) firmware system, for computers.

    Relative to what?

    BIOS. Which is how computers booted from the 1980s onwards. It's the system you're used to.

    Why change what isn't broken?

    BIOS is broken, you just probably haven't noticed yet. The most obvious issue is booting Windows from drives bigger than 2TB (more on that later). But really, the issue is about 16-bit processors.

    16-bit? Aren't modern chips 64-bit?

    Indeed. But BIOS strictly only supports 16-bit 8088-derivative processors. Which is why a top of the range Skylake i7-6700k still has an 80286 embedded in it - for the people who insist on using BIOS.

    So why does it need that to boot?

    BIOS only supports two methods of booting - loading 448ish bytes of 8088 machine code from the start of a floppy disk, or the same from the start of a fixed IDE disk

    I don't have either of those things - I have a DVD drive and USB sticks and SATA drives

    Amazing what you can get away with via emulation, isn't it? Fr'example, there's a spec for optical discs called El Torito, which has a floppy disk image stored in a header of a disc - your firmware can copy that to memory, and floppy-boot from it. Hence bootable DVDs! Same for USB drives or SATA - IDE emulation.

    Sounds crummy. But it works, right?

    Well, mostly. But ever had issues when installing dual-boot systems? That's because you can only have one boot loader occupying the start of your drive. So each OS overwrites it with its own boot loader. Messy messy. There's also the 2TB issue I mentioned before

    Explain that

    In order to make your drive more useful, it's split up into partitions - chunks of disk which can be treated as independent drives from inside your OS. Windows (following on from MS-DOS) only supports one method for partitioning its boot drive on BIOS systems: "MBR"

    I've heard of MBR!

    Indeed. The boot record I mentioned is typically referred to as the MBR ("master boot record"). But the start of the disk also defines the start and end points of the four partitions the system supports

    Uh, I have more than four partitons though

    One of those four can act as a container for more partitions. But resizing can become an absolute nightmare if you want to cross the barrier between "primary" and "logical" partitions. Because you can't. And there's that 2TB limit

    That again?

    MBR cannot handle numbers bigger than 2,199,023,255,552. It is impossible to talk about any drive beyond 2TB using MBR layout. So if you're booting from it and use BIOS, you MUST use MBR (because that's all Windows supports) - and you simply can't use any space beyond that if your boot drive is 3TB or bigger.

    Okay. But my drive isn't bigger than that. Can't I keep using BIOS, since I know it?

    For now. Ish. Any modern motherboard (some 2011 onwards, all with a Windows 8 logo on the box) is using UEFI natively, but most can emulate BIOS enough for you to keep booting with BIOS. But it's twenty ****ing fifteen, why not learn the new system now rather than be surprised by it later?

    Fine, fine, fine. Tell me about UEFI

    It started life on Itanium (Intel's first 64-bit processor) systems. Itanium had no support for 32-bit, and certainly no embedded 80286, so they had to come up with a different system. Now it's on regular PCs too. And Windows Phone 8. And some ARM server boards. It's a huge bloated mess of a spec!

    Aren't you trying to sell me on this stuff? You're terrible at it!

    Doesn't matter. It's what we have. Learn it or become obsolete


    What you need to know is it's here, and any post-2012 motherboard has it. Windows Vista SP1 x64 and above can boot with it. And most modern Linuxes.

    How is UEFI boot handled?

    Well, let's start with installers. It'll read a UDF or FAT32-formatted USB drive or DVD, and look for the file /efi/boot/bootx64.efi and run it.

    What is that?

    An app, written in the UEFI "OS". It can be anything! Here's classic text adventure Zork, as a UEFI app.

    Wait, wait, I tried to boot the Windows installer and it's listed twice as a boot drive?

    It's possible to make boot media which is valid for both UEFI and BIOS. Unfortunately, in a slightly user-unfriendly twist, you (the user) need to pick the right boot entry. For example, on the wife's PC, a USB stick gets listed as both "UEFI: Sandisk Cruzer Edge" and "USB: Sandisk Cruzer Edge". Just... make sure you pick the right entry. It's impossible to change mode after this point.

    Then what?

    Well, assuming you're working with a real installer for Windows or Linux or something, it'll mostly be as you're used to, but with two changes. Firstly it uses a different partitioning system called GPT instead of MBR, and secondly it creates an extra ~100 meg partition called the "EFI System Partition" - a FAT32 partition where the boot loader apps get installed to (no more boot sectors).

    Installed to?

    Right. Each OS will stick its boot loader somewhere in the ESP, then send a signal to the firmware to write this new loader's location into the CMOS. Each entry installed in this manner will get its own listing in your "boot devices" list on the firmware - so if you installed Windows, you'll have "Windows Boot Manager" as an entry next to your DVD drive and hard drive after you reboot. This is why you don't do the old "unplug drive A when installing a different OS to drive B" thing, or swap cables, or anything like that. You should only have one ESP, the one on drive A. Everything will be fine(tm)

    And then?

    Well, that's it. There are some nice new things you can do - for example, you can boot into your firmware settings from inside your firmware, without needing to spam F1F2F10F12DelIns - on a Linux system it just gets added to the list of OSes in GRUB. On Windows, there's an "Advanced Boot" option which wil have an option to boot into your firmware - and it's the same on every UEFI system, which makes documentation much easier.

    How do I set my default OS?

    Boot device priority. Same way you pick whether to load from SSD or DVD first.

    What's this "secure boot" I hear so much about?

    It's a way for your motherboard to prevent tampering of your OS (e.g. boot-sector viruses, or backdoors installed without your knowledge). You can provide a list of certificates you trust, then the firmware enforces that everything involved with the boot process (not just the boot loader, but the OS kernel itself, and all your device firmwares like your GPU BIOS) are signed with a trusted key. Did you know your GPU has full read/write access to all your RAM, so hackers could backdoor your GPU firmware without you knowing? Now you do - Secure Boot stops it

    And stops me booting what I want

    Yeeeesh... kinda. It stops you booting untrusted stuff. So you can sign your own crap, and trust the certificate you used to do that signing. Or you can get your crap signed by Microsoft - every motherboard has a small list of pre-trusted certificates which includes Microsoft's cert, which they'll let anyone use for a small fee.

    And old BIOS stuff I want to boot?

    Don't. Or disable Secure Boot. For as long as that option remains.

    Anything else I should know?

    UEFI is buggy. Inevitably. Motherboard manufacturers are absolute idiots, and hire the cheapest, ****tiest developers to work for them - and their crap is full of bugs. But BIOS has been around a couple of decades longer, so has a couple of decades of extra bugfixing applied. Problems exist! Wifey's P8P67-M Pro will occasionally just forget how to boot from her SSD, unless I do a "load defaults" and save. It's not malice, it's incompetence. But the solution isn't sticking with BIOS - it's learning a new set of workarounds.

  2. Received thanks from:

    Biscuit (15-07-2015),Jonj1611 (15-07-2015),kalniel (15-07-2015),Rob_B (15-07-2015),SUMMONER (15-07-2015)

  3. #2
    Banhammer in peace PeterB kalniel's Avatar
    Join Date
    Aug 2005
    2,958 times in 2,398 posts
    • kalniel's system
      • Motherboard:
      • Gigabyte X58A UD3R rev 2
      • CPU:
      • Intel Xeon X5680
      • Memory:
      • 12gb DDR3 2000
      • Graphics card(s):
      • nVidia GTX 1060 6GB
      • PSU:
      • Seasonic 600W
      • Case:
      • Cooler Master HAF 912
      • Operating System:
      • Win 10 Pro x64
      • Monitor(s):
      • Dell U2311H
      • Internet:
      • O2 8mbps

    Re: UEFI for dummies

    When I one day get a computer with UEFI this might be useful

  4. #3
    Oh Crumbs.... Biscuit's Avatar
    Join Date
    Feb 2007
    N. Yorkshire
    1,091 times in 833 posts
    • Biscuit's system
      • Motherboard:
      • MSI B450M Mortar
      • CPU:
      • AMD 2700X (Be Quiet! Dark Rock 3)
      • Memory:
      • 16GB Patriot Viper 2 @ 3466MHz
      • Storage:
      • 500GB WD Black
      • Graphics card(s):
      • Sapphire R9 290X Vapor-X
      • PSU:
      • Seasonic Focus Gold 750W
      • Case:
      • Lian Li PC-V359
      • Operating System:
      • Windows 10 x64
      • Internet:
      • BT Infinity 80/20

    Re: UEFI for dummies

    Wow, amazing work mate.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts