2

I installed Ubuntu alongside Windows 10 from a live USB. After the installation completed, it said I should restart my computer. Then, I was greeted with the grub rescue prompt (error: no such device ... entering rescue mode). I booted to the USB again and ran the boot-repair tool, which said the boot was successfully repaired.

However, when I turned on my machine again, it greeted me with the same error and grub rescue prompt. This boot-repair URL. Any ideas on how to fix the issue? I also tried mounting the real ubuntu installation from the live USB, using chroot and running grub-reinstall which did not help.

NIMISHAN
  • 1,575
  • 4
  • 19
  • 28
Michael
  • 21
  • What brand/model system? I see mention of Dell? Most Dell have required update of UEFI and if SSD update of firmware for SSD usually Samsung. You have UEFI. Vendors are required to install Windows in UEFI mode if Windows 8 or 10 and your report shows both Windows & Ubuntu in ESP - efi system partition. Just do not boot in Legacy/CSM/BIOS boot mode as then grub in gpt's protective MBR will error out. – oldfred Oct 12 '17 at 03:58
  • @user334639 Yes Windows was working fine, after the dual boot I'm unable to get into either OS installation – Michael Oct 12 '17 at 16:01
  • Can you boot the LiveUSB again? Did you try reinstalling? Did you run [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS from LiveUSB? – user334639 Oct 12 '17 at 16:30
  • @user334639 Running the command printed out BIOS – Michael Oct 12 '17 at 17:28
  • @oldfred I'm using an HP desktop. I'm not sure, but I still believe that my PC is using legacy BIOS. – Michael Oct 12 '17 at 17:32
  • It's very strange because your disk is formatted as GPT and Windows 10 only boots in UEFI. Try making a UEFI-only LiveUSB and boot it... https://askubuntu.com/a/781236/186295 – user334639 Oct 12 '17 at 19:29
  • @user334639 I'll try doing that, but I'm pretty sure that my PC won't even boot from a USB that is only UEFI. I had to change the USB into BIOS/UEFI in order for it to boot from USB – Michael Oct 12 '17 at 19:41
  • How old is your motherboard? Did this computer come with Windows 10 and this motherboard, or have you installed Windows or motherboard by yourself? – user334639 Oct 12 '17 at 19:42
  • Boot-Repair report shows you have Windows & Ubuntu installed in UEFI boot mode on a gpt partitioned drive. Some HP are not particularly dual boot friendly. HP - escape + F9 for boot menu, F10 for bios setup http://askubuntu.com/questions/870453/live-boot-usb-install-of-16-04-fails-on-hp-pavilion-23?noredirect=1#comment1349777_870453 and http://askubuntu.com/questions/666631/how-can-i-dual-boot-windows-10-and-ubuntu-on-a-uefi-hp-notebook – oldfred Oct 12 '17 at 23:54
  • Could you please include the exact model name of you computer for reference and future readers? Thanks. – David Foerster Oct 16 '17 at 19:55

4 Answers4

1

You have grub installed in the MBR of sda. This is likely because of a Legacy install of ubuntu; however, there is also grub in the EFI Partition of the hard drive.

Many system will automatically, drop to legacy boot if it finds a bootloader in the MBR, but Legacy boot can not read a GPT disk, thus you error.

Easiest fix:
Enter the EFI settings (what used to be bios) and turn of Legacy support.
Some systems will call it CSM. This will force an EFI boot.

A better fix is to get a tool to erase grub from the MBR.

ravery
  • 6,874
  • I don't have the option to turn off legacy support or CMS or anything of that kind in the BIOS settings – Michael Oct 12 '17 at 17:28
0

Simple and lazy:

Boot the LiveUSB in UEFI mode and then install Ubuntu again.

If you boot the Ubuntu LiveUSB in BIOS (aka legacy) mode, it will automatically install Ubuntu in legacy boot mode and your system probably does not support that. It's a bit weird that Ubuntu LiveUSB be programmed to act this way, but it has happened to me a couple of times (every time I buy a new computer I forget to boot the USB correctly).

To make sure your LiveUSB will not boot in legacy mode, make a UEFI-only LiveUSB.

user334639
  • 310
  • 3
  • 7
  • In order to boot into UEFI mode, do I need to re-burn the iso into the liveUSB? How do I boot into UEFI mode? Also, just out of curiosity, how did you find that out to be the issue? – Michael Oct 12 '17 at 00:04
  • Same USB should work. You had to do something to tell the computer to boot the LiveUSB when you installed. It's right at that point that you have to choose, the LiveUSB appear twice in the list, one for legacy boot and one for UEFI boot. – user334639 Oct 12 '17 at 00:07
  • On the boot setup menu, the flash drive is only listed once. – Michael Oct 12 '17 at 00:09
  • In the LiveUSB, test for boot mode: https://askubuntu.com/questions/162564/how-can-i-tell-if-my-system-was-booted-as-efi-uefi-or-bios – user334639 Oct 12 '17 at 00:11
  • You may need to disable secure boot in the BIOS setup in order to see the UEFI mode. – user334639 Oct 12 '17 at 00:12
  • I don't think my PC uses UEFI, secure boot doesn't show up as an option when I go into the BIOS settings – Michael Oct 12 '17 at 02:23
  • @Michael Did you do the test in my second last comment? – user334639 Oct 12 '17 at 15:46
0

UEFI and GPT make it complex to install dual-boot systems. I created a similar setup recently. Here are the steps that might help you.

  1. Create a Ubuntu USB using rufus tool on Windows. Select GPT and UEFI modes in the rufus tool.
  2. Boot live usb and install ubuntu normally. Place the grub on /dev/sda (default) Do not restart after installing.
  3. Use efibootmgr to correct the boot order.

    $ efibootmgr

This would list current order as below

BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0001,3000,0000,2001,2002,2004
Boot0000* ubuntu
Boot0001* Windows Boot Manager
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk

Then use below code to change the order bringing Ubuntu in front.

$sudo su
# efibootmgr -o 0000,1,3000,2001,2002,2004
  1. Reboot and go to bios settings There under boot settings, choose OS boot manager. Within OS boot manager bring Ubuntu up.

  2. Reboot. It should work now.

If the above steps do not work, you would need to repair the windows boot using windows usb. Then disable fast startup and repeat above steps to get a dual boot.

Ashish
  • 963
  • 6
  • 13
  • I haven't been able to get around to trying this, but I'm fairly sure that my PC refuses to even boot into a USB that is in only UEFI mode. I had to change the option to BIOS/UEFI mode in rufus in order for it to successfully boot from the liveUSB. – Michael Oct 13 '17 at 20:01
  • Just following up, I ended up trying out this solution but was stuck on step 2. As i suspected, my PC won't boot from the USB when it's UEFI-only and GPT partitioned – Michael Oct 15 '17 at 03:53
  • UEFI only, MBR partition, FAT32 format for boot partition – ravery Oct 18 '17 at 21:22
0

From beginning to new set-up:

Check at first your BIOS with pressing key 'F2' - when you are booting your machine. In section "Boot" of your UEFI-BIOS - there should be boot-option set to LEGACY.

Partitions of your hard-disk should look like:

An own partition for Windows 10 formatted with NTFS filesystem.

Then free partitions for Linux formatted with - for example - ext4 filesystems:

For Linux installation you need a swap partition (=2x size of RAM), a partition for root with label / (one slash only) and a partition for home with label /home. The partitions for / and for /home are formatted with ext4 filesystem.

Now you first install your Windows 10 into the NTFS filesystem. (for example with size 500 GB) - when Windows 10 is finished and has finished too with updates - then you can install Ubuntu to the partitions with / and /home. Partition / has size of 100 GB - this is sufficient for root and /home has size of 392 GB - this in case your hard-disk has totally a size of 1 TB. For swap-partition a size of 8 GB would be enough.

Ubuntu normally recognizes the Windows 10 installation and grub is then performing update-grub at end of the Ubuntu-installation. Thats it and done is this. For correct boot-order you have to edit the grub-file yourself. There is enough how-tos to find in the web about how to edit the grub-file for correct booting order (Windows 10 in first line and Ubuntu in second line of screen - or how you like it ...).

dschinn1001
  • 3,829