Before explaining the steps to do it I want to be clear that I have tried many ways of installing Ubuntu (Or any other distro for that matter) from within Windows 8. No luck. Microsoft Windows really created a big mess for all Linux distributions. If you have a pre-installed Windows 8 system, you will probably never be able to install Ubuntu or any other OS in the normal (LiveCD/LiveUSB) or Wubi way. This is because Windows 8 introduced several new features, of which 2 are:
- UEFI which substitutes what we have known as the BIOS (Is an alternative to)
- Secure Boot which prevents anything but the installed operating system, in this case Windows 8 from booting.
On a further note I want to mention something about Secure Boot taken from the UEFI Wiki
"Secure Boot" is a new UEFI feature that appeared in 2012, with Windows 8 preinstalled computers. Ubuntu supports this feature starting with 12.10 64 bit (see this article) and 12.04.2 64 bit, but as PCs implementing support for it have only become widespread at the end of 2012 it is not yet widely tested, so it's possible that you may encounter problems booting Ubuntu under Secure Boot.
If you do, please file a bug report against the shim package in Ubuntu, preferably using the command:
once you've installed with Secure Boot disabled. Please read the comments below this answer by slangasek.
So with all of this said, installing Ubuntu via WUBI is not doable (Not recommended at least from me), things like trying to boot for example with the Windows 8 bootloader are not possible right now unless something changes in the future (There are also some bugs related to this in launchpad, like the one mentioned by bcbc).
Not only that, but trying to install Ubuntu with the 32 Bit is impossible. You need the 64 bit version for everything to work correctly.
The following is a small guide to install Ubuntu with a Pre-Installed Windows 8 system. The steps HAVE TO BE done in the precise order I mention them here to get everything started. If a step is skipped or done before another, you will most likely end up with some of the problems mentioned at the bottom of this guide.
For the time, you need to do it via a LiveCD, LiveDVD or LiveUSB, assuming (actually requiring) you have the following points:
- You are using a 64-bit version of at least Ubuntu 12.04.2. I would recommend 12.10+.
- Your system came with Windows 8 pre-installed (And you do not want to delete it)
- Your system has UEFI activated (And can not be disabled) with Secure Boot.
- You have already created a free space for Ubuntu from within Windows 8 with at least 4GB (I recommend to leave at least 20 GB or so, so you can test the hell out of it).
- You know how to burn a LiveCD, LiveDVD or LiveUSB from within Windows 8. If not, look for Windows apps that can do that for you. I do mine in another PC with Ubuntu ^^.
- Windows 8 was not shutdown in either Hibernation mode or any other mode that leaves it on a saved state. Shut Windows 8 in the normal way, with the shutdown option. This will prevent other problems related to this from appearing. Read the bottom of this answer for more information regarding this point.
Before we start we need to do the following:
Run compmgmt.msc on Windows 8. From there on, create a partition with enough size. Note that I mention creating this FROM Windows 8 because I have had cases where doing the partition from the LiveUSB rendered Windows 8 unbootable, even after doing a boot repair. So to remove that problem or have a greater chance of removing it (Or simply skipping the problem altogether) and making sure both systems work, partition your hard drive from within Windows 8 first.
Now follow this steps to have a working Windows 8 + Ubuntu installed on your system:
Windows 8 + Ubuntu
We first need to know with what type of motherboard options we are dealing with. Open a terminal (By going to the start menu and typing
powershell for example) and run the terminal as an Administrator (Right Click the app that will show in the start menu and select Run as Administrator). Now type
Confirm-SecureBootUEFI. This can give you 3 results:
True - Means your system has Secure boot and is Enabled
False - Means your system has Secure boot and is Disabled
Cmdlet not supported on this platform - Means your system does not support Secure boot and most likely you do not need this guide. You can install Ubuntu by simply inserting the LiveCD or LiveUSB and doing the installation procedure without any problems.
If you have it Enabled and have the necessary partitioning done then we can proceed with this guide. After booting into Windows 8 we go to the power off options and while holding the SHIFT key, click on Restart.
(This is a really old trick on most Windows, even since Windows 3.1 where you hold a key to do something special when rebooting)
Windows 8 will show you a totally different restart window:
When you get the menu above, select Troubleshoot
You will then get the following options:
Select UEFI Firmware Settings
THIS IS AN IMPORTANT PART
The system will reboot and you will be allowed to go to the BIOS (If not press the appropriate key, some common are DEL,F2 or F10).
In this part I can't help much since each BIOS is different for each Motherboard model. There are 2 options you can take here, both of which are optional since Ubuntu might install without any problems at all. You can either look for an option to disable Secure Boot or an option to disable UEFI. In some cases you will be able to find both, it will show in the BIOS as an option called Secure Boot or Enable UEFI.
If you find this options, then depending if you can not install Ubuntu with Secure Boot enable then disable Secure Boot (Remember to report this as a bug using
ubuntu-bug shim), to be able to still stay in UEFI mode and also be able to Boot with Ubuntu. In some motherboards, this will be the only option you actually need to change and also will be the only option you see related to UEFI because they will not offer the possibility to disable UEFI.
In other motherboards that do offer the possibility to disable UEFI which would completely eliminate UEFI and Secure Boot on it and boot in the normal BIOS like way, if you find this is the way you want (To have a UEFI free computer and not face any of the problems related to this) then by all means do it. I for one have tested the Intel DZ68DB and did both case studies.
Remember to also select the Boot Order to make sure that it boots either your CDROM, DVDROM or USB Drive so you can boot from your Live Ubuntu image after rebooting.
Some points we should consider before continuing:
If Windows 8 was installed with UEFI enabled, it is recommended to stay in UEFI, but you can actually disable it and after installing Ubuntu, GRUB will create the bootable part for Windows 8. But in the case where you disable UEFI and want to access Windows 8 afterwards (before installing Ubuntu), it will not work since the boot part for Windows 8 needs UEFI.
If you only disable Secure Boot, there is no problem. You are only disabling the part that creates the most problem between Windows and Linux, which is the one that prevents Ubuntu from booting correctly. In either case, if you disable any of them and install Ubuntu, you will be able to boot to Windows 8 afterwards through the GRUB Boot Menu.
Now before saving, some motherboards offer a Boot Mode option. Verify that this option is not pointing to UEFI Boot but instead to CSM Boot (Compatibility Support Module) which provides support for Legacy BIOS like systems.
Other systems offer a UEFI Boot option you can enable or disable. Depending on the options I mentioned above you can set this to the one you want.
And lastly others offer a UEFI/Legacy Boot First option where you select which one you wish to use first. Obviously the option is self explanatory.
Now save the changes and reboot.
When the Ubuntu Live image starts, it will show rather different than the normal one we are all used to. Do not worry, this is because Ubuntu has an alternative boot option when a system has EFI installed. Just select everything like you are used to. I highly recommend reading the following article in the Ubuntu site regarding Ubuntu installations when using UEFI. If there is a problem, then try to create a small partition (About 250 MB of size) for the EFI part of the system. This is done in the installation part where it asks you if you want to install on a desired partition or used the Advanced Options. Select the advanced options if you come up with a problem. In there, create a 250 MB partition for EFI and the rest for GRUB and other stuff you are accustomed to.
After finishing the installation, if you happen to have Windows 8 disabled from booting and it only boots to Ubuntu, do not worry. In Ubuntu after it boots, open a Terminal and type the following:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair
Boot Repair will mention that we have some GRUB error, that we have an EFI system and that Ubuntu rocks. Since Ubuntu rocks (It does not work if Ubuntu does not rock! ^^), just click on Apply so boot repair fixes everything. Now reboot and you should see Windows 8 and Ubuntu side by side.
I think up to here you should be fine and have avoided several problems typically found when trying Ubuntu with Windows 8 which are:
- Not booting a LiveCD/LiveDVD/LiveUSB/Wubi
- Not installing Ubuntu because of security issues (Yeah right, more correctly monopoly issues)
- Not booting either Windows 8 or Ubuntu (not showing either one of them)
- Not letting Ubuntu create a partition
- Not recognizing the EFI part of the system
- Ubuntu not recognizing Windows 8 Partition
- Windows 8 not booting or readable because or partition changes done from Ubuntu
If you experience one of the following issues:
- Loosing Data when copying from Ubuntu to Windows 8 after shutting down Windows 8
Can not access your Windows partitions from Ubuntu getting a Disk contains an unclean file system
This is most likely the cause of an option in Windows 8 called Fast Startup which behaves similar to hibernation and keeps a snapshot of the system so when you boot up, it will load faster. Since it keeps a snapshot, anything you copy or change in Windows 8 from Ubuntu after doing the fake shutdown will be lost (Apart from other issues found HERE).
The solution in Windows 8 is to go to:
Control Panel --> Power Options --> Choose what the power button does
In here click on "Change settings that are currently unavailable" where you should see something like this:
Uncheck the option that says "Turn on fast startup"