[conspire] Help with GRUB
Rick Moen
rick at linuxmafia.com
Mon Nov 9 18:40:23 PST 2009
Quoting Paul Zander (paulz at ieee.org):
> > I really do recommend that you start with the two links I
> > posted
> > immediately as recommended resources. Here they are
> > again:
> >
> > http://lignuxer.blogspot.com/2007/02/restoring-gnu-grub_15.html
>
> The sequence of "find", "root", "setup", "quit" which I tried were from
> this link.
Yes, I see that, now. It should be noted that the page has this as
step 7, "Now we are ready to install grub...." That's great, but it
should be clearly understood that you _are_ doing an actual
installation, i.e., writing boot-directions information to somewhere
you've specified higher up.
I notice that the author doesn't bother informing GRUB (the command-line
processor at boot time) about specifically where the Linux kernel is that
he or she is trying to boot. Maybe GRUB finds it via default filenames
and standard location (/boot) after being helped to find the root
filesystem. (As I said, I'm not very familiar with the details of this
stuff.)
But my point ("it should be clearly understood") is that you might want
to make sure your theory of how to boot at the GRUB command line works
well, prior to writing boot information to your hard disk -- regardless
of what Web pages say, even ones I've called to your attention. ;->
> I also found this URL which specifically mentions the drive mapping.
> So far, it has not been the magic bullet I need.
> http://ubuntuforums.org/showthread.php?t=294074
Er, I _believe_ that's a special trick to make GRUB compensate for the
user having confused MS-Windows by originally installing it to the
first primary partition (hd0,0 in GRUB language), but then insert an
additional hard drive into the chain and make _it_ the first primary
partition. (Late addition: My suspicion to that effect is confirmed
by the www.linuxselfhelp.com link referred to below.) NT OS Loader
doesn't like expecting to start MS-Windows from hd0,0 only to find that
it's unexpectedly on hd1,0 -- so the described trickery "remaps the
drives so that the windows bootloader does not get confused", as the
page says.
That would be relevant to your situation if you have been fooling around
with the drive population or cabling or jumpering, and have thereby
moved your MS-Windows drive away from being first in boot order. Did
you? So far, all you've mentioned having done is having some joker
re-install the OS (which, as mentioned, results in Microsoft wiping out
whatever you had in the MBR).
> I made sure that I had extra copies of menu.lst so I could back out
> what I had done.
>
> So before receiving your email, I modified menu.lst with
> root(hd2,4) and it boots Debian just fine.
OK, good. By the way, I wasn't clear on your Linux installation being
there. Until this point, I was inferring that it was somewhere on your
boot drive -- on what GRUB calls hd0.
> I could not find a similar workaround for MS.
Well, what lines does menu.lst contain concerning MS-Window booting?
Before we can figure out what's going wrong, you really need to know
what the startup-time bootloader code is _attempting_. Get those
steps from your former menu.lst, and try them out at the GRUB prompt
manually. If you've done something to change your partitions or hard
drives, that might need to be taken into account.
I posted the default contents of the standard Debian menu.lst concerning
booting MS-Windows earlier. Here it is again:
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
I was kind of expecting that you'd be trying something like that (i.e.,
at the boot-time GRUB command line -- _prior_ to mucking about in
menu.lst on disk), which is why I posted it. Did you? Why not?
Web-searching for "grub chainloader" seems to get useful results, such
as http://www.linuxselfhelp.com/gnu/grub/html_chapter/grub_4.html .
You can Web-search too, y'know. I normally don't go looking for such
things, because I don't use GRUB for anything but running Linux (which
keeps my life simple, and I don't have to debug strange bootloader
problems), but it's obviously relevant to _you_. If I were you, I'd
have already sought that out.
And, please confirm: Your MS-Windows partition _is_ on the first
primary partition of your hard drive that's first in bootable order,
right? That question is relevant to what you want to try, i.e., how you
need to modify anything you find on a Web page (or mailing list post) to
match the situation in front of you.
> Now after booting from RescueCD.
> (I am hand copying this between computer screens.
> so pardon possible typos.)
>
> grub> find /boot/grub/stage1
> (hd0,4)
> grub> root (hd0,4)
> Filesystem is ext2fs, partition type is 0x83
Um, yeah, but... When you boot a live CD, I would expect that hd0 (and
/dev/sda) might well be the _CD_ at that time. I could be wrong.
I'm unclear on why you're introducing a CD into the picture, which is
just adding another variable: The hard drive boot is giving you a GRUB
prompt, right? So, you can work from it, rather than using a live CD.
Anyway, hope the helps. I'm not even really the right guy to give you
advice, for reasons I've mentioned.
More information about the conspire
mailing list