Seven ways to set up multi-booting with Windows 8 and Linux

Summary:More trial and error attempts to set up multi-boot on my new laptop. Here's what I've learned to date.

A good bit of the feedback on my most recent post about installing Fedora on my new laptop was along the lines of "instead of telling us what doesn't work, please give us some information about what options we have which do work". 

Fedora 20: Hands on with five different desktops

Fedora 20: Hands on with five different desktops

That's good advice, and I'm happy to follow it. If all we do is sit around and moan about dual-booting Linux on UEFI systems, it really is likely to discourage some people from trying it, and the simple truth is that there are options that will work, without a massive amount of effort.

First, though, I will repeat something I have said many times before. Every UEFI firmware implementation is different - and not just a little bit different, either

Some work really well with Linux installations, dual-booting with no problem right from the start. Others are difficult, unpredictable and downright maddening in their inconsitency, and seem to go out of their way to prevent Linux booting. So if you want to dual-boot Linux and Windows, try to find a description written by someone with the same system you are using, or at least a system from the same manufacturer.

Ok, so what are the possibilities? 

1. Install the Linux GRUB bootloader

Well, the first and certainly the simplest if it works properly, is to install the Linux GRUB bootloader as the default boot object, and have it control dual-booting with Windows. 

To do this, of course, you have to have a UEFI-compatible Linux distribution - the ones I have tried and can vouch for are openSuSE, Fedora, Linux Mint and Ubuntu, but there are others and there are more coming in the near future. 

If you have a UEFI Secure Boot compatible Linux distribution, you don't even have to change the UEFI configuration settings, although a lot of people will choose to disable Secure Boot anyway. 

When you install a UEFI-compatible Linux distribution, if everything works as it should and the UEFI firmware configuration works properly and does not get improperly "reset" (which I have seen happen far too often), then when you reboot after installation completes you will get the GRUB boot menu, and you will be able to choose either Linux (the default) or Windows 8 to boot from it. 

At that point you are almost home free - but be aware that I have personally seen (and personally own) systems which at some later point will suddenly reset the configuration to boot Windows for no particular reason. If this happens, you should consider using one of the other methods described below, because my experience has been that it doesn't happen just once.

2. Use the BIOS Boot Select Key

The second possibility is that you choose a UEFI-compatible Linux distribution, the installation goes along just fine, but when you reboot it comes up with Windows rather than Linux. This can be very disheartening, but it is actually not that difficult to work with. 

The important thing to remember is that the Linux installation will have added itself to the boot list: you just need to be able to get to that list to boot it. 

The simplest way to do that is to use the BIOS Boot Selection option, which is activated by pressing a special key during the power-on or reboot process. That "special key" varies between systems, I have seen Escape, F9 and F12 used on some of my systems, and I'm sure there are others. 

When you press it, the Windows boot process will be interrupted and you will get a list of available operating systems - probably Windows 8 and Linux. I personally don't care for this option because I don't like to have to "race" with the boot process to make sure that I press the Boot Select key in time, and if I am distracted or too slow then I have to go all the way through Windows boot and then just immediately reboot to get back to the Boot Selection menu. 

But a lot of people don't seem to mind it, and it certainly is an option which requires a minimum of fiddling and fighting with stubborn BIOS configurations. One way that this can be made a bit easier is to go into the BIOS setup and choose a start-up delay, many systems will allow you to set anywhere from 5 to 30 seconds of delay before Windows actually boots, thus giving you a lot more time to press the magic key.

3. Enable 'Legacy Boot'

The third "simple" possibility is to enable 'Legacy Boot' in the BIOS configuration, and just ignore the whole UEFI issue. 

This is not an option that I personally prefer, in part because I am stubborn and in part because as Adam Williamson explained to me some time ago there are some functional advantages to UEFI boot. But it certainly is a viable option, and strictly in terms of getting Linux installed and booting it might actually be the absolute simplest solution. 

Experiments with my new laptop, Linux and UEFI

Experiments with my new laptop, Linux and UEFI

The only problem that I have seen with this option is that some systems make it difficult to enable Legacy Boot, either the option is well hidden in the BIOS configuration, or you actually have to set a BIOS password before they will let you change it. I have heard that there might be some systems which don't have Legacy Boot support at all, but I have never seen one like that.

