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,625
  • 4
  • 20
  • 28
Michael
  • 21
  • 1
  • 6

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,924
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.

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
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,863