Having an issue with a dual boot setup that is being run from Windows boot manager. I can successfully load into grub2 from Windows boot manager, however it seems that grub2 cannot locate to the Kernel or something, as it is dropping me right into a shell with the following output:

[ Minimal BASH-like line editing is suported. For the First word, TAB
list the posible command completion. Anywhere else tab list the posible
completions of a device/filename,]


I have used Easybcd in the past and successfully loaded a Linux grub through Windows bootloader, but this was when both operating systems were on the same partition, but since my OS installationd are now on separate partitions it seems EasyBcd cant work its magic.

ONe encouragement is that I was able to get Easybcd to load a working Grub if I used the Neo grub bootloader and edit the confg with:

title Ubuntu 14.04
find --set-root /boot/vmlinuz-3.19.0-61-generic
kernel /boot/vmlinuz-3.19.0-61-generic ro root=/dev/sdc
initrd /boot/initrd.img-3.19.0-61-generic

however this loads in Grub4DOS which is very slow, and as of today this method stopped working See THIS POST for details).

Here is the output of EasyBcd Settings for all the different methods I have tried for the Ubuntu 14.04 installation:

Default: Windows 7
Timeout: 30 seconds
Boot Drive: C:\

Entry #1
Name: Windows 7
BCD ID: {current}
Drive: C:\
Bootloader Path: \Windows\system32\winload.exe

Entry #2
Name: Ubuntu 14.04 Legacy
BCD ID: {a4f127cf-3150-11e6-8aaf-408d5cb9e442}
Drive: C:\
Bootloader Path: \NST\nst_linux.mbr

Entry #3
Name: Ubuntu 14.04 Grub2
BCD ID: {a4f127d0-3150-11e6-8aaf-408d5cb9e442}
Drive: C:\
Bootloader Path: \NST\AutoNeoGrub0.mbr

Entry #4
Name: Ubuntu Neo Grub
BCD ID: {a4f127d1-3150-11e6-8aaf-408d5cb9e442}
Drive: C:\
Bootloader Path: \NST\NeoGrub.mbr

*It seems that none of the paths seen above are pointing to my dev/sdc2/ partition which would be considered DISK1 on my Windows Volume manager.

EDIT - In the confusion of attempting to get a working bootmanager for Ubuntu/Windows, you will see that grub and Windows Boot manager have all been installed in numerous locations. Below are the present locations and contents of all bootmanager & Grub installations:

dev/sdb Windows7 drive

/dev/sdb1 - 512 MB fat32 partition which is currently empty

/dev/sdb2 - 110 GB ntfs partition containing Windows7 installation. This partition contains a 'Boot' folder which contains BCD files and a whole wack of langauage folders. THIS IS The FOLDER THAT WINDOWS BOOTLOADER uses.

/dev/sdb4 - 121.53 ntfs partition containing storage for media

dev/sdd - Ubuntu Drive

dev/sdd1 - 512 MB partition containing a 'EFI' folder, inside of which are two folders 'grub' and 'Ubuntu', both of which contain the exact same files (grub.cfg, grubx64.efi, MokManager.efi, shium64.efi)

dev/sdd2 - 48.83 GB ext4 partition that contains the '/' folder and Ubuntu instalation.

dev/sdd3 - 69.91 GB ntfs partition containing storage for media

what do I need to do so that the Grub shell I am being dropped into will load up Ubuntu? HOw can I get this machine to dual boot out of Grub?

  • 1
    You have mixed UEFI boot with Ubuntu and BIOS boot with Windows 7. Windows 7 can be installed in UEFI mode, but that is not its normal default, and it has to be copied to flash drive & files moved around to make it UEFI bootable. And how you boot install media is how it installs. You can convert your UEFI Ubuntu install to BIOS boot by adding a small 1 or 2MB unformatted partition with bios_grub flag on Ubuntu gpt drive and use Boot-Repair to uninstall grub's efi boot loader and install grub-pc to MBR of gpt drive for BIOS boot. You then can boot Ubuntu direct from sdc or use EasyBCD. – oldfred Jun 16 '16 at 3:52
  • this sounds easier than the option below, however the steps are not as illustrative, so I would have to ask you a bunch of questions. One thing that seems unclear to me "adding a small 1 or 2MB unformatted partition with bios_grub flag on Ubuntu gpt drive" this doesnt make sense to me. Do you mean, adding a small 1 or 2MB unformatted partition, and then adding a bios_grub flag on the Ubuntu gpt drive ? – Kalamalka Kid Jun 16 '16 at 3:58
  • If you use gparted, right click and add bios_grub flag on new unformatted partition. UEFI and BIOS boot are not compatible. But you can still boot Ubuntu from UEFI and Windows from UEFI boot menu in BIOS/CSM mode. You may have to turn on/off UEFI or BIOS/CSM boot mode. Some will boot from one time boot key like f10 or 12 as each boot entry defines the boot method. But once you start booting you cannot switch modes, or grub can only boot another system in same boot mode. You must use gparted from live installer and may have to swap off the swap as installer normally mounts swap if found. – oldfred Jun 16 '16 at 4:15
  • thank you for your assistance, however I do not want to have to press f12 evey time I boot (i already have this option to boot into bother OS like this). The idea here is to get both of the Operating SYstems in one bootloader. I am trying desperately to follow what you are saying, but there are some things that dont seem to work with your instructions. For instance, I am not able to add any flags to an unformatted partition in Gparted. When you right click an unformatted partition in Gpartedt there are simply no options available other than 'format' and 'information' – Kalamalka Kid Jun 16 '16 at 5:40
  • there is no need to reply as I have found a solution that works. Thanks for your insights @oldfred ! – Kalamalka Kid Jun 16 '16 at 8:28

