Fix swap partition type creation, Set boot partition as bootable
This commit is contained in:
parent
f83e619312
commit
17a47898e2
|
@ -0,0 +1,31 @@
|
||||||
|
--- appliance-tools-007.8/appcreate/partitionedfs.py.orig 2016-09-20 12:42:15.950885273 +0100
|
||||||
|
+++ appliance-tools-007.8/appcreate/partitionedfs.py 2016-09-20 12:42:25.905888013 +0100
|
||||||
|
@@ -77,7 +77,7 @@
|
||||||
|
|
||||||
|
d = self.disks[p['disk']]
|
||||||
|
d['numpart'] += 1
|
||||||
|
- if d['numpart'] > 3 and self.partition_layout == 'msdos':
|
||||||
|
+ if d['numpart'] > 4 and self.partition_layout == 'msdos':
|
||||||
|
# Increase allocation of extended partition to hold this partition
|
||||||
|
d['extended'] += p['size']
|
||||||
|
p['type'] = 'logical'
|
||||||
|
@@ -106,6 +106,8 @@
|
||||||
|
logging.debug("Add %s part at %d of size %d" % (p['type'], p['start'], p['size']))
|
||||||
|
if p['fstype'].startswith('ext'):
|
||||||
|
fstype = 'ext2'
|
||||||
|
+ if p['fstype'].startswith('swap'):
|
||||||
|
+ fstype = 'linux-swap'
|
||||||
|
if p['fstype'] == 'vfat':
|
||||||
|
fstype = 'fat32'
|
||||||
|
rc = subprocess.call(["/sbin/parted", "-a", "opt", "-s", d['disk'].device, "mkpart",
|
||||||
|
@@ -264,6 +266,10 @@
|
||||||
|
p['UUID'] = self.__getuuid(p['device'])
|
||||||
|
continue
|
||||||
|
|
||||||
|
+ if mp == '/boot':
|
||||||
|
+ # mark the partition bootable
|
||||||
|
+ subprocess.call(["/sbin/parted", "-s", self.disks[p['disk']]['disk'].device, "set", str(p['num']), "boot", "on"])
|
||||||
|
+
|
||||||
|
if mp == 'biosboot':
|
||||||
|
subprocess.call(["/sbin/parted", "-s", self.disks[p['disk']]['disk'].device, "set", "1", "bios_grub", "on"])
|
||||||
|
continue
|
|
@ -5,7 +5,7 @@
|
||||||
Summary: Tools for building Appliances
|
Summary: Tools for building Appliances
|
||||||
Name: appliance-tools
|
Name: appliance-tools
|
||||||
Version: 007.8
|
Version: 007.8
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: https://git.fedorahosted.org/git/appliance-tools.git
|
URL: https://git.fedorahosted.org/git/appliance-tools.git
|
||||||
|
@ -18,7 +18,7 @@ URL: https://git.fedorahosted.org/git/appliance-tools.git
|
||||||
# make dist
|
# make dist
|
||||||
Source0: appliance-tools-%{version}.tar.bz2
|
Source0: appliance-tools-%{version}.tar.bz2
|
||||||
Patch0: appliance-tools-nss.hack
|
Patch0: appliance-tools-nss.hack
|
||||||
Patch1: at-fix-primary-part.patch
|
Patch1: appliance-tools-partitioning-fixes.patch
|
||||||
|
|
||||||
Requires: livecd-tools >= 020 curl rsync kpartx
|
Requires: livecd-tools >= 020 curl rsync kpartx
|
||||||
Requires: zlib
|
Requires: zlib
|
||||||
|
@ -67,6 +67,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{python_sitelib}/ec2convert/*.pyc
|
%{python_sitelib}/ec2convert/*.pyc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 20 2016 Peter Robinson <pbrobinson@fedoraproject.org> 007.8-10
|
||||||
|
- Fix swap partition type creation
|
||||||
|
- Set boot partition as bootable
|
||||||
|
|
||||||
* Sat Sep 17 2016 Peter Robinson <pbrobinson@fedoraproject.org> 007.8-9
|
* Sat Sep 17 2016 Peter Robinson <pbrobinson@fedoraproject.org> 007.8-9
|
||||||
- Allow 4 primary partitions
|
- Allow 4 primary partitions
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- appliance-tools-007.8/appcreate/partitionedfs.py.orig 2016-09-15 19:14:08.895912451 +0000
|
|
||||||
+++ appliance-tools-007.8/appcreate/partitionedfs.py 2016-09-15 19:24:12.223323876 +0000
|
|
||||||
@@ -77,7 +77,7 @@
|
|
||||||
|
|
||||||
d = self.disks[p['disk']]
|
|
||||||
d['numpart'] += 1
|
|
||||||
- if d['numpart'] > 3 and self.partition_layout == 'msdos':
|
|
||||||
+ if d['numpart'] > 4 and self.partition_layout == 'msdos':
|
|
||||||
# Increase allocation of extended partition to hold this partition
|
|
||||||
d['extended'] += p['size']
|
|
||||||
p['type'] = 'logical'
|
|
Loading…
Reference in New Issue