The never-ending saga of EFI Boot and GPT partitioning

The never-ending saga of EFI Boot and GPT partitioning

Summary: My previous post on LMDE uncovered a lot of confusion. Here's an explanation of how to get around the problems.

SHARE:
TOPICS: Linux
8

My previous post on Linux Mint Debian Edition 201303 has obviously uncovered a lot of confusion about EFI booting and GPT partition tables.  I hope that I can explain it all a bit more, with a couple of examples, to remove some of the confusion. 

Linux Mint Debian Edition 201303 says specifically in its release notes that it does not support EFI Boot or GPT disks.  It doesn't say exactly what the problems are, though, and the devil is in the details...

There are a number of ways to get around the EFI Boot problem, but none of them address the GPT partitioning problem:

  • Most EFI/UEFI BIOS systems have configuration settings which allow you use 'Legacy Boot', which means booting from MBR-style boot records.
  • LMDE, being a Debian derivative, can be configured with the 'grub-efi' package, to enable EFI Boot. Note that this can only be done after it has been installed, so it will almost certainly require the previous step, at least to get it to boot the installation media, because the LMDE Live media does not have EFI Boot capability.
  • If you have another EFI-compatible Linux distribution already installed, and that distribution has a Grub which is able to boot other Linux distributions, you can set that up to boot LMDE. This works with openSuSE 12.3, but it doesn't work with Fedora 18, and I have not tried it with Ubuntu 13.04 yet.
  • If you install another boot manager, such as rEFInd, you can set that up to boot LMDE.

However, none of these solves the GPT problem. Here's the lowdown on that.

The LMDE release notes specifically say that it does not support GPT partitioned disks. Unfortunately it doesn't say that they can't be read (they can), and it doesn't say what will happen if you try to install to one (it can be catastrophic).

What actually happens is that it interprets the GPT partition table incorrectly, and that causes it to get confused about what is where on the disk. In my case with LMDE, what it did was write the wrong partition information to the Grub configuration file, so it then tried to boot from the wrong partition, and it failed to boot. Not so catastrophic — it just didn't work.

However, a few weeks ago I tried to install PCLinuxOS (also based on Debian Testing, and also without GPT support), on another GPT-based system (my HP dm1-4310).  In that case the disk partitions were a bit more complicated, because I had left the Windows Recovery partition in place, which meant a lower-numbered partition was at the end of the disk. PCLOS interpreted the partition table incorrectly, and the results were much more damaging.

First, rather than use the existing swap partition, it wiped another existing Linux installation partition and used that for swap. Second, rather than installing to a new partition I had created for it, it wiped another (different) exiting Linux installation, and installed there. Not nice.

So, here is the summary. LMDE does not support EFI Boot out of the box, but there are ways to get around that. It also does not support GPT partition tables, and there is no way around this other than wiping the disk and changing it to DOS BIOS/MBR partitioning. I'm quite sure this is what Clem meant when he wrote in the FAQ "you could do it but it would require wiping the disk".  There is actually a slim chance that you could install successfully to a GPT disk, but that would require simple partitioning and a good bit of luck.

I hope this clears things up a bit. Feel free to post questions and comments, as always...

Topic: Linux

J.A. Watson

About J.A. Watson

I started working with what we called "analog computers" in aircraft maintenance with the United States Air Force in 1970. After finishing military service and returning to university, I was introduced to microprocessors and machine language programming on Intel 4040 processors. After that I also worked on, operated and programmed Digital Equipment Corporation PDP-8, PDP-11 (/45 and /70) and VAX minicomputers. I was involved with the first wave of Unix-based microcomputers, in the early '80s. I have been working in software development, operation, installation and support since then.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

8 comments
Log in or register to join the discussion
  • Microsoft has been very successful

    with their new anti competition tool.
    dfolk2
    • This is not a Microsoft issue...

      Nothing in this article refers to Microsoft's Secure Boot Initiative.

      Both GPT and UEFI (nee EFI) have existed for years before the secure boot feature was added to UEFI 2.2. Both GPT and UEFI are public computing standards that are defined by a group of hardware and software companies. (Yes, the list includes Microsoft, but also other major players in the PC industry.)

      The issue is that LMDE (and the underlying Debian code) does not properly interact with EFI-based systems and GPT-managed hard drives. The "fault", as it were, lies with the Debian boot manager, and not from any Microsoft meddling.
      R_Connelie
  • Thank you...

    ...for all your very hard work, as usual. No telling how many thousands of man-hours you've saved all of us ( I absolutely refuse to recognize the namby-pamby political-correctness activists and no-lifers).

    Much as I absolutely admire M Lefebvre for his unbelievable hard work and dedication, I'm not going anywhere near LMDE; life is simply too short, and I chucked my masochistic tendencies quite a while ago.

    I'm certain that Clement will weather the self-destruction of the Ubuntu marque; indeed, I'd be very surprised if he doesn't have a well-thought-out, ready-for-prime-time plan ready to go.

    Once, again, from ALL of us: many, many thank-yous.

    Warmest regards...
    asatreee
  • And one more thing:

    I'm really disappointed by the lack of mindless, random, totally-off-topic, knee-jerk-responses which anything you publish seems to generate.
    My feeling is that you could write an excellent article on the virtues of eating fresh corn, and you'd get a response from one of your non-carbon-based lifeforms saying
    "Watson, you idiot, if you wasn't such a gatesophobe, you would already noe this by doing a search on Bling. and you wooden hafto comile anything"

    Where did you go off the rails, JA?

    Warmest regards...
    asatreee
  • You're probably right

    Sometimes it can be discouraging. But there have been two major experiences in my life which are useful in this regard:

    - Eight years of military service, during which I acquired very thick skin, particularly on my back side. Followed by...

    - A degree in Electrical Engineering, during which I learned about signal-to-noise ratios, and how to set filters. Set your noise filter high enough, and you don't even notice the irrelevant rubbish.

    Thanks for reading and commenting, as always.

    jw
    j.a.watson1
  • Very informative

    Great article this on whats happening . I wonder why Debian cant back port the eufi code from Ubuntu ? Or maybe I'm missing something fundamental here.
    spmccann
  • One more thank you

    As asatree said, your effort and hours dedicated to explanation of many topics saves the time, effort and work of many of us.

    Best.
    Josencler Ferreira
  • EFI boot with Ubuntu 13.04

    Quick question concerning EFI and Debian bootloader. I managed to install Ubuntu 13.04 in EFI mode, and though it works there are a few issues (like the bootscreen being replaced with a blank purple ish screen with no options or lettering), I just assumed I had made errors in the installation partitioning stage. I'm still very much a newb, and for the sake of personal progress have decided to begin the LFS project (today actually). From the impression I got from your article, I'm thinking it might be a good idea to go back to legacy/mbr for the sake of the project. Thoughts?
    Donald Grimes