Advertisment

Solving Linux Dual Boot Problems With Windows 10

If you just upgraded to Windows 10 from Windows 8.1 or Windows 7 and also have a partition with Ubuntu installed, then Grub will no longer appear on the boot menu. So, here is the solution to solve this problem

author-image
Rajkumar Maurya
New Update
dualboot

If you just upgraded to Windows 10 from Windows 8.1 or Windows 7 and also have a partition with Ubuntu installed, then Grub will no longer appear on the boot menu. So, here is the solution to solve this problem

Advertisment

There are two methods to repair the GRUB. One is by using Windows and another is by Ubuntu.

Method 1: Repairing it from Windows

You can either repair it from Windows 10 or run boot-repair from an Ubuntu live USB. These methods are also valid for Windows 8 or 8.1. Repairing from Windows 10

STEP 1:

After dual booting or upgrading, login into Windows and go to Command Prompt. Right click on it to run it as administrator.

Advertisment

windows-grub

STEP 2:

Type the command given below:

bcdedit /set {bootmgr} path EFIubuntugrubx64.efi

STEP 3:

Restart and you will get your Grub menu screen.

Method 2: Repairing it from Ubuntu

After following the above method if you still don’t get the grub menu, then you need a live Linux distribution either on a CD/DVD or on a USB stick.

Advertisment

STEP 1:

Use Boot-Repair to reinstall grub with all the options you need or boot into your live Linux distro and open GParted or any other partition manager it has. Look for your Ubuntu system partition which is in the form dev/sdxn, in our case /dev/sda7.

STEP2:

Login as root into your system to execute the actions needed to fix the issue. Open the terminal, log in as root and mount Ubuntu partition. Replace /dev/sda7, and ext4 filesystem with your partition and file system.

sudo su

cd /

mount -t ext4 /dev/sda7 /mnt

mount -t proc proc /mnt/proc

mount -t sysfs sys /mnt/sys

mount -o bind /dev /mnt/dev

STEP3:

If your /boot directory is on a different partition from your /, you’ll also need to mount that partition with the following command:

mount -t ext4 /dev/sda2 /mnt/boot

Advertisment

STEP 4:

Now it’s time to move into the mounted system, which is your Ubuntu installation:

chroot /mnt /bin/bash

STEP 5:

If it returns the error chroot: cannot run command ‘/bin/bash’: Exec format error, this usually indicates that you booted with one architecture (e.g. 32bit) and are trying to chroot into another (e.g. x86_64), so you need to use a Live that has the same architecture.

At this point it is useful to add a remainder to the prompt:

source /etc/profile

export PS1=”(chroot) $PS1”

Advertisment

And make sure /etc/mtab is up to date:

grep -v rootfs /proc/mounts > /etc/mtab

STEP 6:

Change UEFI boot order. Here the point is to change the order in which UEFI boots the system. First of all, have a look at the current order:

efibootmgr -v

This will output something like this:

BootCurrent: 0005

Timeout: 0 seconds

BootOrder: 2002,0004,0000,0001,2003,2001

Boot0000* ubuntu HD(2,e1800,82000,0a543b96-7861-11e2-8d38-d60b12dec0bc)File(EFIubuntushimx64.efi)

Boot0001* Ubuntu HD(2,e1800,82000,0a543b96-7861-11e2-8d38-d60b12dec0bc)File(EFIubuntugrubx64.efi)RC

Boot0002* EFI Network 0 for IPv6 (7C-05-07-9C-F6-18) ACPI(a0341d0,0)PCI(1c,2)PCI(0,0)MAC(7c05079cf618,0)030d3c000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000RC

Boot0003* EFI Network 0 for IPv4 (7C-05-07-9C-F6-18) ACPI(a0341d0,0)PCI(1c,2)PCI(0,0)MAC(7c05079cf618,0)IPv4(0.0.0.0:00.0.0.0:0,0, 0RC

Boot0004* Windows Boot Manager HD(2,e1800,82000,0a543b96-7861-11e2-8d38-d60b12dec0bc)File(EFIMicrosoftBootbootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................

Here you can identify the names of the devices and operating systems that are recognized by UEFI. You can find the signed bootloader for Ubuntu, the component responsible for loading grub.

How can we achieve this? By simply typing the following command into our terminal:

efibootmgr -o 0000

windows linux windows-10
Advertisment