grub-install: Change test to use /dev/sda instead of /dev/vda.

The previous test for grub-install hard-coded /dev/vda (ie. assuming
virtio-blk instead of more modern virtio-scsi).

This changes the test to hard-code /dev/sda instead.  However this
change is still not correct since /dev/sda will be adjusted by block
device name translation in the call to grub-install, but not what is
written to /boot/grub/device.map.

Since we no longer support grub-install on Fedora, this won't affect
things, but Ubuntu still has a 'grub-install' command (although it's
actually from grub2).
This commit is contained in:
Richard W.M. Jones
2013-04-22 13:59:01 +01:00
parent 2e6e77fd02
commit 50003c8cba

View File

@@ -4766,8 +4766,8 @@ C<guestfs_is_zero_device>" };
tests = [
InitBasicFS, Always, TestResultTrue (
[["mkdir_p"; "/boot/grub"];
["write"; "/boot/grub/device.map"; "(hd0) /dev/vda"];
["grub_install"; "/"; "/dev/vda"];
["write"; "/boot/grub/device.map"; "(hd0) /dev/sda"];
["grub_install"; "/"; "/dev/sda"];
["is_dir"; "/boot"]])
];
shortdesc = "install GRUB 1";