[RndTbl] Tips for using grub?

John Lange john at johnlange.ca
Mon Aug 31 16:15:39 CDT 2009


Just wondering if anyone has any tips on using grub?

The grub command that writes the MBR is "setup (hdX)". The problem is
figuring out which drive is the "root" drive.

In a situation where you are trying to write the MBR on a drive that
isn't the one you booted from, this turns out to be non-trivial.

You can use grub's "find" command to look for a file like "find
/boot/grub/grub.conf", but if several attached drives have the same
file than this doesn't help much.

Even worse, if the system is multipathed, the same device will be
returned several times. I have a system here that I'm testing with and
it has 4 paths to each device. The "find" command returns 4 results
for every attached device.

Anyone have a tip for how to figure out which one is the one I want?

BTW, I'm trying to document this for a recovery procedure so it would
be common to have several attached devices with almost identical file
systems.

---
John Lange
www.johnlange.ca


More information about the Roundtable mailing list