add patch to read vfat uuid earlier

- leave first mb free
- fix writing out kickstart file
This commit is contained in:
Dennis Gilmore 2013-05-22 00:09:53 -05:00
parent 347b0baa91
commit f464c41ac1
2 changed files with 46 additions and 1 deletions

View File

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

View File

@ -5,7 +5,7 @@
Summary: Tools for building Appliances
Name: appliance-tools
Version: 006.5
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
Group: System Environment/Base
URL: http://thincrust.org/
@ -16,6 +16,7 @@ URL: http://thincrust.org/
# git checkout appliance-tools-006.2
# make dist
Source0: appliance-tools-%{version}.tar.bz2
Patch0: 0001-start-at-1mb-leaving-the-first-mb-free.patch
Requires: livecd-tools >= 020 curl rsync kpartx
Requires: zlib
Requires: qemu-img
@ -39,6 +40,7 @@ Tool that helps remove unwanted files from the appliance image.
%prep
%setup -q
%patch1 -p1
%build
make
@ -71,6 +73,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/image-minimizer
%changelog
* Wed May 22 2013 Dennis Gilmore <dennis@ausil.us> - 006.5-2
- add patch to read vfat uuid earlier
- leave first mb free
* Sun May 19 2013 Dennis Gilmore <dennis@ausil.us> - 006.5-1
- fix writing out kickstart file