X-Git-Url: https://git.siccegge.de//index.cgi?p=forks%2Fvmdebootstrap.git;a=blobdiff_plain;f=vmdebootstrap;h=500fa77e30a0d4e0d3fe86e2150f85fe5fe76906;hp=99ef25622f39e093bd5782cc632c55bb9b211151;hb=075e61745a15d15cda9fa756127f7136b813a3ac;hpb=545b3e5065fa1f57540cb01255d911d3c5ef2f96 diff --git a/vmdebootstrap b/vmdebootstrap index 99ef256..500fa77 100755 --- a/vmdebootstrap +++ b/vmdebootstrap @@ -158,7 +158,7 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth 'Create an apt source based on the distribution and mirror selected.') self.settings.boolean( ['mbr'], - 'Run install-mbr (no longer done by default)') + 'Run install-mbr (default if extlinux used)') self.settings.boolean( ['grub'], 'Install and configure grub2 - disables extlinux.') @@ -187,7 +187,7 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth if self.settings['image']: self.create_empty_image() self.partition_image() - if self.settings['mbr']: + if self.settings['mbr'] or self.settings['extlinux']: self.install_mbr() (rootdev, bootdev) = self.setup_kpartx() self.mkfs(rootdev, fstype=roottype) @@ -340,6 +340,10 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth if os.path.exists("/sbin/install-mbr"): self.message('Installing MBR') self.runcmd(['install-mbr', self.settings['image']]) + else: + msg = "mbr enabled but /sbin/install-mbr not found" + " - please install the mbr package." + raise cliapp.AppException(msg) def setup_kpartx(self): bootindex = None