mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 08:31:04 +02:00
Merge pull request #347 from marineam/align
Update disk/partition alignment, hopefully resolves issues with VHD images
This commit is contained in:
commit
d4f1e55718
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"_comment": "See http://www.chromium.org/chromium-os/building-chromium-os/disk-layout-format",
|
"_comment": "See http://www.chromium.org/chromium-os/building-chromium-os/disk-layout-format",
|
||||||
"metadata":{
|
"metadata":{
|
||||||
"_comment": "Partitions are aligned to 1MB (2048 blocks), disks sizes should align to *both* 1MB and a CHS cylender boundry for the common 16H 63S geometry (16*63 = 1008 blocks). The least common multiple of 2048 and 1008 is 129024 blocks.",
|
"_comment": "Partitions are aligned to 2MB (4096 blocks). For the sake of VHD disks sizes should align to *both* 2MB and a CHS cylender boundry for the common 16H 63S geometry (16*63 = 1008 blocks). The least common multiple of 4096 and 1008 is 258048 blocks.",
|
||||||
"part_alignment": 2048,
|
"part_alignment": 4096,
|
||||||
"disk_alignment": 129024,
|
"disk_alignment": 258048,
|
||||||
"block_size": 512,
|
"block_size": 512,
|
||||||
"fs_block_size": 4096
|
"fs_block_size": 4096
|
||||||
},
|
},
|
||||||
@ -64,7 +64,7 @@
|
|||||||
"9":{
|
"9":{
|
||||||
"label":"ROOT",
|
"label":"ROOT",
|
||||||
"type":"coreos-resize",
|
"type":"coreos-resize",
|
||||||
"blocks":"4302848",
|
"blocks":"4427776",
|
||||||
"fs_type":"btrfs",
|
"fs_type":"btrfs",
|
||||||
"fs_subvolume":"root",
|
"fs_subvolume":"root",
|
||||||
"mount":"/"
|
"mount":"/"
|
||||||
@ -73,19 +73,19 @@
|
|||||||
"vm":{
|
"vm":{
|
||||||
"9":{
|
"9":{
|
||||||
"label":"ROOT",
|
"label":"ROOT",
|
||||||
"blocks":"12689408"
|
"blocks":"12943360"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"azure":{
|
"azure":{
|
||||||
"9":{
|
"9":{
|
||||||
"label":"ROOT",
|
"label":"ROOT",
|
||||||
"blocks":"58752990"
|
"blocks":"58875904"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vagrant":{
|
"vagrant":{
|
||||||
"9":{
|
"9":{
|
||||||
"label":"ROOT",
|
"label":"ROOT",
|
||||||
"blocks":"33591296"
|
"blocks":"33845248"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"onmetal":{
|
"onmetal":{
|
||||||
|
@ -127,7 +127,7 @@ def LoadPartitionConfig(options):
|
|||||||
for base_key, base_value in base_part.iteritems():
|
for base_key, base_value in base_part.iteritems():
|
||||||
part.setdefault(base_key, base_value)
|
part.setdefault(base_key, base_value)
|
||||||
|
|
||||||
for part_num, part in layout.iteritems():
|
for part_num, part in sorted(layout.iteritems(), key=lambda t: int(t[0])):
|
||||||
if part['type'] == 'blank':
|
if part['type'] == 'blank':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user