Complicated chain loading
Tony Alfrey
tonyalfrey
Sat Mar 17 20:09:45 PDT 2007
C M Reinehr wrote:
> Tony,
>
> On Saturday 17 March 2007 14:58, Tony Alfrey wrote:
>> Not for the faint of heart; I need a LILO/GRUB expert.
>>
>> Three drives: sda, sdb, hda (two SATA, one IDE).
>> sda is the first boot drive.
>> LILO is on the MBR of sda1 (SuSE). I have it set up to chain load SuSE
>> on sda1, The Evil OS on hda, or FC-6 on sdb2.
>> GRUB is in the boot sector of sdb2; I let FC-6 set it up 'cause I don't
>> know GRUB.
>>
>> The Evil OS requires re-mapping drive geometry to make it think that hda
>> is the first drive. This is easy in LILO. Of course, SuSE in sda1 also
>> boots.
>>
>> But, I get a GRUB Geometry Error when trying to boot sdb2. Do I need to
>> do the same geometry mapping for GRUB as I need to for The Evil OS?
>>
>> Thanks!
>
> Quite likely. If grub is not installed into the mbr of the first drive then it
> will need to be chainloaded, and that probably will require drive mapping.
> While you're running SuSE, mount the FC-6 partition and look in the
> directory /boot/grub for a file called device.map. The documentation
> describes the format of this file & how to edit it, but unfortunately doesn't
> explain how to determine the "correct" drive mapping.
Well, I think that I must at least know the drive (sda1) that maps to
the first hd0,0 because that drive boots up with an MBR (LILO) that
works for at least two partitions. It's probably a good bet that the
second SATA drive (sdb2) has got to be next hd1,1 leaving hda to be
hd2,0. This was not what GRUB guessed in device.map so I rewrote that.
>
> Once you've corrected/verified the device mapping, you may have to reinstall
> grub stage 1 to the boot sector of the FC-6 partition. The best way to do
> this is to create grub boot floppy, although you also could do it from within
> SuSE (/usr/sbin/grub).
So run grub-install from within sba1 to write to the boot sector of
sdb2? If I specifically write the command to install to /dev/sdb2, is
there any chance of the thing writing to the wrong partition? In other
words, do I have to have /dev/sdb2 mounted to make sure it sticks there?
And do I need to write just the Stage 1 or will all stages get
re-written with grub-install?
>
> If you don't have the grub documentation installed in your SuSE system, look
> at http://www.gnu.org/software/grub/manual/
I have it; it's all over the web. It says:
"Geom Error
The location of the stage2 or stage1.5 is not in the portion of the
disk supported directly by the BIOS read calls."
But as you pointed out, it doesn't tell you how to know what the result
actually is when BIOS is read.
And also, I wonder if I need to know the bios device number that LILO
uses (like 0x80, 0x81, 0x82 for the three drive sequence).
To chain-load The Evil OS in LILO, one needs to do the thing like
map-drive = 0x81 to = 0x80
I wonder if the same thing is needed for chain-loading GRUB? You can
bet that I've tried every permutation of these various items at this point.
>
> HTH
>
> cmr
>
>
--
Tony Alfrey
tonyalfrey at earthlink.net
"I'd Rather Be Sailing"
More information about the Linux-users
mailing list