Recently I have moved to fedora 20 and window 8 which showed that HP laptops have a special bios which only allows windows EFI to be loaded as default so even after installing both the OS and making the EFI partition of fedora default the system boots from Windows EFI directory. To get the grub to boot first I did the following steps.
My disk partition are as below. Device Start End Size Type
/dev/sda1 2048 616447 300M Windows recovery environment
/dev/sda2 616448 821247 100M EFI System
/dev/sda3 821248 1083391 128M Microsoft reserved
/dev/sda4 1083392 122882047 58.1G Microsoft basic data
/dev/sda5 122882048 123291647 200M EFI System
/dev/sda6 123291648 124315647 500M Microsoft basic data
/dev/sda7 124315648 548470783 202.3G Linux LVM
/dev/sda8 548470784 976771071 204.2G Microsoft basic data
Here I have two EFI partition /dev/sda2 (Windows) and /dev/sda5 (Fedora). As the setting is embedded in HP bios we needed a work around.
So I mounted the partititons first .
mount /dev/sda5 fedora/
mount /dev/sda2 win/
Now we copy the Fedora EFI content to Windows partions as follows
cp -rp fedora/EFI/fedora win/EFI/
In the windows partion you can find a default HP EFI content . Just rename it to some thing else.
Now rename the windows boot loader
mv win/EFI/Microsoft/Boot/bootmgfw.efi win/EFI/Microsoft/Boot/bootmgfwB.efi
Now copy the grubloader into the place of windows bootloader
cp win/EFI/fedora/grubx64.efi win/EFI/Microsoft/Boot/bootmgfw.efi
Now recreate the grub.cfg and place it in win/EFI/fedora
grub2-mkconfig -o win/EFI/fedora/grub.cfg
It should be done by now reboot the machine and check it .
Post a Comment