0

Installed Ubuntu 16.04.01 side by side with Win10. It's there but grub does not work. Grub2 is on sda6 with ubuntu. Should it not be on sda1 with EFI file or on sda3 with win10?

It is a HP laptop (I gather that HP is a particular problem. Had I known this before I bought it ...) with UEFI boot. I have edited the EFI file changing the boot order with efibootmgr, but nothing changed.

Current state of EFI file after edits ...

BootCurrent: 0002  
Timeout: 0 seconds  
BootOrder: 0001,3001,3001,0002,0000,2001,2002,2004  
Boot0000* Notebook Hard Drive - HGST HTS545050A7E680  
Boot0001* Windows Boot Manager  
Boot0002* ubuntu  
Boot2001* EFI USB Device  
Boot2002* EFI DVD/CDROM  
Boot3001* Internal Hard Disk or Solid State Disk  

extract from mtab ...  

/dev/sda1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0  
/dev/sda3 /media/carol/Windows fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0  

From boot repair ([http://paste2.org/MWC9zIc2 ]) it is a NTFS drive for windows

HarveyP
  • 33
  • 1
  • 7
  • 1
    Is system older BIOS or newer UEFI. And is Windows installed in BIOS or UEFI boot mode. And then is Ubuntu in same boot mode. Have you turned off Windows fast start up? If BIOS grub must be installed to MBR of drive as that is only way BIOS systems boot. Never ever install grub to a NTFS partition, you break Windows. https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System – oldfred Oct 28 '16 at 18:09
  • Sony, HP & others: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 If you run Boot-Repair and check/tick 'Use the standard EFI file' in advanced options it will copy shimx64.efi to /EFI/Boot/bootx64.efi which is a fallback or hard drive entry. One of your existing hard drive entries may then work or we can add a new one. And that should be one you can set as first option in boot order. – oldfred Oct 30 '16 at 17:45
  • 'Use standard EFI file' is ticked by default, should I untick it for a second attempt? – HarveyP Oct 30 '16 at 18:35
  • If you ran the repair then the bootx64.efi should be a copy of shimx64.efi and bootable as the hard drive or fallback entry, if you have one. A drive entry could also be a BIOS boot entry. I added hard drive entry to add if existing entries do not work: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 But then you choose that entry not "ubuntu" in UEFI for boot and choose to make first in boot order. – oldfred Oct 30 '16 at 19:02

3 Answers3

0

I have workarounds.

Method 1

1. press < esc > during boot
2. press F9
3. select ubuntu from menu
4. Here is the Grub ...

But this is not ideal.

Method 2

Set next EFI boot in .profile as my Ubuntu drive

...
echo "rootpassword" | sudo -S efibootmgr -n 0002 #my ubuntu address for next boot  
...

Unfortunately sudo does not work in .profile - substitute YOUR root password ...
So every time I log into Ubuntu, my next boot is the grub boot, however this does not help me when I have logged into Win10 ...

HarveyP
  • 33
  • 1
  • 7
0

Install Boot Repair on Ubuntu and run it with recommended options. It should reinstall and configure grub with proper settings and fix your problem.

sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && boot-repair

0

I was reading through [Installing Ubuntu Alongside a Pre-Installed Windows with UEFI ] and got to the part near the bottom to go to Win10 setup using < shift >Restart - nice to know ...

In BIOS setup, Boot-Order I found 2 entries against the OS line when I pressed < enter > on that line (flagged with a little triangle!), one was Win10, the other ubuntu.

I used F5/F6 to change the order so that ubuntu was at the top and selected - it seemed not to be enough to have it either selected or at the top, it must be both - and left that screen using < F10 > as < esc > just leaves without changing anything.

I also made sure that legacy support was disabled, as it was before I started messing about, before I left using < F10 > again.

And it now works. Grub has Windows as default and a whole lot of entries that will only confuse, but I can edit that ...

Thanks for the help above!

HarveyP
  • 33
  • 1
  • 7