From 92f540c3c49410c14330c512c7e5ae9b546d87d9 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 31 Jul 2016 15:13:37 +0100 Subject: Deprecating extlinux Working around extlinux failure with ext4. Adding notes on the reasons for moving to grub as default bootloader in a future release. --- vmdebootstrap/extlinux.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'vmdebootstrap') diff --git a/vmdebootstrap/extlinux.py b/vmdebootstrap/extlinux.py index b37ee7e..648fce4 100644 --- a/vmdebootstrap/extlinux.py +++ b/vmdebootstrap/extlinux.py @@ -91,12 +91,19 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro %(kserial)s ext_f = open(conf, 'w') ext_f.write(msg) - runcmd(['extlinux', '--install', rootdir]) - runcmd(['sync']) - time.sleep(2) + def run_extlinux_install(self, rootdir): + if os.path.exists("/usr/bin/extlinux"): + self.message('Running extlinux --install') + runcmd(['extlinux', '--install', rootdir]) + runcmd(['sync']) + time.sleep(2) + else: + msg = "extlinux enabled but /usr/bin/extlinux not found" \ + " - please install the extlinux package." + raise cliapp.AppException(msg) def install_mbr(self): - if not self.settings['mbr'] and not self.settings['extlinux']: + if not self.settings['mbr'] or not self.settings['extlinux']: return if os.path.exists("/sbin/install-mbr"): self.message('Installing MBR') -- cgit v1.2.1