dual boot - How do I install Ubuntu alongside a pre-installed Windows with UEFI? - Ask Ubuntu


i'm absolutely new linux. know how install ubuntu alongside pre-installed windows 8+ os.

should wubi, or through live usb/dvd?

what steps need take correctly install ubuntu?

if using ubuntu 16.04+, many issues compatibility solved. still, depending on version using , hardware / model have, might need or of steps provided in answer. if reading in august 2017+, can ubuntu 17.04 have installed on over 40+ laptops uefi, ranging lenovo, dell, hp, sony, acer , toshiba models 2016 , up, , have had no issues @ installing ubuntu following steps in installer. basic steps mean:

  1. insert ubuntu usb installer
  2. select install ubuntu (install ubuntu alongside windows)
  3. select wireless card & upgrade 3rd party software while installing ubuntu
  4. finish installation , see ubuntu install without issue windows or ubuntu.

now, not 100% full proof verification. mentioning impressed fact out of 43 total laptops, 43 did not have issues whatsoever on end. still, if have issue, reason why guide created.

before explaining steps it, want clear have tried many ways of installing ubuntu versions older 15.04 (or other distro matter) within windows 8 or windows 10. no luck. microsoft windows created big mess linux distributions. if have pre-installed windows 8 system, never able install ubuntu or other os in normal (livecd/liveusb) or wubi way. because windows 8 introduced several new features, of 2 are:

  • uefi substitutes have known bios (an alternative to)
  • secure boot prevents installed operating system, in case windows 8 booting. no longer case ubuntu since 12.04.2 there no need disable secure boot.

on further note want mention secure boot taken uefi wiki

secureboot

"secure boot" new uefi feature appeared in 2012, windows 8 preinstalled computers. ubuntu supports feature starting 12.10 64 bit (see article) , 12.04.2 64 bit, pcs implementing support have become widespread @ end of 2012 not yet tested, it's possible may encounter problems booting ubuntu under secure boot.

important: if find bug, please file bug report against shim package in ubuntu, preferably using command:

ubuntu-bug shim 

once you've installed secure boot disabled. mentioned slangasek:

it not required disable secureboot in firmware install ubuntu on windows 8 machine. ubuntu 12.04.2 , 12.10 secureboot-compatible. machine ships recommended microsoft third-party marketplace keys in firmware able boot ubuntu under secureboot. if there problem file launchpad bug shim package.

i want notify spend week testing 15.04 , had excellent outcome. of 12 laptops ( 4 toshibas, 3 hp & 5 lenovo) windows 8.1 pre-installed, on cases, ubuntu detected windows boot manager correctly, gave option install alongside windows 8.1 (it said install alongside windows boot manager) , solved issues appeared on previous ubuntu versions. did not have else on cases. secure boot on , on efi enabled boot system. also. tested 4 windows 10 pcs , worked 15.10 & 16.04.

this not mean in case work perfectly, means on cases, had 100% ubuntu perfect installation. again, 15.04 (also on 15.10 , 16.04. on cases 64-bit). had talks users marius nestor softpedia had disable secure boot in order installation work, should noted that, if have excellent experience secure boot, might not. keep in mind when else fails (we can thank marius excellent contribution). in case, send bug report provided link above.

so of said, installing ubuntu via wubi not doable (not recommended @ least me), things trying boot example windows 8 bootloader not possible right unless changes in future (there bugs related in launchpad, the 1 mentioned bcbc). apart this, wubi not work within windows 8 , if have uefi gpt partition (not ms-dos type partition). pleas read does uefi support mean wubi work on laptops shipped windows 8? more information.

not that, trying install 32 bit ubuntu impossible. need 64 bit version work correctly. read more wubi in can install ubuntu inside windows?

the following small guide install ubuntu pre-installed windows 8 or 10 system. steps have done in precise order mention them here started. if step skipped or done before another, end of problems mentioned @ bottom of guide.

for time, need via livecd, livedvd or liveusb, assuming (actually requiring) have following points:

  • you using 64-bit version of @ least ubuntu 12.04.2. 32-bit versions not work.
  • your system came windows 8 or 10 pre-installed (and not want delete it)
  • you not installing ubuntu inside of windows 8 or 10 rather alongside of it. inside of impossible because needs wubi unsupported.
  • your system has uefi activated (and can not disabled) secure boot.
  • you have created free space ubuntu within windows 8 @ least 8 gb (i recommend leave @ least 20 gb or so, can test hell out of it).
  • you made sure have free space left on drive create needed partitions , made sure did not have primary partitions used (in case of using ms-dos scheme) because create problem ubuntu installer showing "replace windows" option instead of "alongside windows" option.
  • you know how burn livecd, livedvd or liveusb within windows 8. if not, windows apps can you. mine in pc ubuntu ^^.
  • windows 8 not shutdown in either hibernation mode or other mode ('fast start-up' default on windows 8) leaves on saved state. shutdown windows 8 in normal way, shutdown option. prevent other problems related appearing. read bottom (troubleshoot) of answer more information regarding point.
  • you installing on ms-dos type disk scheme (you can have 4 primary partitions opposed gpt scheme) has @ least 1 free primary partition. remember if using 4 primary partitions no partitions appear on ubuntu installer since there no more primary partitions left use (ms-dos type partitions limited 4 primary ones, gpt limited 128). happens lot on many laptops come 4 pre-created primary partitions. if installing on gpt type partition , want boot, need leave uefi enabled.

