All that the commands do is tell grub where are the files and install it on the mbr. I suppose your Ubuntu install fucked the grub install from Mandriva trying to install its own buggy one. If that was the last version of Ubuntu, it's probably grub2, which should not be used (it's still beta software).
If you want to know more about grub, you should read the manual:
http://www.gnu.org/software/grub/manual/grub.html
(grub2 coming soon to obsolete all that)
This is a long read. In short, you can access the grub interface with the grub command. At grub prompt, type 'help' to see a list of grub commands. The root command tells grub where to find the files and the setup command tells it to write itself to the hard drive.
If you have a lot of time and want to know a lot about how GNU/linux boots and works, you can install LFS on a spare partition:
http://www.linuxfromscratch.org/
It takes about 1 week if you take the time to understand everything. When you've done that, a lot of things appear very clear.