Anyway, if you choose this route not only does it make things much simpler for installing and configuring dual-boot, it allows you to install pretty much any Linux distribution you want, without regard to UEFI compatbility. 

I have personally used this option to install non-UEFI Linux distributions, such as SolydXK, PCLinuxOS and Linux Mint Debian Edition in a multi-boot configuration with some other UEFI-compatible distribution. I can then go back and disable Legacy Boot, and just use the UEFI-compatible GRUB to boot the non-compatible Linux.

4. Try using the Windows bootloader

The fourth possibility should be to use the Windows bootloader to dual-boot with Linux. I say should be, because people keep posting comments which say "just use easyBCD to set it up", or even "use bcdedit", but try as I might I can't get it to work. 

I wrote about this a year or so ago, when I got my first UEFI system, and I assumed at that time that the problem was just that easyBCD was not completely adapted to support UEFI boot, but now I have tried it again, with the latest version of easyBCD that I could get from the NeoSmart web page and I still can't get it to boot Linux at all. 

Now, it may be that I am just too dense to figure it out, but if anyone is going to come along and post a comment that says "it works fine", then please be prepared to be very specific, and give exact details of what you did to get it to work. Because I have tried everything thing I can think of, and no matter what I do the only thing I get when I try to boot any Linux installation is a message that says "Windows Failed to Boot". 

I have also searched the web for more information, and the only concrete examples I can find are those who have failed, the same way that I have.  I can find lots of places that say "easyBCD works", and "use easyBCD to multi-boot Windows 8, 7, Vista, XP, MacOS and Linux", but not ONE which actually says "we did this with Windows 8 UEFI and LInux, it worked, and here is what you have to do".

What I did was the following.  I downloaded and installed easyBCD 2.2 on two different Windows 8 UEFI systems (the recently purchased HP Compaq, and my Acer Aspire One 725). When I then ran easyBCD (as administrator, of course), I was surprised that it came up with a list of operating system for its boot configuration. I know that the Windows bootloader had not been seeing or offering to boot anything other than Windows 8. It took me a minute to realize that what it was listing was everything which was in the BIOS boot list. 

That was exactly what was being offered if I used the Boot Selection option, as described above, but if I just let Windows boot normally there was no sign of these others. Even if I put a 30-second delay in Windows boot, using either bcdedit or easyBCD, it would stop and list only Windows 8.  So why was easyBCD listing all the others? I didn't understand, but I hoped that it might be a good sign, that easyBCD was at least finding the other options, and all I had to do now was add them to the normal WIndows bootloader menu.

I tried to do that, first by just marking one of the Linux distributions as the default boot object. easyBCD let me do that with no complaints, but when I rebooted it just came right back up with Windows. Bah.

Then I tried using the "Add" option in easyBCD, and gave all the information for one of the Linux partitions.  This time at least when I rebooted it showed the Linux option in the boot list, but when I tried to boot it I got the "Windows Boot Failed" message. I shouted at the blasted computer that I wasn't even trying to boot Windows, so how could that fail, but that didn't help either.

Then I saw that what easyBCD was actually setting up was an attempt to boot something called /NST/neogrub.efi (or some such thing close to that, I don't have the exact name in my head right now, and I am fed up with easyBCD and Windows, so I'm not going back to look again). 

So I tried putting various bootable files in with that name - first I tried the grubx64.efi image from one of the LInux distributions, then I tried copying the boot block (first 512 bytes) of the disk and/or Linux filesystem, as used to be done in order to dual-boot Windows XP and Linux, and then I got desperate and just put a Linux kernel under that name. Of course, none of those worked. 

I finally decided, based on my own experience and the lack of success stories or real configuration information on the web, that easyBCD is of no use whatsoever in setting up dual-boot Windows/Linux with UEFI boot enabled. It might be possible to use it if you enable Legacy Boot, and then set it up exactly the way that it used to be done on Windows XP, but if you're going to do that, then just use method three above, and save yourself a lot of trouble.

