My understanding is that when I install GRUB, a primary OS loader gets written to the MBR and a secondary OS loader (the bulk of GRUB) gets written to some other partition. In normal operation, the primary OS loader in the MBR has enough information to transfer control to the secondary loader, which then reads all the partitions (primary and extended) and brings up the familiar GRUB menu.
In the past I have formatted a linux partition and ended up in GRUB rescue mode. Is the code which runs grub rescue located entirely within the MBR (I believe this is 'boot.img')?