1

After installing Ubuntu 17.04 with its bootloader in a patition (hd0,5), I was unable to boot it via EasyBCD 2.3.207 (my preferred bootloader). I have installed Ubuntu after Windows and don't want to use grub on MBR of first disk. I can boot Ubuntu by Super Grub Disk but when I try it by EasyBCD, either by automatically choosing or selecting the partition manually, it end up in Grub> prompt. The following commands are also not effective : Root=(hd0,5) chanloader +1 boot

Now I am in Grub rescue > prompt. Interestingly, I now can boot into Ubuntu by:
set prefix=(hd0,6)/boot/grub
set root=(hd0,6)
insmod normal
normal

This gives me the grub menu and I can choose any option therein. The problem is that it is impossible to do this every time for booting or use Super Grub Disk. How can I use BCDedit or EasyBCD or Neogrub bootloader to do this automatically (tried it unsuccessfully by manipulating the menu.lst file of Neogrub ).

Please help,

Thanks,

Tapas

Tapas
  • 29

3 Answers3

0

I found another way to achieve the same, in a somewhat easier way. Also here, your MBR remains untouched.

  1. Add a Linux Ubuntu entry in BCD using EasyBCD. This will add two files in your Windows Boot partition (System Reserved): A file ANGx and NST/AutoNeoGrubx.mbr where x is a counter of your Linux menu entries in BCD.

  2. start up Ubuntu in any way you can, using a live system or the grub prompt like described by the OP.

  3. Execute following commands in a Terminal (where XY is the disk/partition number identified from fdisk -l ,for example /dev/sda2)

    sudo su
    install-mbr /dev/sdXY
    grub-install /dev/sdXY   
    update-grub
    
  4. Dump a copy of the partition's boot sector but with 9216 bytes rather than 512. Reason is the core.img file which resides within the extra bytes.

    dd if=/dev/sdXY of=sdXY.bin bs=9216 count=1
    
  5. Transfer this file to Windows (e.g. with a USB stick) and restart Windows. Replace NST/AutoNeoGrubx.mbr with the dumped sdXY.bin file.

Reboot and enjoy.

I also recommend boot-repair but only to verify rather than to repair.

Note that this procedure is only valid for systems with BIOS/MBR configuration, not BIOS/GPT or UEFI/GPT. I'm aware that the recommended solution is to install GRUB into the MBR, but this alternative handling has worked safely for me for years.

HiWiz
  • 26
0

TECHNO BABBLE ASIDE, you might wish to try this:enter image description here

I kept on overlooking the obvious when I finally noticed what was wrong: Two drives in Windows with the same drive letter is a big "NO-NO" NeoSmart kept on assigning the letter "C" to the Linux drive I wanted to boot to. I already had a drive "C" with Windows. The solution: Go to "tools" where you see "Files Tools Help". Make sure Easy BCD is on the selected drive you want to use and find "BOOT". Ignore all drive letters and select "BOOT". Do not pass go, do not collect 200 dollars. Select "BOOT" and save your setting. Now reboot your PC. You should find your boot menu works fine and that this method also works with UEFI/BIOS.

0

Sweet success at last. I have successfully booted Ubuntu 17.04 by creating an entry in the windows bootloader through bcdedit. So, it is not true what olfred remarked “I believe the bcdedit only works with UEFI.” Neither I updated the MBR of primary disk containing Windows 7 as it was the last thing I wanted to do. However, I am indebted to olfred as from his remark I guessed that I was wasting time with neogrub bootloader using grub4dos or Easybcd.

Steps followed in detail - First disabled fastboot of windows.

  1. Booted ubuntu partition by Super Grub Disk. It was (hd0,5), sda6
  2. It landed in Grub rescue prompt>
  3. I booted Ubuntu by: set prefix=(hd0,6)/boot/grub set root=(hd0,6) insmod normal normal
  4. This gave me grub menu and I pressed the first entry in it - “ubuntu” to boot normally.
  5. Installed grub again in the ubuntu partition by : sudo grub-install dev/xxxy --force (xxxy determined by gparted)(sdc6 in my case)
  6. Updated grub : sudo update-grub
  7. Opened a terminal by Control + Alt + T
  8. Created a temporary mount point by : 1. sudo su 2. mkdir /mnt/tmp
  9. Then mounted the device representing a 114 GB NTFS partition already present in my disk housing Windows 10 Pro 64-Bit to this mount point (I suppose one can use any NTFS partition this way): mount -t ntfs-3g /dev/xxxy /mnt/tmp (xxxy determined by gparted) (sdb7 in my case)
  10. Copied first 512 bytes of the ubuntu partition to a .bin file by : dd if=/dev/xxxy of=/mnt/tmp/ubuntu.bin bs=512 count=1 (xxxy determined by gparted) (sdc6 in my case)

  11. Exit from terminal and rebooted into Windows 7.

  12. Cut and paste the ubuntu.bin file from Windows 10 Pro partition housed at sdb7 to the root of windows 7 (c:)

  13. Opened cmd with administrative privilage (Start > Run > cmd in box > right clicking cmd > Run as Administator)

  14. Created an menu entry for Ubuntu : bcdedit /create /d “ubuntu” /application bootsector Returned an ID for this entry. Opened a notepad file, inputed the entry and saved it. This helps to copy paste the id needed to be inputed several tiles without mistake.

  15. Specified which windows partition contains the ubuntu.bin file: bcdedit /set {ID} device partition=c:

  16. Then the path to the ubuntu.bin file: bcdedit /set {ID} path \crunch.bin

  17. Specified the ubuntu entry should be displayed at last in the boot menu : bcdedit /displayorder {ID} /addlast

  18. Specified the time for dispalying the boot menu : bcdedit /timeout 15

  19. Exited bcdedit

  20. Rebooted

  21. At the end of boot menu, there is a new entry now “ubuntu”

  22. Selected and entered.

  23. Grub menu appeared.

  24. Selected the first entry – ubuntu

  25. Ubuntu desktop appears.

Indebted to : 1. Linux → Install and Configure CrunchBang Linux on the Lenovo T410 Laptop by Iceflatline.

Tapas
  • 29