For those who are already aware Grub has an unique feature that you can communicate with it before an operating system is booted. The instruction to talk to Grub is given in any text Grub menu screen by pressing the "c" key and return. Then you will be greeted by a command prompt known as Grub prompt. In this mode Grub has an command interpretor very much like Dos or any mini operating system. Both Grub1 and Grub2 have such capability. The biggest secret in Linux I have found is that there in no installed operating system in a PC Grub cannot boot in a Grub prompt. A little bit of knowledge of it will enable you to kiss all your booting problems good bye.
There are significant differences between Grub1 (version 0.9x) and Grub2 (version 1.x) so the best way is to treat them as two different boot loaders. A bit of mixing is possible as described below.
For direct booting Grub2 can boot an installed Linux packaged with Grub1 but not necessarily the other way round. This is because a distro shipped with Grub2 may have Ext4 filing system installed by default. Grub1 cannot read a Ext4 filing system.
For indirect booting both Grub1 and Grub2 can boot each other by chainloading as the filing system is not involved. Indeed this is why Grub1 not able to read a NTFS partition but still manages to boot the boot loader inside of any MS Windows, regardless it is an old WIn2k or the Win7 that is in a trial stage.
How to get hold of Grub2 May be there is a better way but I used a Grub2 floppy or a Grub2 CD. Each can only be made from a Live CD that has been shipped with Grub2, like Ubuntu 9.10. All you need to do is to boot up such a Linux Live CD, get into a root terminal, put a floppy into the drive and issue the following commands (originated from FranklinPiat/grub-mkrescue.manpage - GRUB Wiki)
grub-mkrescue --image-type=floppy /tmp/grub-rescue.flp dd if=/tmp/grub-rescue.flp of=/dev/fd0 bs=1024
grub-mkrescue --image-type=cdrom /tmp/grub-rescue.iso wodim /tmp/grub-rescue.iso
Thereafter either medium boots you to a command prompt in Grub2.
As similar to Grub1 there should be no installed PC system that cannot be booted by a Grub prompt from Grub2. I tried different Linux and MS Windows and can confirm this. This is done by indirect booting using chainloading.
Indirect booting by chainloading
For Grub1 if you want to fire up an OS, which can be any Dos, MS Windows, BSD, Solaris or Linux, installed in the 2nd partition of the 1st disk the Grub Legacy commands will be
root (hd0,1) chainloader +1 boot
set root=(hd0,2) chainloader +1 boot
Direct booting by naming the kernel and initrd files
Grub1 and Grub2 can boot only OSes they support and since MS Windows are not supported no direct booting is possible.
There are similar small changes in commands between Grub1 and Grub2 here.
Say if I have a Linux in same partition as the above.
In a standard Linux the kernel name always starts with vmlinuz and the initrd file starts with initrd. These files by default are stored in the /boot subdirectory. Both Grub1 and Grub2 can do completion with the tab key so if I type
Say if my Linux has vmlinuz-2.6.18-6-686 and initrd.img-2.6.18-6-686 in /boot subdirectory one can boot up the Linux with Grub1 commands of
root (hd0,1) kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda11 ro initrd /boot/initrd.img-2.6.18-6-686 boot
set root=(hd0,2) linux /boot/vmlinuz-2.6.18-6-686 root=/dev/sda11 initrd /boot/initrd.img-2.6.18-6-686 boot
The above is just an early report of Grub2 which is beginning to show its face in September 2009. It is still an early stage to see how it performs in practice. The current documentation is still in an appalling state. However for a few hours playing with it Grub2 appears to be reasonably complete. It is about 3 to 4 years overdue.
I found out Grub2's can be restored in its root partition by Grub2 commands identical to Grub1. You need to first fire up the Linux with Grub2 using the direct method, say this is in partition sda16, and issue this command in a root console
root (hd0,15) chainloader +1 boot
in grub shell type help
You will find "linux" listed there.
Also the command "ls" and "cat" are pretty useful too.
"ls" list the files and directories like