UEFI vs. Legacy booting; clearing some confusion

This post is prompted by a couple of case where people were having problems:

  • An opensuse mailing list thread here and continued here;
  • an opensuse forum thread here.

In both cases, the user had a UEFI capable computer, but wanted to install opensuse to use Legacy booting (also called MBR booting).  In both cases, they already had an installed Windows system that used legacy booting.  They wanted to install opensuse for legacy booting for better compatibility.

I usually prefer to install for UEFI booting.  That’s a better way of booting.  But in this case, the users were right that they should install for Legacy booting.

In both of these cases, the user thought that he had configured the BIOS to use legacy booting.  However, in both cases, the opensuse install  media was booted using UEFI.  And that is where things became confused.

What goes wrong?

If you boot the install media using UEFI, then the installer wants to setup UEFI booting.  It complains if you do not provide an EFI partition in the partitioning section of booting.  And it might possibly change the disk partitioning to GPT partitioning, which confuses Windows that is legacy-booted.

The second user cancelled the install before it broke anything, and asked for help.  The first user installed anyway, and finished up with more serious problems.

The general principle is this:  if you want your installed system to use legacy (MBR) booting, then make sure that you boot the install media in legacy mode.  If you want it to use UEFI booting, make sure that you boot it in UEFI mode.

How can I tell?

You have booted the install media.  How can you tell whether it booted in legacy mode or UEFI mode?

At least, for opensuse, it is fairly easy to tell.  The boot screen (with a boot menu) for legacy mode has notations for using function keys (F1, F2, etc) near the bottom of the screen.  If you instead booted in UEFI mode, those function key options will not be there.

With opensuse, if you used legacy booting for the install media, then the booting is done with “syslinux” (or “isolinux”).  And “syslinux” allows more flexibile formatting of the boot menu, including those function key options.

With UEFI booting, the install media uses grub2 (really, grub2-efi).  The boot screen is more spartan.  When you select a menu item (with up/down keys), there will be a hint telling you to enter ‘e’ if you want to edit the boot command line.  Those indicators will help you recognize how you booted.

As far as I know, it is similar for other opensuse distros.  Usually, grub2-efi is used for UEFI booting and syslinux is used for legacy booting of the install media.

What decides how to boot?

How to boot the install media is entirely up to the firmware of your computer.  One of the users with problems thought it might be an opensuse bug.  But that is not possible.  The first steps for booting are taken by the firmware (or BIOS).  If you want to make sure that you boot the install media in legacy mode, then you have to set the BIOS that way.

Unfortunately, BIOS settings screens are often cryptic, so it can be hard to find what you have to set.  In both cases that I mentioned, the users were convinced that they had set the BIOS to use legacy booting.  They evidently had not actually done that.  What they had done, is set the BIOS to provide legacy booting support.  But if the media can be booted in either way, then the BIOS gets to choose.  So the BIOS settings are important here.

The first user with problems eventually found how to set his BIOS.  But he found it after he had installed (and while trying work out how to boot the installed system).  The second user never did find out the right BIOS settings.

It is, of course, possible that some BIOS (now or in the future) might not provide enough options.

Can I force legacy booting of installer?

If you are unable to find a suitable BIOS setting, what can you do?

Here are some possibilities:

  1. Install the 32-bit version of opensuse.  At present that only supports legacy booting.
  2. Use live media (live Gnome or live KDE system), and put it on a USB flash drive using the “live-fat-stick” script.  That script will generate a USB only capable of legacy booting.  This won’t work for the DVD installer, which is too big for a FAT file system.
  3. Use the DVD installer from a USB flash drive.  Prepare the USB drive as described in the opensuse Wiki.  Then look at that flash drive with “fdisk”.  You will see that there are two partitions.  The first partition is small, and has type code “ef”.  It is the EFI partition.  Using the linux “fdisk”, delete that partition and save your changes.  Do not change anything else.  This will make the USB incapable of UEFI booting, so the BIOS will only be able to boot in legacy mode.

Can I boot the installer with UEFI but install legacy?

I think so, but I have not fully tested this.  If you try this, I recommend that you do all partitioning before you start the installer (maybe with “fdisk” or “gparted”).  Some reports suggest that if you boot the media in UEFI mode, the partitioner will want to change to GPT partitioning.  If you do the partitioning outside of the install, then you should avoid that problem.

The installer will still take you to the partitioning section.  There, you can select “create partitioning”.  That gives a list of partitions.  You can right click and select EDIT on a partition to change how it will be used.  If you do not create or delete or resize any partitions, you should avoid the problem of conversion to GPT (but I have not tested this).

The installer will then give some warnings and say that your system might not be bootable.  You will have to ignore the warnings and continue.

When you get to the install summary screen, click the heading for “Booting”.  It will tell you that the bootloader will be “grub2-efi”.  You must change that to “grub2”.  Then make any other appropriate changes (maybe it won’t need anything else).

Then proceed, and it should work.

I may test this within the next few weeks, in which case I will post about what I learn from that test.

Advertisements

Tags:

About Neil Rickert

Retired mathematician and computer scientist who dabbles in cognitive science.

Trackbacks / Pingbacks

  1. Legacy install on a UEFI box | Thoughts on computing - 2015/02/04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: