[Vmdebootstrap-devel] Bug#742267: [PATCH] grub2: only install extlinux if grub installation fails

Jan Gerber j at mailb.org
Fri Apr 10 08:27:55 UTC 2015


---
 vmdebootstrap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vmdebootstrap b/vmdebootstrap
index 63ade3a..92abd44 100755
--- a/vmdebootstrap
+++ b/vmdebootstrap
@@ -623,10 +623,10 @@ class VmDebootstrap(cliapp.Application):  # pylint: disable=too-many-public-meth
             self.runcmd(['chroot', rootdir, 'grub-install', install_dev])
         except cliapp.AppException:
             self.message("Failed. Is grub2-common installed? Using extlinux.")
+            self.install_extlinux(rootdev, rootdir)
         self.runcmd(['umount', os.path.join(rootdir, 'sys')])
         self.runcmd(['umount', os.path.join(rootdir, 'proc')])
         self.runcmd(['umount', os.path.join(rootdir, 'dev')])
-        self.install_extlinux(rootdev, rootdir)
 
     def install_extlinux(self, rootdev, rootdir):
         if not os.path.exists("/usr/bin/extlinux"):
-- 
2.2.1.209.g41e5f3a



More information about the Vmdebootstrap-devel mailing list