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:

  1. 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).
  2. 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.

时间: 2024-10-12 21:22:01

Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported)的相关文章

[Android]Samba服务器在Ubuntu下的配置与Windows系统间的数据共享

安装Samba 安装sambasudo apt-get install samba[编辑]Kubuntu 安装系统设置的共享模块sudo apt-get install kdenetwork-filesharing[编辑]配置 1.windows 访问 ubuntu 第一步创建共享目录: 比如要创建/home/用户名/share首先创建这个文件夹 (这个用户名就是你的用户名,为了方便易懂我才这样写的,到时记得自己改啊) 代码:mkdir /home/用户名/share (新建share文件夹)c

【Linux】跳过ubuntu grub2引导,使用Windows引导ubuntu

本文转载自:http://tieba.baidu.com/p/3182877071 先来欣赏一下各种引导.windows 8.1 的metro引导. ubuntu的grub2引导. windows的传统黑白引导. 废话不多说,直接上教程. 情况一:先装windows,后装ubuntu.这种情况开机首先显示ubuntugrub2引导菜单,选择windows后再出现windows的引导菜单,这样一来当我们windows用的比较多的时候,就要经过两次的引导.为了更快速地进入windows,我们可以跳过

windows 2003 64位系统php运行报错:1%不是有效的win32应用程序解决办法

windows 2003 64位系统php运行报错:1%不是有效的win32应用程序 解决办法:运行-CMD cscript c:\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

Windows下64位Apache服务器的安装

转自:http://www.blogjava.net/greatyuqing/archive/2013/02/13/395308.html 首先需要说明的是,Apaceh服务器没有官方的64位版本,只有民间的高手自己制作的.下面是具体的安装步骤. 在https://blackdot.be/download-archive/ 下载64位的Apache服务器.目前的版本是2.2.19,下载之后的压缩包名为httpd-2.2.19-win64.rar: 将该包解压至一个目录,如我的目录为E:\Apac

python一些模块的exe安装包在windows的64位系统里识别不到已安装Python目录的解决方法

在windows里安装python一些模块时候,有时候源码安装比较困难,pip install也各种报错,这时候最喜欢用别人编译好的exe或者whl文件来安装,但是在windows的64位系统里,如果有一些安装包没怎么考虑过在64位系统上的安装,在安装时候就会找不到你自己安装的python目录. 解决法子:运行国外这个脚本,即可把你64位系统上的python目录添加至注册表里. # # script to register Python 2.0 or later for use with win

Windows无法连接到System Event Notification服务的解决办法

前几天安装了一个Windows漏洞补丁,装完没啥问题,但是接下来几天就莫名其妙地出问题,每次开机后资源管理器先挂一次倒也罢了,难以忍受的是本来网络好好的,突然就什么都连不上了,必须清理DNS缓存重启才能解决问题,而重启后又会挂一次资源管理器--虽然这种断网的情况出现频率不高,但是联系几天每天一次已经够麻烦了. 联想到前几天刚打的补丁,怀疑是这个补丁的问题,于是怒卸补丁立即重启,问题来了:开机奇慢(大约2~3分钟),进入桌面后所有网络都不可用,并且右下角气泡警告,信息大致是这样: Windows无

Windows无法连接到System event notification service服务

issue symptom: 某日打开电脑,在输入用户名和密码后,出现错误提示:Windows无法连接到System event notification service服务. solution: 推测为网络winsock目录服务出现问题. 按住电源键5S强制重启,按F8进入安全模式. 打开cmd命令窗口, 输入netsh winsock reset catalog.  然后重启正常登陆即可.

Windows 7 64位系统安装网络打印机驱动

声明 作者:昨夜星辰 博客:http://yestreenstars.blog.51cto.com/ 本文由本人创作,如需转载,请注明出处,谢谢合作! 目的 Windows 7 64位系统安装网络打印机驱动. 环境 系统:Windows 7 64位 步骤 1.依次单击开始→设备和打印机→添加打印机→添加本地打印机: 2.选择创建新端口,端口类型保持默认的Local Port即可,单击下一步,输入端口名\\192.168.1.69\Printer(这里应该填共享打印机的路径,读者应该根据自己的环境

windows 10 64位安装Python3.6.4

1.下载Python3.6 windows版本的安装包 Python官网地址:https://www.python.org 下载软件包:python-3.6.4.exe 2.安装Python3.6版本,右击软件,以管理员身份运行,选择自定义安装,在此勾选"Add Python 3.6 to PATH"选项 , 会自动配置环境变量: 3.点击自定义安装,然后执行下一步: 4.设置安装的位置,添加环境变量: 5.开始安装: 6.提示安装成功: 7.通过终端命令启动Python,验证是否安装