Friday 31 October 2014

Windows 8.1 and Fedora 20 Dual Boot in DELL Laptops (GRUB modified) ... !!

Hey this is hantenks and I have been trying this for a long time. My laptop is Dell Inspiron 15R 5521. I had tried to dual boot Windows 8.1 and Fedora so any time but all
in vain. Finally, google and youtube(My special thanks to an user named Nehal) came to my rescue. This is the method I used for performing a dual-boot in dell laptops when BIOS supports (UEFI,LEGACY-OPROM,Secure Boot->on or off)
Note: Not all 8(2^3) combinations are possible  :P !!
Again if simple procedure(Normal dual OS installation with NO modification in GRUB) suffices your needs you don't need this guide.

# is used or your understanding
### is used for doing a task(like copying or pasting - Not involving typing commands in terminal)
from (vi) after type::
anything without # or ### can be thought of as typing commands in terminal or text file

Our aim is to use one EFI boot after modifying in fedora terminal :

Windows 8 or 8.1 comes installed in an UEFI + Secure Boot On condition. Linux can be installed and run in UEFI as well as LEGACY(preferred over UEFI). Remember in  all condition are ion Legacy Oprom disabled scenario.
so First recreate the scenario if your pc or laptop is formatted several times and present version is not in UEFI + SECURE BOOT ON.

i) We have a Win 8.1 UEFI + Sec Boot enabled version, now create a partion for Fedora 20( via shrinking in win 8.1 disk manager or while installing 8.1, etc )
ii) Now go to BIOS turn off Secure boot: So scenario is UEFI + Secure Boot disabled
iii) Install Fedora 20 normally (live or direct) -> For your ease ... (While Installing Fedora check the drive names for windows boot(efi)
      it's around 200 MB and it's name might be /dev/sda2 (Or better take a snapshot))
iv) After boot, windows boot loader will displayed on the grub menu, But it will not open. The kernel could not be opened ( /EFI/Microsoft/Boot/bootmgfw.efi could not be found )
v) The problem is there are two EFI boot partions only one is needed. I am going to use windows EFI partion and ignore Fedora's. Please be careful, as we are modifying
   bootloader. Don't do random shit or you will not be able to load OS properly and have to go through the entire process once more. Yeah, It's pretty frustrating.
   Anyways enough with the warnings :P .
  Open terminal in fedora
vi) type::
    su
    your root password
    #Here [password prompt wil be asked... enter or if you have not set password, create one (google it :|)]
    #To modify boot options we need super user privileges
vii) fdisk -l
   #shows the disk and it's details (Note that there will be two "EFI System" note down Windows EFI device name under the column "Device" -might be /dev/sda2)
   # Let us use X,Y for generalization where X,Y are whole numbers. Let windows Efi be /dev/sdaX and Fedora's be /dev/sdaY
viii) mount /dev/sdaY /mnt/
ix) cp -rv /mnt/EFI/fedora/ .
x) umount /mnt
xi) mount /dev/sdaX /mnt/
xii) cp -rv fedora/ /mnt/EFI/
 # To check type :: ls /mnt/EFI/
 # Display will be Boot fedora Microsoft
xiii) umount /mnt
xiv) blkid
 ###Only copy the UUID of /dev/sdaX
 #blkid command Gives you the UUID of the partions copy that say :
 #/dev/sda2: UUID="8011-B567"
 #copy only 8011-B567 (including the '-')
 #Due to operations above (xiv) we can now make neccessary changes to ignore sdaY
xv) vi /etc/fstab
  ### paste the UUID in the respective field
    [Esc]wq!
#[Esc]wq! is needed to save the vi document after changing it
#The question lies how to identify the UUID in the fstab document, one is to look for type of filesystem others will be ext4 or swap(for linux) for windows 8.1 it will be vfat, verify by looking at the end of that line "winnt" will be written and in others "defaults"
#say it's
#UUID=9548-A678 /boot/EFI vfat .....
#After changing it will look like this
#UUID=8011-B567 /boot/EFI vfat .....
xvi) grub2-mkconfig -o /boot/grub2/grub.cfg
xvii) vi /boot/grub2/grub.cfg
 ### Add the line
set root='hd0,gptX'
#within the curly braces...
#menuentry 'Windows Boot Manager'{
#chainloader /EFI/Microsoft/Boot/bootmgfw.efi
#boot
#}
#So it changes to ->
#menuentry 'Windows Boot Manager'{
#set root='hd0,gptX'
#chainloader /EFI/Microsoft/Boot/bootmgfw.efi
#boot
#}
#obviously, X=number, not the character don't, blindly copy the #commands given here
###
[Esc]wq!
#To save and exit
#What we did was simply put the link in the grub file for windows 8.1
xviii) mount /mnt/
xix) mount /dev/sda2 /mnt/
xx) cp /boot/grub2.grub.cfg  /mnt/EFI/fedora/grub.cfg
### it will ask for choice to overwrite existing file type ::
y
xxi) grub2-install /dev/sda

#restart, Your Windows 8.1 will load without error :D
Cheers!!

Hantenks.


No comments:

Post a Comment