BootLinuxFromWindowsWithGrub4Dos

From Super Grub Disk Wiki
Jump to: navigation, search

Booting Linux from Windows with Grub4Dos


Contents

Other titles for this same problem.

Booting Linux from Windows RAID with Grub4Dos when most everything fails

Introduction

There are some strange setups usually where RAID is involved where your PC BIOS does not offer all the hard disks so that grub or grub2 can find the Linux kernel and boot it. It seems that if you manage to boot into a Windows (based on raid) you can use grub4dos for accesing that hard disks.

I would have used How to Boot Grub from Windows approach myself. The Super Grub Disk's Windows chainloads GRUB! option did the trick by inserting the hard drive when you tried to install it into a partition boot record.

I do not know how to do the equivalent thing in grub2 and, of course, grub2 discourages you to install it in partition boot records.

Grub4Dos installation

You go to Grub4Dos webpage and you download its zip. You backup C:\config.sys just in case.

Unzip just the GRLDR file in your C:\ folder.

Now we need to make Windows to boot into grub4dos.

I will explain the method for Windows XP.

Edit: C:\BOOT.INI file and add this line:

C:\GRLDR="GRUB4DOS"

Grub4Dos setup

Now we need Grub4Dos to boot into our system.

This kind of done manually.

Create or edit: C:\MENU.LST file with these contents:

title My Linux
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

Finding these values is usually about testing them from grub4dos grub console. Here there is the explanation: Go into 3rd hard disk (hd2), first partition (0 in (hd2,0)), load the kernel that it is found in /boot directory with the filename: vmlinuz-2.6.38-8-generic. Tell it to check for its boot into the Linux device: sdb1. And finally load its correspondent initrd and boot it.

Final result

If you reboot the Windows menu should appear and you can choose GRUB4DOS. Inside GRUB4DOS menu you will find the My Linux option which hopefully will boot into your Linux.

Examples