For properly understanding GRUB

If none of the more specific forums is the right place to ask

For properly understanding GRUB

Postby grautu » 2005-10-07 21:12

Hello!
This thread concerns the well known theme of reinstalling GRUB in MBR (by lifting it from a Linux root partition located at /dev/hdaX).
1) Assume there is a single HDD, with multiple boot (the debian root partition is on /dev/hdaX).
2) Assume the bootloader in MBR is NTLDR (not GRUB) but GRUB is installed in /dev/hdaX.
3) Keep in mind that the GRUB boot menu from /dev/hdaX contains several items such as "Debian", "Windows" etc.
4) I did reinstall GRUB in MBR, in order to verify the technique of mirroring it from /dev/hdaX to MBR.
5) The effect was that GRUB did reinstall in MBR indeed, but in a surprising manner (surprising for me at least): after reboot, I only obtained the "grub>" prompt, without any boot menu.
6) However, if manually booting from that "grub>" prompt (by pointing to /dev/hdaX) I did eventually obtained my older boot menu (with "Debian", "Windows" etc).
7) Therefore I was wrong in my expectations: I was believing that the newly reinstalled GRUB (from /dev/hdaX to MBR) will also provide me with the former boot menu. It was not the case.
The question: Is my case typical or is it more or less strange?
8) Here is the code which I used to reinstall GRUB. I started from the user Knoppix prompt "$" while "#" stands for the root prompt.
Code: Select all
$ su -
# mkdir /temporary
# mount /dev/hdaX /temporary
# chroot /temporary
# grub-install /dev/hda

9) Here is the code which I used under the "grub>" prompt, in order to load Debian.
Code: Select all
grub> root (hd0, X-1)
grub> chainloader +1
grub> boot

Of course, the "X-1" expression above was a concrete digit.
I would appreciate any comments on whether or not the code from 8) was the "right" one, from the point of view of cellebrated recipes. If positive: is it normal to merely obtain the "grub>" prompt, without the boot menu from /dev/hdaX?
Thanks!
grautu
 
Posts: 49
Joined: 2005-09-04 16:58

Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable