Don't assume grub is on a separate boot filesystem
authorMatthew Booth <mbooth@redhat.com>
Thu, 13 Aug 2009 10:48:27 +0000 (11:48 +0100)
committerMatthew Booth <mbooth@redhat.com>
Thu, 13 Aug 2009 11:17:58 +0000 (12:17 +0100)
commitda90c9d8761caced81b9cf7d6e41180afa53ecb9
tree05da1a3741a5a40c74c923bc3e418acdaba025cf
parentd082a76d679b019784bc0b131028ee74e381f4a2
Don't assume grub is on a separate boot filesystem

Paths in grub.conf are relative to the filesystem containing it. grub parsing
currently assumes that it is on /boot, and will fail if it isn't, for example
because a guest only has a single partition.

This patch makes grub parsing work harder to work out what grub paths are
relative to. Firstly, it looks for a previous detected 'linux-grub' filesystem.
If this isn't found, it tries to work out which filesystem contains
/boot/grub/menu.lst and uses that.
perl/lib/Sys/Guestfs/Lib.pm