From: Neil Williams Date: Sat, 2 May 2015 19:52:25 +0000 (+0100) Subject: Set a default boot partition offset with grub X-Git-Url: https://git.siccegge.de//index.cgi?p=forks%2Fvmdebootstrap.git;a=commitdiff_plain;h=6200c39f9d232d7b4b34b8104b04eab1000dc544 Set a default boot partition offset with grub Installing grub with boot partition requires an offset before the first partition. Closes: #782307. --- diff --git a/vmdebootstrap b/vmdebootstrap index 1b863e8..91dc802 100755 --- a/vmdebootstrap +++ b/vmdebootstrap @@ -333,6 +333,8 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth partoffset = self.settings['bootoffset'] / (1024 * 1024) self.message("Using bootoffset: %smib %s bytes" % (partoffset, self.settings['bootoffset'])) if self.settings['bootsize'] and self.settings['bootsize'] is not '0%': + if self.settings['grub'] and not partoffset: + partoffset = 1 bootsize = self.settings['bootsize'] / (1024 * 1024) bootsize += partoffset self.message("Using bootsize %smib: %s bytes" % (bootsize, self.settings['bootsize']))