You have two options - using the GRUB boot loader (what I recommend) or the Windows loader. First remove all the Ubuntu or GRUB entries you had created in the Windows BCD store before. To list all identifiers open command prompt as administrator, execute : bcdedit /enum all /v

To delete the Ubuntu entries execute : bcdedit /delete {*} for each Ubuntu entry you have. Replace * with the Ubuntu identifier to delete - be careful and don't delete the Windows entry. Additionally I recommend to uninstall EasyBCD to avoid further problems with BCD operations.

Method 1 : GRUB boot loader

Boot from the Ubuntu installation media and select Try Ubuntu without installing, once on the Live desktop open GParted to identify the disk and partitions where the operating systems are installed. In most cases the disk is sda, the Windows partition on msdos partition table sda1.

Now install the GRUB boot loader from which you can boot Ubuntu and Windows to the disk in Legacy BIOS (msdos partition table) mode - so open a terminal and execute these commands :

sudo mount /dev/sd** /mnt  
sudo grub-install --boot-directory=/mnt/boot /dev/sd*

Replace sd* (disk) and sd** (Ubuntu partition) with the letters and number you've identified.

In case the systems are installed in UEFI BIOS mode ... install the GRUB boot loader in EFI mode.

sudo mount /dev/sd*** /mnt
sudo mount /dev/sd** /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sd*

Replace sd* (disk), sd** (efi partition), sd*** (Ubuntu partition) with what you've identified.

Boot into BIOS and change the boot order in UEFI settings - select Ubuntu to be the default OS.

Method 2 : Windows boot loader

Boot from the Ubuntu installation media and select Try Ubuntu without installing, once on the Live desktop open GParted to identify the disk and partitions where the operating systems are installed. In most cases the disk is sda, the Windows partition on msdos partition table sda1.

First mount the Windows partition, open a terminal, execute : sudo mount /dev/sd*** /mnt
Replace sd*** (Windows partition) with the letters and number you have identified before.

Copy the first 512 bytes of Ubuntu : dd if=/dev/sd** of=/mnt/linux.bin bs=512 count=1
Replace sd** (Ubuntu partition) with the letters and number you've had identified before.

Boot into Windows, open command prompt as administrator and execute these commands :

bcdedit /create /d Ubuntu /application bootsector
bcdedit /set {identifier} device partition=c:
bcdedit /set {identifier} path \linux.bin
bcdedit /displayorder {identifier} /addlast  
bcdedit /timeout X  

Replace "identifier" with the characters, letters and numbers being returned when you executed the first command and replace "X" with the number of seconds (for instance 10) you want to see the Windows boot loader menu - before it automatically will boot the default operating system.

  • question about Method #1: will this work if my WIndows installation is legacy BIOS? My Ubuntu install is on GPT disk loading UEFI. – Kalamalka Kid Jun 16 '16 at 5:21
  • 1
    @KalamalkaKid : I added the information you required to the answer. In case you have an EFI based BIOS, it is recommended to install all operating systems in EFI mode. :) – cl-netbox Jun 16 '16 at 9:34

I was finally able to get grub2 to load at startup with a Windows 7 entry however it took a lot of trial and error.

What I did was remove all Grub entries from all the different locations that it had been installed on the numerous drives, and then remove all of the EasyBcd Grub entries.

After this I booted into Boot repair Disk and restored the MBR to allow Windows to boot normally, rebooted back into Boot Disk Repair, and then reinstalled Grub2 (on all drives). I then went into my BIOS, changed boot Disk and booted into Ubuntu and typed sudo update-grub

it was only after performing this command that Windows was recognised in the Grub2 bootloader. It did not end here though because Windows Bootloader was still coming up after choosing Windows in the Grub2 menu (essentially adding another step), so I used EasyBCD to disable the Windows bootloader menu so that Grub simply loads straight into Windows without waiting for input from the WIndows bootloader.

I was then able to change the boot order in Grub2 with grub-customizer

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

I am going to reward the bounty to the first answer as it was the only answer, and also I am happy that the author took time to be thorough in their explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.