After fighing with easyBCD for a very long time, and finally surrendering, I decided to make a run at the bcdedit utility, which is the standard Windows approach to this kind of configuration. I am reasonably familiar with this program, as I have used it to set up dual-boot on Windows XP, so I wasn't exactly blundering around in the dark. 

But again, no matter what I tried it didn't boot. I could get the Linux item added to the Windows bootloader menu, and I could set all kinds of different things as the boot object, but none of them worked. Finally, just to prove to myself that I wasn't doing something just fundamentally wrong (or stupid), I just set the boot object of one of my Linux attempts to be Windows 8, and it booted right up. Grrrr.

So, my conclusion from all of this is that one of the major reasons that easyBCD is of no use in setting up Linux dual-boot is that it is basically impossible to use the Windows 8 bootloader to boot Linux with UEFI boot enabled. Again, it might be possible with Legacy Boot enabled, but I don't care enough at this point to find out. 

If you know that I wrong about this, and you have personally set up a Windows 8 system to boot Linux using the Windows bootloader, then please tell me this in the comments, and please, please be specific and tell me how you did it, because I would love to know.

5. Install a different Boot Manager

The fifth UEFI multi-boot option is to install a different Boot Manager, such as rEFInd from Roderick W. Smith. This has the advantage of being able to boot almost anything - Windows, Linux, MacOS - and it is very powerful and very flexible in automatically finding whatever might be on the disk and presenting you with a boot selection list. 

Unfortunately the one thing it doesn't solve is the "uncooperative/unpredictable BIOS configuration" problem described above. If Windows, or the boot process, or something else is monkeying around with the BIOS configuration and preventing you from permanently setting GRUB as the default bootloader, then it is almost certainly going to prevent you from setting rEFInd as well.

6. Try a workaround

The sixth option is not exactly a solution to the uncooperative/unpredictable BIOS configuration problem, it is more of an ugly workaround for it. 

It turns out that in addition to the normal "boot sequence" list in the UEFI boot configuration, there is also a "next boot" option, which specifices a one time boot configuration. 

This is normally null, so the system follows the boot sequence list, but if it is set the system will try to boot that item first, and will also clear that setting so that on the next boot it goes back to using the default boot sequence list. 

The next boot configuration can be set from Linux using efibootmgr -n XXXX, where XXXX is the item number from the boot list; to find out the number for your Linux installation(s), just use efibootmgr with no options (or efibootmgr -v if you want to see all the gory details): the number will be something like 0001 or 0002 in most cases. 

This "next boot" option could be turned into a semi-permanent work-around by adding the efibootmgr command to the Linux startup scripts, so every time you boot Linux it would reset the value so that it would boot Linux again the following time. I didn't say it was nice, or elegant, or even pretty, but does work, because I have tried it.

7. Trick the default boot process

Finally, the seventh option is to "trick" the default boot process by putting the Linux shim.efi (or grubx64.efi if you disable Secure Boot) image in the place where the Windows Boot Manager is normally located. 

On the systems I have tried, this is in the EFI boot partition (typically /dev/sda2 on Linux, mounted as /boot/efi), under the name /EFI/Microsoft/Boot/bootmgfw.efi.  I have had some success in doing this, but be warned that some systems (especially HP Compaq) are so aggressive about checking and resetting the default UEFI boot configuration that sometimes they will actually notice that it is not the "original" bootmgfw.efi program insttalled, and they will actually go and get a copy of the original and put it back in place, thus undoing your clever deception. You can probably imagine how irritating and frustrating it is when this happens...

So, there you have it.  Seven different options to set up multi-booting with Windows 8 and Linux. 

I suppose there are others that I have not thought about, or that I am not remembering right now, but these are what I think are the most obvious.

I have tried all of these at one time or another. The simplest and nicest of course is the first, just install and boot grub, if that works on your particular system. I also know some people who swear by the second option, just press Boot Select, and they think that I am just being lazy and stubborn by not using that.

Beyond those two, it would probably take more dedication, learning and trial and error to get the others working (some I still haven't gotten working). But in the long run, if you are determined to dual-boot LInux and Windows, you should be able to do it.

Further reading

Topics: Linux, Open Source, Operating Systems

About

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... Full Bio

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

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.