Trouble is, it wasn't that easy. Every time I tried to use GRUB to setup the MBR, I got various errors - the long ang short of it was that GRUB couldn't see the files on the partition, even though I'd chroot'ed, and could see them perfectly.
The solution to my problem was twofold. Firstly, I hadn't created the partition properly. GRUB only works with partitions that use a inode size of 128, so I had to create the ext3 partition with...
mkfs -t ext3 -I 128 /dev/sda2
The next stage (after I recovered the data) was to chroot to the mounted /dev/sda2, and run GRUB in interactive mode, to setup the MBR - but still no luck, no files could be found. The reason was twofold
- The linux recovery system CD used had /dev/hda as the IDE disk, not /dev/sda, so I changed my linux recovery system CD to one that used the same devices as my virtual linux system.
- The sys, proc and dev points mounted as chroot did not match my current rescue system, so I needed to do the following before chrooting...
mount -t ext3 /dev/sda1 /mntOnce this was all done, I was able to run the GRUB interactive setup correctly. Interestingly, the inode size of 128 can also affect LILO too...
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt /bin/bash
For more information, please look at http://wiki.archlinux.org/index.php/Reinstalling_GRUB.