First, activating "legacy support" was the wrong thing to do. On a computer with Windows 8 pre-installed, activating legacy support in the firmware makes it possible to go down paths that will create new problems, and in fact that's precisely what you've done. (That said, sometimes it really is necessary to activate this support, but it's more likely to cause problems than to solve them.)
Second, the "boot files... are far from the start of the disk" message is almost certainly a red herring. This can be a factor with certain disk sizes and certain BIOSes, but you've got an EFI implementation, not a BIOS. An EFI should be able to boot from kernels located anywhere on any disk currently available. Certainly your 1TB disk should pose no problems. Thus, everything you did from that point on was unnecessary at best and problem-producing at worst.
Despite your activation of legacy support in the firmware, it's conceivable that your system would have booted Windows after you ran Boot Repair. You don't say whether you tried to do so at that point, though, so it's unclear if it would have worked or if you just tried to fix the "far from the start of the disk" non-problem without testing it.
Somewhere along the line you seem to have installed the BIOS (legacy) version of GRUB, which may be what you're booting by default (to get the grub rescue>
prompt). It's conceivable that disabling legacy support in your firmware will cause the system to boot straight to Windows or straight to GRUB's EFI-mode installation. If it boots to Windows, you should still be able to get to GRUB by hitting F12. If it boots to GRUB, then you should be able to boot Linux, and possibly Windows. (I recommend trying the first two Windows options. The final three Windows options are unlikely to do anything useful.)
If you try this and get GRUB working as the default, you can try using GRUB Customizer to clean up the GRUB menu a bit. I'm not very familiar with this software, though, so I can't be more specific about how to use it.
Another thing you could try is to install my rEFInd boot manager. If you install the Debian package and if everything works perfectly, this will give you a menu with options for Windows, for Ubuntu via GRUB, and for Ubuntu directly. You can then remove extra boot entries by deleting unnecessary .efi
files in the /boot/efi/EFI
directory tree or by editing /boot/efi/EFI/refind/refind.conf
and uncommenting and adjusting the dont_scan_files
or dont_scan_dirs
options.
You may also want to review your partitions. Your Boot Repair output indicates that you've got four NTFS partitions, and I suspect at least one of those is unwanted/unnecessary, but I can't really be sure of that. You also shouldn't need /dev/sda6
or /dev/sda11
once you've fixed everything.
I suspect that the problem is related to the fact that your computer is using an NVMe "disk" device. Such devices are still new enough that they cause problems for many tools. My hypothesis is that the Ubuntu installer, or a tool on which it relies, is becoming confused by the NVMe device and so is failing to install correctly. The Boot Info Script that you ran seems to be a bit confused, too, so I'm working on incomplete information -- but I do have enough to suggest a workaround:
- If you haven't already done so, disable Secure Boot.
- Download the USB flash drive of my rEFInd boot manager. (There are download links for a USB image on that page.)
- Prepare a USB flash drive with rEFInd.
- Boot the USB flash drive with rEFInd. You should see the rEFInd menu, and it should show options to boot both Ubuntu and Windows.
- Select the Ubuntu boot option in rEFInd. With any luck, Ubuntu will boot up.
- If Ubuntu boots, download the latest test/development version of rEFInd using this link. That's a Debian package that you can install by typing
sudo dpkg -i refind_0.10.4.2-0ppa1_amd64.deb
from the directory in which it resides. Note that I'm specifying you use this version because it includes some fixes for NVMe-related issues in the installer. The older official release version (0.10.4) might work, but this one's fixes might be required for you. Anybody reading this much past February 22, 2017 should check the main rEFInd page (above) to see if a newer version is available and, if one is, use it instead.
- Reboot and hope for the best.
With any luck, your system will boot up to rEFInd, which should enable you to boot either Windows or Ubuntu. Note, however, that I can't promise this procedure will work; there are any number of points where it might fail. If you run into problems, please feel free to post back with more details.
Instead of installing rEFInd in step #6, you could try installing GRUB manually by typing sudo grub-install
; however, whatever problem blocked the GRUB installation in the installer is likely to block this procedure, too, which is why I recommended installing rEFInd above. You could try this, though, if you prefer to use GRUB. If nothing else, installing GRUB from the console in this way is likely to produce better error messages than what the Ubuntu installer produced.
Best Answer
If you have EFI, then there will be an EFI System Partition (ESP) on the disk. This partition has to be mounted on
/boot/efi
, so that GRUB can use it. The partition:boot
flag enabledEFI
folderEFI
by the OEM, but no guaranteesI don't have one on hand, but you can see examples of how such a partition will look:
Super User post about creating one, with
parted -l
output:Unix & Linux post, also about creating one, with a GParted screenshot:
So, the task here is, somewhere around steps 3 & 4:
Mount it:
Then you can proceed with your usual answer. I have done it myself. Consider it similar to mounting a
/boot
partition if you have one separate.You can mount it anywhere you like. In that case, just specify the mount directory to GRUB while installing: