changing size attrib to stop
This commit is contained in:
parent
d6f4548b88
commit
3f8c626fca
2
aif.xsd
2
aif.xsd
@ -144,7 +144,7 @@
|
||||
<xs:complexType>
|
||||
<xs:attribute name="num" type="xs:positiveInteger" use="required" />
|
||||
<xs:attribute name="start" type="disksize" use="required" />
|
||||
<xs:attribute name="size" type="disksize" use="required" />
|
||||
<xs:attribute name="stop" type="disksize" use="required" />
|
||||
<xs:attribute name="fstype" type="fstype" use="required" />
|
||||
</xs:complexType>
|
||||
<xs:unique name="unique-partnum">
|
||||
|
@ -404,7 +404,7 @@ class archInstall(object):
|
||||
disksize['max'] = subprocess.check_output(['sgdisk', '-E', d])
|
||||
for p in partnums:
|
||||
# Need to do some mathz to get the actual sectors if we're using percentages.
|
||||
for s in ('start', 'size'):
|
||||
for s in ('start', 'stop'):
|
||||
val = self.disk[d]['parts'][str(p)][s]
|
||||
if '%' in val:
|
||||
stripped = val.replace('%', '')
|
||||
@ -419,7 +419,7 @@ class archInstall(object):
|
||||
for p in partnums:
|
||||
size = {}
|
||||
size['start'] = self.disk[d]['parts'][str(p)]['start']
|
||||
size['end'] = self.disk[d]['parts'][str(p)]['size']
|
||||
size['end'] = self.disk[d]['parts'][str(p)]['stop']
|
||||
fstype = self.disk[d]['parts'][str(p)]['fstype'].lower()
|
||||
if fstype not in fstypes.keys():
|
||||
print('Filesystem type {0} is not valid. Must be a code from:\nCODE:FILESYSTEM'.format(fstype))
|
||||
@ -429,7 +429,7 @@ class archInstall(object):
|
||||
cmds.append(['sgdisk',
|
||||
'-n', '{0}:{1}:{2}'.format(str(p),
|
||||
self.disk[d]['parts'][str(p)]['start'],
|
||||
self.disk[d]['parts'][str(p)]['size']),
|
||||
self.disk[d]['parts'][str(p)]['stop']),
|
||||
#'-c', '{0}:"{1}"'.format(str(p), self.disk[d]['parts'][str(p)]['label']), # TODO: add support for partition labels
|
||||
'-t', '{0}:{1}'.format(str(p), fstype),
|
||||
d])
|
||||
|
@ -217,12 +217,12 @@ The `/aif/storage/disk/part` element holds information on partitioning that it's
|
||||
^|Attribute ^|Value
|
||||
^m|num |The partition number (positive integer)
|
||||
^m|start |The amount of the *total disk size* to _start_ the partition at (see <<specialsize, below>>)
|
||||
^m|size |The amount of the *total disk size* to _end_ the partition at (see <<specialsize, below>>)
|
||||
^m|stop |The amount of the *total disk size* to _end_ the partition at (see <<specialsize, below>>)
|
||||
^m|fstype |The partition type. Must be in http://www.rodsbooks.com/gdisk/cgdisk-walkthrough.html[gdisk format^] (see <<fstypes, below>>)
|
||||
|======================
|
||||
|
||||
[[specialsize]]
|
||||
The `start` and `size` attributes can be in the form of:
|
||||
The `start` and `stop` attributes can be in the form of:
|
||||
|
||||
* A percentage, indicated by a percentage sign (`"10%"`)
|
||||
* A size, indicated by the abbreviation (`"300K"`, `"30G"`, etc.)
|
||||
|
@ -4,8 +4,8 @@
|
||||
xsi:schemaLocation="http://aif.square-r00t.net aif.xsd">
|
||||
<storage>
|
||||
<disk device="/dev/sda" diskfmt="gpt">
|
||||
<part num="1" start="0%" size="10%" fstype="ef00" />
|
||||
<part num="2" start="10%" size="100%" fstype="8300" />
|
||||
<part num="1" start="0%" stop="10%" fstype="ef00" />
|
||||
<part num="2" start="10%" stop="100%" fstype="8300" />
|
||||
</disk>
|
||||
<mount source="/dev/sda2" target="/mnt/aif" order="1" />
|
||||
<mount source="/dev/sda1" target="/mnt/aif/boot" order="2" />
|
||||
|
@ -4,9 +4,9 @@
|
||||
xsi:schemaLocation="https://aif.square-r00t.net aif.xsd">
|
||||
<storage>
|
||||
<disk device="/dev/sda" diskfmt="gpt">
|
||||
<part num="1" start="0%" size="10%" fstype="ef00" />
|
||||
<part num="2" start="10%" size="80%" fstype="8300" />
|
||||
<part num="3" start="80%" size="100%" fstype="8200" />
|
||||
<part num="1" start="0%" stop="10%" fstype="ef00" />
|
||||
<part num="2" start="10%" stop="80%" fstype="8300" />
|
||||
<part num="3" start="80%" stop="100%" fstype="8200" />
|
||||
</disk>
|
||||
<mount source="/dev/sda2" target="/mnt/aif" order="1" />
|
||||
<mount source="/dev/sda1" target="/mnt/aif/boot" order="2" />
|
||||
|
Loading…
Reference in New Issue
Block a user