Setting Up Ubuntu 12.04 Dual Boot in Windows 8 on HP


Overcoming Windows 8 Secure Boot Feature

Published on by nick

Tags: ubuntu, windows, dual-boot, linux

With the introduction of Windows 8, Microsoft made deals with hardware manufacturers to install a secure boot feature that now makes either installing over the OEM OS or dual booting more difficult. To overcome this, and install Ubuntu 12.04 on an OEM Windows 8 machine, I have used this method, with some modifications noted below:

http://seravo.fi/2013/dual-booting-ubuntu-12-04-windows-8-machines-restricted-boot

On number 3 in the linked protocol, I had to also enable legacy support in my BIOS. The compact disk wouldn't boot without this option set. Another issue you might encounter is getting the Secure Boot feature to play nice. Depending on the BIOS, this can be configured in different ways. Check out this post for a great guide.

In my case, I had to also wrestle with the graphics card because I got low graphics mode errors. I booted to root shell and then ran these commands to get online (thanks to this handy post by maciimacii):

service network-manager stop
ifconfig wlan0 up
iwlist wlan0 scan
wpa_passphrase NETWORK_ID WIRELESS_KEY > /home/(username)/wpa.conf
wpa_supplicant -B -i wlan0 -c /home/(username)/wpa.conf
dhclient wlan0

After this, I ran updates for the system: apt-get update. Because this was a graphics issue, I thought I could start with the Nvidia drivers: apt-get install nvidia-current. I then rebooted the system and crossed my fingers.

Unfortunately, this didn't work for me. So I then booted in Recovery Mode from GRUB and enabled networking. This allowed me to then repair broken packages, which I thought would help fix the graphics issue. If you were lucky enough to get your issue fixed with the above instructions, great. Otherwise, keep reading...

So after what felt like an eternity, the package repair process finally finsihed. I rebooted the system and the graphics issue was resolved. The final thing you need to do is configure WIndows 8 to dual boot along side Ubuntu. After installation, reboot Ubuntu. Open a terminal and disable the Grub OS prober by adding this in the file /etc/default/grub:

DISABLE_OS_PROBE=”true”

Then edit the boot entry by appending to the file /etc/grub.d/40_custom the following lines:

menuentry "Windows 8" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt2)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

Update GRUB with sudo update-grub and you should be set. Reboot system and GRUB you should greet you as expected...

Now, I'm not totally sure why this happened in the first place; could be due to drivers on the Windows 8 system. But I'm glad it's working now.

All in all, I've successfully done this twice now. Once on an HP and once on an Asus. Each had slightly different ways to get it done. For example, the Asus, I had to actually delete a partition before starting and free up the disk space as unallocated, and then boot to BIOS and set to other OS in the Secure Boot menu. Then I could actually install to that free space. I had to do it this way because the standard "Install alongside other OS" option wasn't available when I ran the Ubuntu 12.04 install disk. Probably because of the Secure Boot feature.

When I finally got the Asus finished, I went to boot and noticed something interesting. The updated BIOS for this system allowed to boot exclusively to the partition with Ubuntu installed. I also installed a 2 MB boot partition, and this was adjacent to the OS, so if you plan on running mostly the Ubuntu OS, then you can set this as default boot option. Otherwise, you will need to install boot-repair and fix it.

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

Do a final reboot and everything should be in place and Windows 8 and Ubuntu 12.04 should be ready, side by side. I know this is a lot of steps and shouldn't even be an issue, but thanks to Microsoft, it is. I only hope someone out there will find this article and find it helpful.

Comments

Comments powered by Disqus

 Blog Search

  Popular Tags

django, ubuntu, mod_wsgi, apache, authentication, python, tls, linux, forms, ssl, virtualenv, dell, uwsgi, bash, nginx, raid, customer-service, centurylink, ux, software-companies, rais, form, centos, password, certificates, tinymce, mdadm, dual-boot, file-server, virtualhost, gluster, IT, blog, get, networking, piplight, distributed-file-system, big companies, bitnami, cygwin, windows, samba, scripting, pygments, post, programming-language, ui, lampstack, outsourcing, isp, security, usabillity, provision, php, shared-hosting, netflix, git, flatpages, syntax-highlighting, virtualbox, hg, redirect, usability, prg, acls, change-password, complex, view tags...

 Questions/Comments?

Drop me a line... [email protected]
Follow me on Twitter... @nicorellius
Share on Facebook...