More on booting: a practical Fedora UEFI guide, and don’t use “universal” USB stick writers

Yesterday I penned another tome on UEFI. In contrast to my blog post, this is more of a practical guide to installing Fedora on UEFI-capable systems: it doesn’t go into the technical details of how UEFI works, it’s more just about what you should and shouldn’t do when installing Fedora to UEFI-capable systems in various circumstances.

On a related topic, if I can put in a word on so-called “universal” tools for writing bootable images – like Fedora live or install images, for instance – to USB sticks: they’re never actually “universal”, and it’s usually a bad idea to use them.

I’m talking about tools like UNetbootin and Universal USB Installer. Don’t use them, and don’t let your friends use them. Mail them to your enemies.

I haven’t looked into them all very deeply, but everyone who’s done support for a Linux distribution can probably tell you that they’re often the cause of “mysterious” failures in booting USB sticks. A lot of them, as far as I can tell, seem to just dump the contents of the image onto the stick and then stick a syslinux bootloader onto it.

This comes with myriad problems. I haven’t seen a “universal” USB stick writer which came close to writing something that would boot in native UEFI mode, for instance, never mind boot properly on a Mac. By contrast, distributions like Fedora and SUSE and Arch quite carefully tune their images so that if you write them with a dd-style tool, or the distribution’s supported USB stick writing tools, you will get a stick that does boot in all these ways.

Although they usually manage to write a stick that boots in BIOS-native mode on a PC, you can’t rely on it booting properly, or being reliable for doing installations. For instance, the way non-live Fedora installation images are set up to boot from USB is for the early init stage to look for a filesystem with a particular label to find the installer itself – if you look at the kernel parameters when booting a Fedora DVD or netinst image written to a USB stick, you’ll notice something like inst.stage2=hd:LABEL=Fedora\x2020\x20x86_64, and that’s what that means.

When you write a Fedora image to a USB stick with a correct tool, it will apply the correct label to the correct filesystem to make this work. If you use a “universal” tool, it may well not, and you’ll be left wondering why the boot fails with an error like Warning: /dev/root does not exist. This is why.

So: don’t use these “universal” tools, or at least if they fail, don’t report it to your distributor, report it to the tool. For Fedora, the guide to writing images to USB sticks the safe way is here (it’s also covered in the Installation Guide, though that’s usually a bit behind the wiki page). SUSE has three pages: Linux, Windows and OS X. Arch’s page is here. Ubuntu’s is here. Mageia covers it along with other media types here – their images are hybrid like Fedora’s, SUSE’s and Arch’s, so the graphical direct write utilities described in the Fedora, SUSE and Arch instructions should work for Mageia as well.

11 Responses

  1. carlos
    carlos February 4, 2014 at 1:05 pm | | Reply

    Thanks, i did not know this.

  2. hermelijn
    hermelijn February 4, 2014 at 3:08 pm | | Reply

    unbalievably that is shows up at hit #1 in google already, I bearably was able to reply at bugzilla :-).
    Anyway, I want fall for this one again, so thanks for your time!

  3. finid
    finid February 4, 2014 at 6:39 pm | | Reply

    Hey, Adams, you are telling people to not use UNetbootin when even the official Fedora wiki you linked to lists it as an option. Yes it does come with a caveat, but it’s still listed as an option on your official wiki.

    For the record, I’ve been working on a number of UEFI-related tutorials since yesterday, using UNetbootin on Fedora 19 KDE to transfer the ISO images to USB. It works, you just have to know what to do.

    Installing a Linux distribution via USB in UEFI mode is not a problem. The pain in the neck is dual-booting with Windows in UEFI mode.

    So UNetbootin works. I’ve been using it all day, no problems.

  4. kparal.wordpress.com/
    kparal.wordpress.com/ February 5, 2014 at 12:48 am | | Reply

    It’s very unfortunate that we nurture our NIH syndrome and develop our own USB writers (two of them, not counting dd). If we participated upstream in those “universal” writers, the world could be a better place. For developers, for users, for QA.

    So, even though you’re completely right in this article, it’s also a sad demonstration how much we fail in this area.

  5. Steven Rosenberg
    Steven Rosenberg February 5, 2014 at 9:28 am | | Reply

    Can you comment specifically on Fedora’s Live USB Creator and whether or not it should be used for Fedora installations.

  6. BubbaButch
    BubbaButch February 8, 2014 at 7:09 am | | Reply

    Can anyone tell me a reason I should be interested in UEFI if I have built a system from scratch rather than convert a Windows 8 system that comes with UEFI turned on in the BIOS. I have the option to turn it off so I did after have massive issues in an older version of LINUX.

    Is there a reason to use UEFI is LINUX is the HOST OS ??

You can comment without reCAPTCHA by using an OpenID as the URL, or logging in with an OpenID or an old site account.

Leave a Reply