please read above points since many users jump part , when problems found because did not follow 1 of them.

before start need following:

run compmgmt.msc on windows 8. there on, create partition enough size. note mention creating from windows 8 because have had cases doing partition liveusb rendered windows 8 unbootable, after doing boot repair. remove problem or have greater chance of removing (or skipping problem altogether) , making sure both systems work, partition hard drive within windows 8 first.

now follow steps have working windows 8 + ubuntu installed on system:

windows 8 + ubuntu

we first need know type of motherboard options dealing with. open terminal (by going start menu , typing powershell example) , run terminal administrator (right click app show in start menu , select run administrator). type confirm-securebootuefi. can give 3 results:

true - means system has secure boot , enabled

false - means system has secure boot , disabled

cmdlet not supported on platform - means system not support secure boot , not need guide. can install ubuntu inserting livecd or liveusb , doing installation procedure without problems.

if have enabled , have necessary partitioning done can proceed guide. after booting windows 8 go power off options , while holding shift key, click on restart.

enter image description here

(this old trick on windows, since windows 3.1 hold key special when rebooting)

windows 8 show totally different restart window:

enter image description here

when menu above, select troubleshoot

you following options:

enter image description here

select uefi firmware settings

note - in spanish version of windows 8, option uefi firmware settings not available in several laptops, tested lenovo, hp , acer. have option boot computer , custom menu appear lets couple of things. in case of lenovo not have option install ubuntu windows 8, option remove windows 8 completely. applies if not using 15.04+.

this important part

the system reboot , allowed go bios (if not press appropriate key, common del,f2 or f10).

in part can't since each bios different each motherboard model. there 2 options can take here, both of optional since ubuntu might install without problems @ all. can either option disable secure boot or option disable uefi. in cases able find both, show in bios option called secure boot or enable uefi.

if find options, depending if can not install ubuntu secure boot enable disable secure boot (remember report bug using ubuntu-bug shim), able still stay in uefi mode , able boot ubuntu. in motherboards, option need change , option see related uefi because not offer possibility disable uefi.

dual boot issues

i mention important note here. if happen install ubuntu in legacy mode (no secureboot) might have problems booting both, windows , ubuntu @ same time since both not appear on dual-boot menu. if have windows on uefi example , install ubuntu on legacy mode, able boot ubuntu in legacy mode , windows in uefi mode.

so before proceeding, make sure installing ubuntu same boot options windows. way able choose 1 boot in same boot menu , not worry if 1 work or not. ubuntu uefi guide can see there section teaches how know if installed ubuntu in same boot setup windows (uefi mode):

an ubuntu installed in efi mode can detected following way:      /etc/fstab file contains efi partition (mount point: /boot/efi)     uses grub-efi bootloader (not grub-pc)     installed ubuntu, open terminal (ctrl+alt+t) type following command:      [ -d /sys/firmware/efi ] && echo "installed in efi mode" || echo "installed in legacy mode"  

so if have dual boot problems, problem. please read ubuntu uefi guide since covers various ways on solving dual boot problems , converting ubuntu legacy or efi mode. have tested various ask ubuntu members helped me apart 2 laptops provided testing. should solve dual boot problems related windows 8 + ubuntu, again encourage problems (same or new) file bug report mentioned above. ubuntu developers working hard in providing easy install solution cases , 1 of top priorities.

continuing guide, in other motherboards offer possibility disable uefi eliminate uefi , secure boot on , boot in normal bios way, if find way want (to have uefi free computer , not face of problems related this) means it. 1 have tested intel dz68db , did both case studies. remember doing make dual boot process not work in cases left system either boot windows in uefi or boots ubuntu in legacy.

with in mind, remember select boot order make sure boots either cdrom, dvdrom or usb drive can boot live ubuntu image after rebooting.

some points should consider before continuing:

  1. if windows 8 installed uefi enabled, highly recommended stay in uefi, although if still want disable specific reasons can, grub create bootable part windows 8. if disable uefi , want access windows 8 afterwards (before installing ubuntu), not work since boot part windows 8 needs uefi (again dual boot problem).

  2. if disable secure boot, there no problem in cases. disabling part creates problem between windows , linux, 1 prevents ubuntu booting correctly. in either case, encourage first try install ubuntu uefi/secureboot, since in cases work. if disable of them , install ubuntu, might not able boot windows 8 afterwards through grub boot menu.

