]> git.siccegge.de Git - forks/vmdebootstrap.git/commitdiff
Erf, undo the removal of mbr
authorLars Wirzenius <liw@liw.fi>
Sat, 6 Apr 2013 08:59:43 +0000 (09:59 +0100)
committerLars Wirzenius <liw@liw.fi>
Sat, 6 Apr 2013 08:59:43 +0000 (09:59 +0100)
Faulty testing on my part.

README
vmdebootstrap

diff --git a/README b/README
index 75e6f3b8d4b528c778e7807db7c144b79f2b838c..31ed67e225d7d67e0185fd0ee0250d6ec96a621f 100644 (file)
--- a/README
+++ b/README
@@ -18,6 +18,7 @@ In order to use vmdebootstrap, you'll need a few things:
 * extlinux
 * qemu-img (in the qemu-utils package in Debian)
 * parted
+* mbr
 * kpartx
 * python-cliapp (see http://liw.fi/cliapp/)
 
index b675b22599e2f0ba92debb3c0c415d36dbc7e567..9dd9ba54a6899324ed83704861a1a9eabffd5998 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-# Copyright 2011, 2012, 2013  Lars Wirzenius
+# Copyright 2011, 2012  Lars Wirzenius
 # Copyright 2012  Codethink Limited
 # 
 # This program is free software: you can redistribute it and/or modify
@@ -92,6 +92,7 @@ class VmDebootstrap(cliapp.Application):
             if self.settings['image']:
                 self.create_empty_image()
                 self.partition_image()
+                self.install_mbr()
                 rootdev = self.setup_kpartx()
                 self.mkfs(rootdev)
                 rootdir = self.mount(rootdev)
@@ -164,6 +165,10 @@ class VmDebootstrap(cliapp.Application):
         self.runcmd(['parted', '-s', self.settings['image'],
                      'set', '1', 'boot', 'on'])
 
+    def install_mbr(self):
+        self.message('Installing MBR')
+        self.runcmd(['install-mbr', self.settings['image']])
+
     def setup_kpartx(self):
         out = self.runcmd(['kpartx', '-av', self.settings['image']])
         devices = [line.split()[2]