Saturday, September 28, 2019

grub2 - Dual booting Ubuntu 14.04 and Windows 8.1



Yet another question on this topic. Sorry.




I've bought a new HP Pavilion 15-p239sa with Windows 8.1 installed, and I'm trying to dual boot Ubuntu 14.04. The problem is that after installation of Ubuntu, it still just boots to Windows without displaying the GRUB menu for me to pick Ubuntu. Here is the sequence of events:




  1. Download Ubuntu 14.04 from the Ubuntu web site and burn to DVD

  2. Install Ubuntu as directed and reboot: laptop boots to Windows only

  3. Install and run boot-repair from live disk as instructed. Boot-repair says to disable secure boot

  4. Disable secure boot and reboot. No change.

  5. Install and run boot-repair again from live disk. No errors reported.

  6. Re-boot. Still can only access Windows.


  7. Ran bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi. Ran OK and reported no errors.

  8. Re-boot. Still can only boot Windows. GRUB menu still not showing.



The report from boot-repair is at: http://paste.ubuntu.com/10826849/



I'd really appreciate it if anyone could help.



Peter




Here's how the issue was resolved in my case, with the help of the volunteers at Boot-Repair:




  1. Do a normal install of Ubuntu alongside Windows following the well-known instructions (turn off secure boot, turn off fast boot etc etc). In other words do the stuff I'd done before posting this question.

  2. If Ubuntu is inaccessible, run Boot Repair from a live disc and try again. If Ubuntu is still inaccessible, try the following.

  3. Boot on your Ubuntu live-disc and choose "Try Ubuntu". Then open a terminal when you're in Ubuntu and type the following commands:
    sudo mount /dev/sda2 /mnt
    sudo mv /mnt/EFI/HP /mnt/EFI/HPbkp
    sudo mv /mnt/EFI/Microsoft /mnt/EFI/Microsoftbkp



For me, this made the machine boot into Ubuntu instead of Windows, but still did not show the GRUB menu. This being the case, I then had to do the following





  1. Open a terminal in Ubuntu and type: gksudo gedit /etc/grub.d/25_custom

  2. Edit the text 25_custom text file, replacing: /EFI/Microsoft/Boot/bootmgfw.efi with
    /EFI/Microsoftbkp/Boot/bootmgfw.efi

  3. Reboot and select Windows UEFI bootmgfw.efi from the GRUB menu (which now did appear), to get into Windows. Select Ubuntu to get into Ubuntu, obviously.



Obviously the names of partitions (e.g. sda2) and text files (e.g. 25_custom) may well be unique to a particular installation. There are also some things here that are clearly specific to HP, like /mnt/EFI/HP.



I hope this gives some pointers to other people struggling with this and kudos to the Boot-Repair team.



No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...