Hi,

On Wed, 14 Nov 2007 13:27:49 -0800 (PST)
maxim wexler <[EMAIL PROTECTED]> wrote:

> > the only option seems to be to properly install grub
> > to the first HD.
> 
> grub-install /dev/hda renders the PC completely
> unusable

Hm, yeah, that's why I generally distrust running grub from within an
booted OS: You can't be sure that the setting is anywhere near what
happens before the OS got loaded (e.g. no ACPI kicking in yet, BIOS
"disk drivers"...).

> > I would start with a grub floppy disk or boot
> > CD(-RW) and look what
> 
> Both drives are bootable provided I make a detour to
> the BIOS and change the boot order.

Somehow I suspect that the BIOS gets something wrong when you change
the boot order. But that's just a suspicion. So my suggestion was to
change it to "default" (first HD first). Then check from a grub running
from floppy or CDRW what that can see. So you can try if my suspicion
is wrong, what might well be the case: That grub (from floppy or CD)
will only see one drive, too, if I'm wrong. Otherwise you know that I
was probably right and your only option then is to leave the BIOS boot
order untouched.

> > devices that sees when booting. In order to have
> > grub list disks, you
> 
> dmesg reports ALL drives and appropriate partitions.

But that is what _Linux_ sees. Linux has its own drivers, working
completely independent from what the BIOS was doing before -- and
that's what a grub (at boot stage) has to rely on. So Linux' output
only tells us that generally:
- your drives are OK, the cabling too.
- your controllers are working.

But we need to make sure the BIOS initializes everything right. It
might not do so if boot order is changed (and from a certain point of
view, that might actually be a "feature").

> > enter "root (" and press TAB. The same goes for
> > partitions after the
> > setting device and a comma (e.g. "(hd0," + TAB).
> 
> Now this is really wierd. When I'm at the prompt using
> the grub that appears when the PC boots, ie when the
> second drive is given preference in BIOS, tab
> completion reports only a string of fdn's followed by
> hd0. But, when having booted and logged in, I issue
> the grub command, tab completion reports possible
> disks as hd0 and hd1 as it should. And it correctly
> sees the "unknown" partition on /dev/hda and the four
> linux partitions on /dev/hdc. But that's with
> device.map like so: (fd0)  /dev/fd0
>     (hd0)  /dev/hda
>     (hd2)  /dev/hdc
>        ^!?!?

It might be that the second HD is just (hd1). Grub doesn't necessarily
follow the kernel way of enumeration. But then again, don't rely on
what grub tells when run with an loaded OS.

> > If all devices are seen, then set root (as indicated
> > above) to the
> > partition holding the grub stages (i.e. partition of
> > /boot in Gentoo
> > or /lib/grub/i386-pc/). Then have grub write the MBR
> > using 
> > "setup (hd0)". Note that this will overwrite the
> > Windows MBR, which
> > will make it unbootable at that point. So better
> 
> OK, this throws me. Isn't it supposed to be bootable?

Oh, the Windows MBR is just giving control to the boot block of the
partition holding Windows, which itself then stages ntldr. So when I
said it'll make it unbootable, I was talking about the Windows MBR.
Grub should run anyway nevertheless, and then it should be able to give
control to the Windows partition boot block -- but I was just giving a
warning that what definately happens is that the Windows MBR is gone.

> There's more...
> 
> I followed the instructions here: 
> 
> http://gentoo-wiki.com/HOWTO_Dual_Boot_from_Windows_Bootloader_(NTLDR)_and_why
> 
> And, provided I'm booting from /dev/hda, I'm presented
> with two choices, Gentoo and XP. XP boots OK but
> gentoo halts at:
> 
> GRUB Loading stage1.5
> 
> GRUB loading, please wait...
> Error 21
> 
> even though the boot routine is identical to the one
> that WORKS when the second drive is given boot
> preference.

Personally, I don't see much difference, this approach shares similar
problems. Apropos problem, error 21 is "Selected disk does not exist".
I think it might have happened because you probably switched drive
order again when doing the Linux based steps descibed in the link
you've give. When the MBR is written, it stores references to the stage
files. They might point to an invalid location if you change the boot
order back again. That's what I think why you're seeing this error.

Grub can perfectly from a floppy disk. See "info grub" (the full grub
documentation, the man page is crap) in order to learn how to create a
grub floppy disk (or CD/R(W)). You will then be able to set the BIOS
boot order to default and see what a freshly booted grub sees then.
>From within the grub booted this way, you can order grub to setup
itself to an MBR or boot block. Basically, you have to set "root", then
issue "setup". The first takes the device of the stage files as
argument, the latter the target disk (or partition).

After being through this "grub hell", at least will have learnt a lot
about broken BIOSes and different boot stages of today's PC hardware (a
lot of ancient compatibility bullshit).

-hwh
-- 
[EMAIL PROTECTED] mailing list

Reply via email to