2

I successfully installed Ubuntu Gnome 15.10 along with Windows 10 on my Satellite laptop, but after some boots Windows abruptly decided to put MBR on top of GRUB. No way to get back into Ubuntu, I tried to run a grub-update on live USB (after the relevant mounts) but nothing changed.

If I try to reinstall the GRUB following this guide I get this error:

root@ubuntu-gnome:/# grub-install /dev/sda
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

Here's my partition table, if it may help:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9FEFCFA9-CD66-11E3-8DDC-CA6477994E64

Device          Start        End    Sectors   Size Type
/dev/sda1        2048    2099199    2097152     1G Windows recovery environment
/dev/sda2     2099200    2303999     204800   100M EFI System
/dev/sda3     2304000    2566143     262144   128M Microsoft reserved
/dev/sda4     2566144 1827946926 1825380783 870.4G Microsoft basic data
/dev/sda5  1927376896 1929019391    1642496   802M Windows recovery environment
/dev/sda6  1929019392 1953523885   24504494  11.7G Windows recovery environment
/dev/sda7  1827948544 1914957823   87009280  41.5G Linux filesystem
/dev/sda8  1914957824 1927376895   12419072   5.9G Linux swap
cmks
  • 1,904

1 Answers1

1

Boot from Ubuntu installation media.

Select 'Try Ubuntu without installing'.

On desktop open a terminal, execute:

sudo mount /dev/sda7 /mnt
sudo mount /dev/sda2 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sda
update-grub  

Note:

sda = disk | sda2 = efi partition | sda7 = system partition

Boot into BIOS - select Ubuntu as default operating system.

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
  • 2
    That did the trick, I didn't mount the separate boot partition created by Windows, the guide probably assumed the EFI partition was into the Ubuntu /boot. Thanks. ;) – NANI SORE Mar 14 '16 at 09:12
  • Re-installing GRUB 2 is overkill and runs a (small) risk of creating new problems. Thus, I advise against this approach. Instead, use efibootmgr in Linux or bcdedit or EasyUEFI in Windows, to adjust the boot order. Unless GRUB files have been overwritten or deleted, this is much less risky. The bcdedit approach, in particular, is more likely to be successful in the long term, too. – Rod Smith Mar 14 '16 at 15:04
  • 2
    @RodSmith make that an answer please if there is a better approach. And TS -asked- for a way to re-install ;-) – Rinzwind Mar 14 '16 at 16:50
  • Rinzwind, it's a duplicate question. I marked it as such when I posted my comment. – Rod Smith Mar 14 '16 at 19:14