now before saving, motherboards offer boot mode option. verify option not pointing uefi boot instead csm boot (compatibility support module) provides support legacy bios systems.

other systems offer uefi boot option can enable or disable. depending on options mentioned above can set 1 want.

and lastly others offer uefi/legacy boot first option select 1 wish use first. option self explanatory.

now save changes , reboot.

when ubuntu live image starts, show rather different normal 1 used to. not worry, because ubuntu has alternative boot option when system has efi installed. select used to. highly recommend reading following article in ubuntu site regarding ubuntu installations when using uefi. if there problem, try create small partition (about 250 mb of size) efi part of system. done in installation part asks if want install on desired partition or used advanced options. select advanced options if come problem. in there, create 250 mb partition efi , rest grub , other stuff accustomed to.

i think here should fine , have avoided several problems typically found when trying ubuntu windows 8 are:

  • not booting livecd/livedvd/liveusb/wubi
  • not installing ubuntu because of security issues (yeah right, more correctly monopoly issues)
  • not booting either windows 8 / 10 or ubuntu (not showing either 1 of them)
  • not letting ubuntu create partition
  • not recognizing efi part of system
  • ubuntu not recognizing windows 8 / 10 partition
  • not seeing grub , booting directly windows
  • windows 8 / 10 not booting or readable because or partition changes done ubuntu

troubleshooting

your computer boots directly windows

this common problem , if not grub menu , re-installing or repairing grub not help

every bios/efi system different, might 1 of following pictures:

uefi 1

uefi 2

notice "uefi boot option priority" or "boot option menu" . windows default , ubuntu (or in second picture elementary os) option.

once select ubuntu on uefi boot menu grub menu. should able boot either ubuntu or windows grub menu.

another issue make system boot directly windows (without showing grub menu) if either windows took hold of boot manager or after installing ubuntu, efi partition not configured windows. solve this, go windows , open terminal, type following (need administrative privileges):

bcdedit /set {bootmgr} path \efi\ubuntu\shimx64.efi 

this configure windows boot manager take consideration grub boot manager. still happen after running boot repair within ubuntu. making sure windows reads ubuntu efi partition, in case using efi boot system instead of old bios solve it. in above command line, difference between shimx64.efi , grubx64.efi, shimx64 actual microsoft signed binary works secure boot enabled while grubx64 normal grub binary (not signed).

windows 8.1 / 10 not recognized / ubuntu not showing option install alongside

if have followed steps above including making partition ahead of time through windows 8.x, proceed normal ubuntu installation. when arrive @ option how install it, if not see option install alongside of it, select "something else" instead of wiping hard drive. configure new partition layout on empty space you've set aside isn't windows 8 / 10.

you need create @ least 1 partition root system (which shows symbol "/") , set ext4, swap (virtual memory). swap space can small 128mb if have lot of ram or high 4gb. 2 partitions created based on empty space provided should ready proceed. , 1 last 1 efi part should around 100mb.

when installer asks put bootloader, tell put on partition type "efi". install grub load once system starts in future give choice of going ubuntu (or whatever flavor installed) or going windows boot manager take windows 8.

i recommend reading following links additional information of issues , causes in particular part:

repairing boot

after finishing installation, if happen have windows 8 disabled booting , boots ubuntu, not worry. in ubuntu after boots, install boot-repair in ubuntu opening terminal , typing following:

sudo add-apt-repository ppa:yannubuntu/boot-repair   sudo apt-get update sudo apt-get install boot-repair boot-repair  

boot repair mention have grub error, have efi system , ubuntu rocks. since ubuntu rocks (it not work if ubuntu not rock! ^^), click on apply boot repair fixes everything. reboot , should see windows 8 , ubuntu side side.

for cases rare booting problems, partitioning or using old hard drives on newer motherboard, solution might checking out fixparts solves misaligned partitions , other partitioned type problems.

if experiencing 1 of following issues:

  • loosing data when copying ubuntu windows 8 after shutting down windows 8
  • can not access windows partitions ubuntu getting disk contains unclean file system

    this cause of option in windows 8 called fast startup behaves similar hibernation , keeps snapshot of system when boot up, load faster. since keeps snapshot, copy or change in windows 8 ubuntu after doing fake shutdown lost (apart other issues found here).

    the solution in windows 8 go to:

    control panel --> power options --> choose power button does

    in here click on "change settings unavailable" should see this:

    enter image description here

    uncheck option says "turn on fast startup". need disable hibernation. can this command (you need in console admin rights):

    powercfg.exe -h off 

    this should remove hibernation file , enable partition mounted in ubuntu.

a demonstration video available on issue. can install ubuntu 12.04.2 (64 bit versions) onwards secureboot enabled. need disable secureboot after boot repair step.

this answer has been updated hellreaver, pacerier, carl h, steve d , many others. if find issue answer, please comment below update answer new information of fix issues it.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User