diff options
author | Neil Williams <codehelp@debian.org> | 2015-05-02 20:52:25 +0100 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2015-05-02 20:52:25 +0100 |
commit | 6200c39f9d232d7b4b34b8104b04eab1000dc544 (patch) | |
tree | 91cbf568593042e0d4155e4dc53d62f25e1ba02c /vmdebootstrap | |
parent | 94d2cded1ec9cb98a2f1f9b0fe34d64fec1cc1f9 (diff) | |
download | vmdebootstrap-6200c39f9d232d7b4b34b8104b04eab1000dc544.tar.gz |
Set a default boot partition offset with grub
Installing grub with boot partition requires an offset before
the first partition. Closes: #782307.
Diffstat (limited to 'vmdebootstrap')
-rwxr-xr-x | vmdebootstrap | 2 |
1 files changed, 2 insertions, 0 deletions
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'])) |