]> git.siccegge.de Git - forks/vmdebootstrap.git/commitdiff
Set a default boot partition offset with grub
authorNeil Williams <codehelp@debian.org>
Sat, 2 May 2015 19:52:25 +0000 (20:52 +0100)
committerNeil Williams <codehelp@debian.org>
Sat, 2 May 2015 19:52:25 +0000 (20:52 +0100)
Installing grub with boot partition requires an offset before
the first partition. Closes: #782307.

vmdebootstrap

index 1b863e8ec78e3c8b36185cd8c2090c291c5b8025..91dc8025a5a7e0b90853e68ae04a5609f8e6345c 100755 (executable)
@@ -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']))