Mikael63BootLinuxFromWindowsFromGrub4Dos

From Super Grub Disk Wiki
Jump to navigationJump to search

Mikael63's system

Mikael63 has three hard disks which I describe:

  • Hard Disk A: Windows - (Fake?)Raid 0 - Part 1
  • Hard Disk B: Windows - (Fake?)Raid 0 - Part 2
  • Hard Disk C: Linux

Mikael63's problem

  • If he boots from a Grub that it is installed in Windows Hard disk mbr it does not find the Linux Hard Disk.
  • If he boots from Linux Hard Disk it does not find the Windows (Fake?)Raid Disk.

You can learn more about the grub hard disk order concept.

Mikael63's solution

He finally set Windows (fake?)raid to be the first one to boot.

After that he setup his system so that he could boot Linux from Windows Thanks to Grub4Dos.

Mikael63's own summary

Dual boot with Windows XP and Linux Mint.

I had an old laptop, with only Linux Mint 8, for some years now. I use it only for surfing and for this purpose it works well.

On a desktop computer that acted as a HTPC, I have Linux Mint 9 on a separate drive and Windows XP on another drive. XP boots from inside Grub. When I one day decided to remove the drive with Linux, XP failed to start. Google showed that I needed to run fixmbr from recovery console on the CD with XP. This worked well this time.

With the above as background, I intended to install Linux Mint on an another computer. The computer has two SATA drives, each 160 Gb, as Raid 0, meaning that the two drives is seen as a single physical drive. I pre-tested with Linux Mint on a LiveCD to see if Mint grabbed this about RAID 0. This is not handled by ie. Puppy or SystemRescueCd but with Mint it works well.

I fixed a USB flash drive with UNetbootin and started. At first it was not possible to boot the USB flash drive but that was when I deposited it in the combined card reader in the front. With the USB flash drive in one of the motherboard's USB ports it works. Mint started up immediately and everything seemed to work.

Since I had some SATA drives laying around I insert one of them and then starting installing Mint to it. I followed the wizard and set the installation location, which by Mint was called sdb for the “new” drive. Some error messages occurred about the file system. Decided to start all over. Then I missed to specify where Grub is to be installed. Default was sda and I just clicked next. When restarted I noticed my mistake. Linux failed to boot. Windows failed to boot. From within Linux (Live) I saw the Windows disk with all the files.

In this situation, I was more interested in being able to get Windows boot so I removed the Linux disk and loaded my XP CD to run Fixmbr. This did not work. Nothing happened. Got an advice to use Linux to empty the bootloader and then run fdisk /MBR and after that take a copy of bootloader.

Emptying the bootloader went well but then came the next surprise. When booted with my XP CD and from there run recovery console to run fdisk /mbr, I did not found such files like Fixboot, Fixmbr, Fdisk and likewise... These files were visible last time..

After intense search by Google I found Super Grub2 Disk. Burned it to a cd and boot. First, it was a lot of errors but then the GUI started up and there was an entry for fix mbr in Windows and because I was angry at myself and at this point saw no other way, I tested this. Success! It works!

Now that Windows works as it should, I tested once more to install Linux Mint, now with grub in sdb. At this point Linux works as it should but when trying to start Windows, from Grub, I only got error messages.

A workaround is, at start-up, quickly press F12 and select which drive I want to start from. Linux drive or Windows drive. This works of course but I have to be quick to select and it feels a bit annoying having to go that route, when it is not the way it is supposed to work.

update-grub finds boot.ini and whats in it, but still it does not work.

At this point I joined the chat in http://www.supergrubdisk.org/ and there got a lot of help from user "adrian15".

In an attempt to boot to Linux from Windows we tested to create a "linux.bin" and put it under C:\ on the win-drive and add the path in boot.ini.

This only gives a black screen with a blinking cursor.

At this point we abandon trying to boot from within Windows. Decided to try some experiments with Super Grub2 Disk on CD. The experiments leading nowhere, and at this point, we assumed that Grub can not handle RAID 0. Assumed - not sure.

Now “adrian15” suggests that we try Grub4Dos. Downloaded and unpack. Grub4Dos, as the single file grldr (with no extension) is copied to C:\ and it’s path added in boot.ini. My boot.ini now looks:

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows"
C:\GRLDR="GRUB4DOS"

Grub4Dos boot, with some default settings since there is no menu.lst yet, and inside, in “commands”, we are testing with different commands, getting closer and closer the target to boot Linux.


When Linux finally boot, the commands we used to get it to work is written into the menu.lst and that file also copyed to C:\. When this also works I removed some items in menu.lst and change the timeout to 10 seconds.

With Win XP as default in boot.ini other family member just have to power on PC and wait (yeah, wait..) for XP to load.

The commands, for booting Mint, used in menu.lst is:

title Linux Mint
fallback 3
root (hd2,0)
kernel /boot/vmlinuz-2.6.38-8-generic root=/dev/sdb1 ro
initrd /boot/initrd.img-2.6.38-8-generic
boot