I can get a Grub boot interface by typing:
set root=(hd0,5)
set prefix=(hd0,5)/boot/grub
insmod normal
normal
And I can then boot into either Windows 8 or Ubuntu. But I really don't want to type that every time I reboot.
That was pretty far already. In your UEFI setup you would have just needed to put that into a grub.cfg
next to /EFI/ubuntustudio/grubx64.efi
.
This is what the configuration file looks like that reads the actual grub.cfg containing all the kernels:
search.fs_uuid $paste_uuid_here root hd0,gpt2
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
First, you're missing an EFI System Partition (ESP), which is used to hold EFI boot loaders. Most computers that ship with Windows 8 use /dev/sda2
as the ESP, and your /dev/sda2
is about the right size for that; but your /dev/sda2
holds a Linux filesystem and has no EFI boot loaders. My hunch is therefore that you've accidentally trashed your ESP, rendering the computer unbootable.
Related to the first point, you don't seem to have any EFI boot loader programs on either your hard disk or your SSD.
Your /dev/sda11
is about the right size to be an ESP and does have a FAT filesystem (which an ESP must have), but it's marked as a BIOS Boot Partition.
As a first step, you must create a proper ESP. There are two relatively easy ways to do this:
- Adjust the type code on
/dev/sda11
. In GParted, you can do this by removing the "bios_grub flag" and setting the "boot flag." In gdisk
, you'd do this by setting the type code to EF00
.
- Adjust the type code on
/dev/sda2
and make it FAT32. In GParted, you'd do this by setting a "boot flag" and creating a FAT32 filesystem on it. In gdisk
, you'd set the type code to EF00
and then use the separate mkdosfs
utility to create a FAT32 filesystem on the partition.
Once that's done, you can begin recovery. In theory, you can use Boot Repair to do the task, at least for Linux; but as it appears it led you down the wrong path before, you might want to do something different:
- Download and prepare a bootable USB flash drive or CD-R version of my rEFInd boot manager.
- Boot with rEFInd. It should show you at least one option for booting Linux.
- Boot to Linux.
- Open a Terminal window.
- Edit your
/etc/fstab
file to mount your ESP (/dev/sda2
or /dev/sda11
) to /boot/efi
.
- Type
sudo mount -a
.
- Type
df -h
and ensure that there's a line for /boot/efi
, showing the correct partition mounted. If not, go back to step #5.
- Download and install the Debian-package version of rEFInd.
At this point, rEFInd should enable you to boot Linux. Your Windows installation will remain unbootable, though, until you run a Windows recovery tool. You should be able to download something from Microsoft's site to repair the Windows boot loader, but I don't happen to have a URL or instructions handy. I recommend you ask on a Windows site if you have problems with this part of the task. Note that after you're done, the Windows boot loader will be set as the default, so you'll need to change that. You can either follow steps 2 and 10-11 in this procedure or use the USB flash drive to boot to Linux and then re-install rEFInd from there. Alternatively, you could repair Windows before you repair Linux, but you'll need to fix the ESP before you do either OS-specific repair.
Best Answer
First make sure that hibernation is disabled - so boot into Windows, open command prompt as administrator and execute :
powercfg /h off
. Shutdown the PC completely - do NOT reboot.Then install GRUB boot loader to your Ubuntu installation in EFI mode.
Boot from the Ubuntu installation media, open a terminal and execute:
Note :
sda
= disk |sda1
= efi partition |sda8
= system partition | (taken from 'paste2' output)Boot into BIOS - change the boot order in UEFI settings - select Ubuntu to be the default system.