Recently I made the daft decision to actually update my son’s HP Pavilion laptop …
As expected – Ubuntu was as smooth as silk, no issues and everything was up-to-date in a few minutes.
Then I rebooted into Windows 8. One hour went by – 79 updates later and everything looked ok. I made the fatal mistake – lets install Windows 8.1 – it was a free upgrade – what could go wrong?
Well it hosed the dual boot. In Microsoft’s infinite wisdom, “I’m the only operating system – lets reset everything the way I want it to be”.
Previously I used boot-repair :
On firing up boot-repair, it recogised the laptop had an efi bios. I hit the advanced options and ticked the “hard coded error” option – this is where it renames your various efi files where a manufacturer such as HP similiarly doesnt recognise / doesnt follow the EFI standards and hard-codes the EFI boot file to be the Microsoft version.
Unfortunately, this time around, this didnt work for me.
Remembering the trials and tribulations last time, no problem I thought … so what follows is how I solved this.
- Power on the laptop and immediately hit F9 – yes I mean immediately – if you wait a split second, you’ll miss the chance and Windows 8/Windows 8.1 will boot
- Up pops the OS Manager – just select Ubuntu from the list of choices.
- Then you’ll see the familiar Grub – let it boot into Ubuntu
Now comes the tricky terminal stuff…
- Launch a terminal
- Now install the following package
sudo apt-get install efibootmgr
- Now run
sudo efibootmgr -v
- You’ll see in the output a string path corresponding to the Windows OS – it is prefixed with a bunch of garbage and suffixed similarly – but you should see something like
- That is the magic Microsoft EFI boot file we need to replace … so navigate to the folder
- Copy the file
bootmgfw.efito somewhere safe – I put mine in the root folder -
sudo cp bootmgfw.efi /
- Now I copied Ubuntu’s version of this file and overwrite the Microsoft version:
sudo cp /boot/efi/EFI/ubuntu/grubx64.efi bootmgfw.efi
- Reboot – and magic – Grub reappears. Ubuntu is the first option and Windows 8.1 appears as the option immediately after the Ubuntu recovery
See – never be defeated by Microsoft and manufacturers such as HP that idiotically follow Microsofts line…