Thursday, 4 December 2014

Make Windows 8 dual boot when Pre-installed.

Its my personal experience with dual booting windows 8 and fedora 20.

I have Lenovo G50-70, it came with windows 8.1 preinstalled and had secure boot and uefi boot enabled by default as it comes in all other latest notebooks.

Now, how i started the process and what problems i have faced till now:


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 Linux Versions 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.

Windows 8 will show you a new restart window:

When you get the menu above, select Troubleshoot
You will then get the following options:


 Select UEFI Firmware Settings

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

Every BIOS is different, my looks like following picture:



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 Fedora 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
  1. I never took a backup of preinstalled windows 8 .
  2. I forgot to disable secureboot from BIOS options, but it didnt made any difference for me cuz i dont want to alter windows partitions.
  3. I shrank my 1TB HDD, 920GB available to C:\ partiton to 445GB. And now my C:\ is about 445.23GB something... Rest is further broke in two partitions as 300GB for data partition as i plan it to use as windows spare partition for keeping my data and rest of space I left unallocated for linux.
  4. I made the usb bootable for fedora 20 -64bit with PowerISO , as i have used it from many years and i am happy with it.
  5. Ok, now i rebooted my notebook with UEFI disabled and secure boot enabled to install fedora from live usb installer. I pressed F9 to select usb to start with, and i was presented with a menu like:
 - Windows Boot Loader
 - Fedora Live Installer [EFI]  //i dont remember the exact text
 - Boot from EFI file

  1. I selected Fedora EFI installer and presented with a fedora efi boot menu
  2. I selected Fedora Live Installer
  3. It showed the fedora logo starting up and booting, but i felt like it was stuck, i pressed down key and see the that booting was hung at: Reached Target System. And after a short while it dropped to dracut emergency shell.
  4. Its OK... i thought may its secure boot's fault, so i disabled secure boot and restarted the notebook . its power on now and asked to confirm that i really want to disable secure boot by pressing a series of numbers followed by enter key like 9521+ENTER, so i did it... and it continued. But as the fedora started to boot it came to the same position as it was with sec boot enabled, now thats a big disappointment!!
  5. Lastly i completely disabled EFI and went to back Legacy Mode, thanks to Lenovo they gave that option and a Recovery Option (for Factory Restore) available in bios...
  6. I booted with fedora installer n got a working live fedora session, and to check little things i decied to run live session rather than direct install it!
  7. Now i got satisfied with full working and snappy response of fedora, i started the installer and began installation
  8. Selected custom parttion, by granting auto partitioning on the free space left on hdd that was 200GB, installer suggested /home of 145GB, /boot 500MB, / 35GB and swap of 8GB. After a little consideration i continued the installer, and the installation started.
  9. I was amazed to see installation speed, it completed in 2 minutes and almost 35 seconds!! Like WOW! then restarted the machine n i got the ugly grub menu to boot into fedora...
Fedora started good in time and everything was awesome!


Then the magic happened:
  1. I enabled UEFI and Secure Boot from BIOS
  2. Rebooted the machine
  3. Booted in windows 8! Hahahahahahahahahha :P WTF!! (I tried almost everything to start it!)
  4. Checked windows, checked all apps and drivers .( OKAY its fine!!)
  5. Rebooted to select boot partition.
  6. And this is what i want, got a boot menu with entries like:
 
 - Fedora 20 [HDD SERIAL NUMBER]
 - Fedora Live Rescue Mode
 - Windows Boot Loader

Booted in fedora, and all is good now! :D