Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported)
http://askubuntu.com/questions/221835/installing-ubuntu-on-a-pre-installed-windows-8-64-bit-system-uefi-supported
If you are using Ubuntu 15.04+, many issues are now solved, so there is no need to follow this guide except if you are using any Ubuntu version older than 15.04. Depending on the version you are using (12.04, 14.04, 14.10) you might need all or some of the steps provided in this answer.
If however, you are using 15.04+, rejoice!, in all tests I have done with 15.04+ there was no need to do any of the steps mentioned here, so enjoy Ubuntu in all of it's booting glory!.
For the rest, before explaining the steps to do it, I want to be clear that I have tried many ways of installing Ubuntu with versions older than 15.04 (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 (an alternative to)
- Secure Boot which prevents anything but the installed operating system, in this case Windows 8 from booting. This is no longer the case for Ubuntu since 12.04.2
On a further note I want to mention something about Secure Boot taken from the UEFI Wiki
SecureBoot
"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.
IMPORTANT: If you do find a bug, please file a bug report against the shim package in Ubuntu, preferably using the command:
ubuntu-bug shim
once you've installed with Secure Boot disabled. As mentioned by slangasek:
It is not required to disable SecureBoot in the firmware to install Ubuntu on a Windows 8 machine. Ubuntu 12.04.2 and 12.10 are SecureBoot-compatible. Any machine that ships with the recommended Microsoft Third-Party Marketplace keys in firmware will be able to boot Ubuntu under SecureBoot. If there is any problem file a launchpad bug for the shim package.
I also want to notify that I spend this week testing 15.04 and had an excellent outcome. Of 12 Laptops ( 4 Toshibas, 3 HP & 5 Lenovo) where Windows 8.1 was pre-installed, on all cases, Ubuntu detected the Windows Boot Manager correctly, gave the option to install alongside Windows 8.1 (It actually said Install alongside Windows Boot Manager) and solved any issues that appeared on previous Ubuntu versions. I basically did not have to do anything else on this cases. This was with Secure Boot on and on an EFI enabled boot system.
This does not mean that in your cases it will work perfectly, it just means that on my cases, I had a 100% Ubuntu Perfect installation. Again, with 15.04 (On all cases it was 64-bit).
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). Apart from this, WUBI does not work from within Windows 8 if you have UEFI with a GPT Partition (Not MS-DOS type partition). Pleas read Does UEFI support mean Wubi will now work on laptops shipped with Windows 8? for more information.
Not only that, but trying to install 32 bit Ubuntu is impossible. You need the 64 bit version for everything to work correctly. Read more about Wubi in Can I install Ubuntu inside Windows?
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. 32-bit versions will not work.
- Your system came with Windows 8 pre-installed (And you do not want to delete it)
- You are not installing Ubuntu inside of Windows 8 but rather alongside of it. Inside of it is impossible because it needs Wubi which is unsupported.
- 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 8 GB (I recommend to leave at least 20 GB or so, so you can test the hell out of it).
- You made sure that you actually have free space left on the drive to create the needed partitions and you also made sure that you did not have all primary partitions used (In case of using an MS-DOS Scheme) because this will create a problem with the Ubuntu installer showing you only the "Replace Windows" option instead of the "Alongside Windows" option.
- 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 ('fast start-up' which is by default on Windows 8) that leaves it on a saved state. Shutdown Windows 8 in the normal way, with the shutdown option. This will prevent other problems related to this from appearing. Read the bottom (TROUBLESHOOT) of this answer for more information regarding this point.
- You are installing on an MS-DOS type disk scheme (You can only have 4 primary partitions as opposed to GPT Scheme) which has at least 1 Free Primary Partition. Remember that if you are already using 4 Primary Partitions no partitions will appear on the Ubuntu installer since there are no more Primary partitions left to use (MS-DOS type partitions are limited to 4 Primary ones, GPT are limited to 128). This happens a lot on many laptops that come with 4 pre-created primary partitions. If you are installing on a GPT type partition and want it to boot, you need to leave UEFI enabled.
PLEASE READ THE ABOVE POINTS SINCE MANY USERS JUMP THIS PART AND WHEN THEIR PROBLEMS ARE FOUND IT NORMALLY IS BECAUSE THEY DID NOT FOLLOW ONE OF THEM.
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
NOTE - In the Spanish version of Windows 8, the option for UEFI Firmware Settings is not available in several laptops, tested Lenovo, HP and Acer. They do have an option to boot the computer and another custom menu will appear which lets you do a couple of things. In the case of Lenovo you will not have an option to install Ubuntu with Windows 8, the only option is to remove Windows 8 completely. This only applies if you are not using 15.04+.
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.
DUAL BOOT ISSUES
I would also like to mention an important note here. If you happen to install Ubuntu in Legacy Mode (No SecureBoot) you might have problems booting both, Windows and Ubuntu at the same time since they will both not appear on a Dual-Boot Menu. If you have Windows on UEFI for example and you install Ubuntu on Legacy Mode, you will only be able to boot to Ubuntu on a Legacy Mode and Windows on an UEFI Mode.
So before proceeding, make sure that you are installing Ubuntu with the same boot options as Windows. This way you will be able to choose which one to boot from in the same boot menu and not worry if one will work or not. From the Ubuntu UEFI Guide you can see that there is a section that teaches you how to know if you actually installed Ubuntu in the same Boot setup as Windows (UEFI Mode):
An Ubuntu installed in EFI mode can be detected the following way:
its /etc/fstab file contains an EFI partition (mount point: /boot/efi)
it uses the grub-efi bootloader (not grub-pc)
from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command:
[ -d /sys/firmware/efi ] && echo "Installed in EFI mode" || echo "Installed in Legacy mode"
So if you have ANY dual boot problems, this could be the problem. Please read the Ubuntu UEFI Guide since it covers various ways on solving Dual boot problems and converting Ubuntu to Legacy or EFI mode. I have already tested this with various Ask Ubuntu members that helped me apart from 2 Laptops I was provided with for the testing. This should then solve any Dual Boot problems related to Windows 8 + Ubuntu, but I again encourage anyone with problems (same or new) to file a bug report as mentioned above. The Ubuntu Developers are working very hard in providing an easy to install solution for all cases and this is one of the top priorities.
Continuing with the guide, 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 that doing so will make the Dual Boot process not work in almost all cases you will be left with a system that either Boot Windows in UEFI or Boots Ubuntu in Legacy.
With that in mind, 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 highly recommended to stay in UEFI, although if you still want to disable it for specific reasons you can, GRUB will create the bootable part for Windows 8. But if you do 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 (Again the Dual Boot problem).
If you only disable Secure Boot, there is no problem in some cases. 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, I encourage you to first try to install Ubuntu with UEFI/Secureboot, since in most cases it will work. if you disable any of them and install Ubuntu, you might not 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.
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
- Not seeing GRUB and booting directly to Windows
- Windows 8 not booting or readable because or partition changes done from Ubuntu
TROUBLESHOOTING
YOUR COMPUTER BOOTS DIRECTLY TO WINDOWS
This is a common problem and if you do not get a GRUB menu , re-installing or repairing grub will NOT HELP
Every BIOS/EFI system is different, it might look like one of the following pictures:
Notice the "UEFI Boot Option Priority" or "Boot Option Menu" . Usually Windows is the default and Ubuntu (or as in the second picture elementary OS) will be an option.
Once you select Ubuntu on the UEFI boot menu you will then get a grub menu. You should be able to boot either Ubuntu or Windows from the grub menu.
Another issue that could make the system boot directly to Windows (without even showing the GRUB menu) is if either Windows took hold of the boot manager or after installing Ubuntu, the EFI partition was not properly configured for Windows. To solve this, simply go to Windows and open a terminal, then type the following (Need Administrative Privileges):
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
This will configure the Windows Boot Manager to take into consideration the GRUB Boot Manager. This could still happen even after running the Boot Repair from within Ubuntu. So making sure that Windows reads the Ubuntu EFI partition, in case you are using an EFI boot system instead of the old BIOS will solve it.
Windows 8.1 Not Recognized / Ubuntu not showing option to Install Alongside
If you have followed all the steps above including making a partition ahead of time through Windows 8.x, proceed with the normal Ubuntu installation. When you arrive at the option to how you would like to install it, if you do not see the option to install Alongside of it, select "Something Else" instead of wiping the hard drive. Configure the new partition layout on the empty space you've set aside that isn't Windows 8.
You need to create at least 1 partition for the root system (Which shows as the symbol "/") and set it to Ext4, another for SWAP (Virtual Memory). The SWAP space can be as small as 128MB if you have a lot of ram or as high as 4GB. With this 2 partitions created based on the empty space you provided you should be ready to proceed. And one last one for the EFI part which should be around 100MB.
When the installer asks where to put the bootloader, tell it to put it on the partition with the type "efi". This will install GRUB which will load once your system starts in the future which will give you the choice of going with Ubuntu (or whatever flavor is installed) or going to the Windows Boot Manager which will take you to Windows 8.
I would also recommend reading the following links to get additional information of some issues and causes in this particular part:
REPAIRING THE BOOT
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, install Boot-Repair in Ubuntu by opening a Terminal and typing the following:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair
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.
For cases with rare booting problems, partitioning or using old hard drives on newer motherboard, your solution might be checking out FixParts which solves misaligned partitions and other partitioned type problems.
If you are experiencing 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". You also need to disable hibernation. You can to this with this command (you need to be in a console with admin rights):
powercfg.exe -h off
This should remove the hibernation file and enable partition to be mounted in Ubuntu.
A demonstration video is now available on this issue. We can install Ubuntu 12.04.2 (64 bit versions) onwards with SecureBoot enabled. But we need to disable the SecureBoot after the Boot Repair step.
Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported)的更多相关文章
- 制作ubuntu启动U盘:Windows,Mac osx ,Ubuntu
1.How to create a bootable USB stick on Windows https://www.ubuntu.com/download/desktop/create-a-usb ...
- 共享文件 Ubuntu下安装Samba与Windows
Author:Xianghai Ding.Date:2019/01/08**************************************************************安装 ...
- NVIDIA-docker报错:docker-ce (= 5:18.09.0~3-0~ubuntu-xenial) but 18.06.0~ce~3-0~ubuntu is to be installed
报错: The following packages have unmet dependencies: nvidia-docker2 : Depends: docker-ce (= 5:18.09.0 ...
- Windows+Ubuntu双系统如何设置Windows为第一启动项
在安装双系统的时候,如果先安装的是Windows然后再安装Ubuntu系统,开机时是以Ubuntu的grub来引导Windows的,而且默认进入Ubuntu系统,下面我们介绍如何更改这个默认项,然后让 ...
- 上传文件到Ubuntu阿里云服务器(windows到Linux的文件上传)
上传文件到Ubuntu阿里云服务器(windows到Linux的文件上传) 最近在阿里云上面租了一个轻量级服务器玩玩,学习学习怎么在服务器部署网站.然后嘞,在想要将本地文件上传到服务器的时候,自己研究 ...
- Compile Graphics Magick, Boost, Botan and QT with MinGW64 under Windows 7 64
Compile Graphics Magick, Boost, Botan and QT with MinGW64 under Windows 7 64 Sun, 01/01/2012 - 15:43 ...
- ubuntu 到底是选择32位还是64位?
ubuntu 到底是选择32位还是64位? 2011-06-03 15:16:31 标签:ubuntu linux 休闲 cpu 职场 原文出处:官方wiki原文作者:授权许可: 创作共用协议Att ...
- python一些模块的exe安装包在windows的64位系统里识别不到已安装Python目录的解决方法
在windows里安装python一些模块时候,有时候源码安装比较困难,pip install也各种报错,这时候最喜欢用别人编译好的exe或者whl文件来安装,但是在windows的64位系统里,如果 ...
- [置顶] 如何在Windows 7 64位安装Python,并使用Matplotlib绘图
1. 安装Python 我使用的是Windows 7 64 bit,所以我从Python官网下载python-2.7.5.amd64.msi,安装步骤如下: 1) 安装windo ...
随机推荐
- x264_param_t结构
typedef struct x264_param_t { unsigned int cpu; // CPU 标志位 int i_threads; // 并行编码多帧; 线程数,为0则自动多线程编码 ...
- 网站开发常用jQuery插件总结(15)上传插件blueimp
在介绍这个插件之前,先吐槽一下.这个插件功能很强大.带有的功能有:上传(单个文件或批量文件),自动上传或点击按钮上传,上传前缩略图显示,判断文件格式,上传前的文件操作,上传时进度条显示等功能.如果你用 ...
- 学习JS
原型是Js中非常重要的概念,每个函数(在Js里面函数也是对象)都有一个叫prototype即原型)的属性,不过在一般情况下它的值都是null,但它他有一项非常重要的功能就是所以实例都会共享它里面的属性 ...
- HTML实体
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- 在ecshop商品详情页显示供货商
好久没写文章了,隐约记得前几天有人问到这个问题:[如何在ecshop商品详情页面显示该商品的供货商?] 今天有时间整理下,分享给大家. 注:以下修改适用于ecshop2.7.2,其他版本未做测试. 1 ...
- LFS实践
用了三天,编译了两次LFS,把LFS的基本流程和原理都弄清了.用的是LFS 6.3,使用的教程是LFS速成手册(6.3) ,感觉很不错,如果按照它的做法,一步一步来,基本都能编译成功而且没什么错误.不 ...
- 二师兄VPN加速器
http://www.2-vpn2.org/home.action?ic=B003CC4C47
- csu 10月 月赛 A 题
Welcome to CSU OnlineJudge Problem A: Small change Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 15 ...
- 如何解决jquery版本冲突
<!-- 引入1.6.4版的jq --> <script src="<a href="http://ajax.googleapis.com/ajax/lib ...
- DevOps on Android: 加速 App 从代码到上线
DevOps 是一个众所周知的开发方法,其主要目的是自动化软件交付.事实上,DevOps 的目标是不断的测试,代码质量,功能开发,更容易维护版本.因此,DevOps 的一个最终目标是为开发者进行快速, ...