[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to use the Windows Boot Loader to boot stage2 of grub2
From: |
Campbell, Shawn |
Subject: |
How to use the Windows Boot Loader to boot stage2 of grub2 |
Date: |
Sat, 18 Sep 2010 09:01:54 -0400 |
I am working with Ubuntu 10 which uses grub2. I am using it in a mixed windows
xp/Ubuntu deployment. I am using imaging software to deploy windows and ubuntu
to 60 PCs. The imaging software understands grub legacy, but not grub2 yet. I
would like to use the windows boot loader to boot into grub2 stage2 directly.
I have a limited understanding of how grub2 works. From what I have read,
stage1 is in the mbr and stores a disk block reference to stage2. stage1 is
loaded into memory and executed by the bios. stage1 loads stage2 from the disk
block reference and executes stage2.
The first option that I tried was to install grub into the mbr, capture the mbr
using dd, copy the file to my windows partition, and add a reference to it in
my windows boot.ini file. This worked and I was able to boot into Ubuntu.
However, when I installing the same file on other PCs, I wasn't able to get
them to boot. My imaging utility may not be putting the files at the same disk
block that grub stage1 expects.
So then I started looking at finding a way to load grub stage2 directly from
the windows boot loader. The windows boot loader doesn't seem to care about
the size of the file, it can be larger than 512 bytes. At least, I found
examples of other OSes and configurations that made use of a larger file. I
have been trying to figure out how to build a grub stage2 file that can be
directly loaded by the windows boot loader. I don't really want to embed the
configuration file unless that is a requirement. I would prefer that when grub
stage2 is loaded by the windows boot loader, that it would look in the linux
partition for it's configuration file. The partitions are identical in
location, size, and layout on all 60 PCs. Linux is always installed on (hd0,
3). I was trying to use the grub-mkimage utility to build a stage2 file that I
could pass to the windows boot loader. I have tried building it with different
combinations of modules, but without success. At this point, I am assuming
that stage1 must do some additional work that I am missing or I am missing a
module that I need or some other detail.
This is an example of one of my attempts:
grub2-mkimage -p (hd0,3)/boot/grub -o grub2stage2.bin boot ext2
I tried adding additional modules that I thought might be relevant.
I also tried the core.img file that Ubuntu uses.
So far, I have been unsuccessful.
Is it possible to directly load stage2 from the windows boot loader using the
grub utilities?
Any assistance that you can offer would be greatly appreciated.
Thank you
Shawn Campbell
Malone University
- How to use the Windows Boot Loader to boot stage2 of grub2,
Campbell, Shawn <=