Dennis Gilmore f464c4
From 3ed30fbcad47518c9ffbc66dfb4967ad2ab6a390 Mon Sep 17 00:00:00 2001
Dennis Gilmore f464c4
From: Dennis Gilmore <dennis@ausil.us>
Dennis Gilmore f464c4
Date: Wed, 22 May 2013 00:04:10 -0500
Dennis Gilmore f464c4
Subject: [PATCH] start at 1mb leaving the first mb free read the uuid earlier
Dennis Gilmore f464c4
 on /boot/uboot for some reason reading after toggling partition settings
Dennis Gilmore f464c4
 fails.
Dennis Gilmore f464c4
Dennis Gilmore f464c4
---
Dennis Gilmore f464c4
 appcreate/partitionedfs.py | 4 ++--
Dennis Gilmore f464c4
 1 file changed, 2 insertions(+), 2 deletions(-)
Dennis Gilmore f464c4
Dennis Gilmore f464c4
diff --git a/appcreate/partitionedfs.py b/appcreate/partitionedfs.py
Dennis Gilmore f464c4
index 0271dc5..9401d0f 100644
Dennis Gilmore f464c4
--- a/appcreate/partitionedfs.py
Dennis Gilmore f464c4
+++ b/appcreate/partitionedfs.py
Dennis Gilmore f464c4
@@ -92,7 +92,7 @@ class PartitionedMount(Mount):
Dennis Gilmore f464c4
             logging.debug("Assigned %s to %s%d at %d at size %d" % (p['mountpoint'], p['disk'], p['num'], p['start'], p['size']))
Dennis Gilmore f464c4
 
Dennis Gilmore f464c4
         # XXX we should probably work in cylinder units to keep fdisk happier..
Dennis Gilmore f464c4
-        start = 0
Dennis Gilmore f464c4
+        start = 1
Dennis Gilmore f464c4
         logging.debug("Creating partitions")
Dennis Gilmore f464c4
         for p in self.partitions:
Dennis Gilmore f464c4
             d = self.disks[p['disk']]
Dennis Gilmore f464c4
@@ -254,11 +254,11 @@ class PartitionedMount(Mount):
Dennis Gilmore f464c4
             if mp == '/boot/uboot':
Dennis Gilmore f464c4
                 subprocess.call(["/sbin/mkfs.vfat", "-F", "32", "-n", "_/boot/uboot", p['device']])
Dennis Gilmore f464c4
                 subprocess.call(["/bin/mkdir", "-p", "%s%s" % (self.mountdir, p['mountpoint'])])
Dennis Gilmore f464c4
+                p['UUID'] = self.__getuuid(p['device'])
Dennis Gilmore f464c4
                 # mark the partition bootable
Dennis Gilmore f464c4
                 subprocess.call(["/sbin/parted", "-s", self.disks[p['disk']]['disk'].device, "set", str(p['num']), "boot", "on"])
Dennis Gilmore f464c4
                 # make sure that the partition type is correct
Dennis Gilmore f464c4
                 subprocess.call(["/sbin/sfdisk", "--change-id", self.disks[p['disk']]['disk'].device, str(p['num']), "c",])
Dennis Gilmore f464c4
-                p['UUID'] = self.__getuuid(p['device'])
Dennis Gilmore f464c4
                 continue
Dennis Gilmore f464c4
 
Dennis Gilmore f464c4
             if mp == 'biosboot':
Dennis Gilmore f464c4
-- 
Dennis Gilmore f464c4
1.8.2.1
Dennis Gilmore f464c4