1

I recently installed Ubuntu 15.10 on an HP Z-Book running Windows 8.1.

I installed grub on an sda partition mounted for /boot. Is there some way that I can boot on that partition and possibly use grub to select either windows 8 or ubuntu linux?

Currently, when booting my pc with OS selector, it goes straight into windows 8 (with secure and fast boot both turned off on UEFI hybrid boot mode).

wraithie
  • 143
  • Usually best not to have separate /boot. And /boot is not the ESP - efi system partition. Sony, HP & others: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 Rename bootx64.efi https://askubuntu.com/questions/597052/can-not-boot-anymore-after-a-boot-repair – oldfred Jan 24 '16 at 21:31
  • @oldfred Tried copying grub file according to instructions in the links. Unfortunately the file had r/w problems, probably due to a fatal error explained here. I tried to install grub like in the linked page but being a linux noob, I managed to mess up my windows boot (thought that mounted sda is just copy and I deleted some files). Right now I deleted my hard (no tears shed for windows 8). Have to research how to set grub to load when pc boots now and not manualy select efi. – wraithie Jan 25 '16 at 15:01
  • @oldfred If you believe you can answer the above question, please do. As explained in my comment I'm not focusing on it anymore. At least you can provide some info that might help a possible searcher. – wraithie Jan 25 '16 at 15:02
  • Sometimes the FAT32 partition gets corrupted and needs either a chkdsk from Windows or fsck from Linux. Must be unmounted, change sdb1 in example to your FAT32 partition: sudo dosfsck -t -a -w /dev/sdb1 The -a seems to help in clearing dirty bit https://bbs.archlinux.org/viewtopic.php?id=164185 – oldfred Jan 25 '16 at 19:29
  • @oldfred Can't do that anymore I'm afraid, the fat32 partition changed completely as result of disk wipe. I posted the question regarding my current situation here. Like I said above, if you can, answer this question. You could perhaps develop on your first comment and explain why /boot on seperate partition is a bad idea. If renaming grubx64.efi in bootx62.efi is a general solution then I think you should mention it. Would help solve both questions. – wraithie Jan 25 '16 at 23:05
  • That solution was in my first answer above. And posted by many others with HP and others as solution for HP systems. Main reason to avoid /boot as partition is that it adds extra complexity. You have to carefully manage it (as you should do with all partitions anyway). But /boot is often smallish and needs regular housecleaning. If you are using full drive encryption with LVM then you will have the /boot and must maintain only two kernels or it will fill and you have major issues. – oldfred Jan 26 '16 at 00:03

1 Answers1

0

As mentioned by @oldfred in the comments, making a backup of original windows bootx64.efi and copying grubx64.efi should do the trick.

An even better solution for me was running ubuntu boot repair, recommended repair. It made a dir /boot/efi/EFI/Windows/Boot/ with grub already named as bootx64.efi. Using that, when booting from OS selector, grub loads successfully.

EDIT: If boot repair page returns internal server error, this is how boot repair can be installed:

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

Boot repair window should show up after install.

wraithie
  • 143