Grub4Dos and /boot/bcd error

0

I am running Ubuntu 13.04 on my laptop (SSD drive) and recently bought another HDD (second drive) installed in place of CD-ROM. What I want to achieve, is to have Ubuntu as primary OS and ability to boot to Windows 7 ocasionaly.

My desired setup is this:

  • hd0,0 - (Ubuntu mounted to /)
  • hd1,0 - WINDOWS partition
  • hd1,1 - DATA partition

Since now I don't have CDROM, I have to install Windows from some partition. I found a tutorial showing how to use Grub4Dos to do that. So this is what I did:

  1. Copied grub.exe to /
  2. Added custom entry to grub2 config in Ubuntu to be able to get into Grub4Dos while booting.
  3. Mounted my Win7 ISO to /mnt. Then copied all contents to DATA partition (FAT32) using: cp -R /mnt/* /media/my_name/DATA
  4. Restarted machine and got into Grub4Dos
  5. I then double checked that my unpacked ISO is available at (hd1,1) - it is.
  6. Applied following:

root (hd1,1)

chainloader (hd1,1)/bootmgr

boot

After that some Windows exec starts (looks like Windows installer) and immediately it reports the problem as:

Windows Boot Manager  

Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:   1. Insert your Windows installation disc and restart your computer.   2. Choose your language settings, and then click "Next."   3. Click "repair your computer." If you don't have this disc, contact your system administrator or computer manufacturer for assistance.   File: \Boot\BCD   Status: 0xc000000f   Info: An error occurred while attempting to read the boot configuration data.

I looked for a solution online but all the resources are pointing me to Windows repair from CD, which I obviously do not have (no CD-ROM drive installed).

I double checked that hd1,1 has /boot/bcd folder and it does. So doesn't look corrupted.

Anyone has a clue what's going on?

windows-7
ubuntu
boot
multi-boot
grub4dos
asked on Super User Apr 15, 2014 by ƁukaszBachman • edited May 29, 2019 by karel

1 Answer

0

To make disk bootable (with or without grub4dos) you have to write Windows 7 MBR and PBR and make partition active.

When using grub4dos you load bootmgr directly skipping boot records but \boot\BCD must be on active partition!

There are different tools which can write NT6 (Vista, Windows 7/8) boot records. Any disk management tool can make a partition active (parted - boot flag).

The above statements are for BIOS firmware booting.

For UEFI booting you need ESP (EFI system partition) with Windows boot files placed there and corresponding boot entry in NVRAM.

answered on Super User Apr 23, 2014 by snayob

User contributions licensed under CC BY-SA 3.0