mirror of
https://github.com/flatcar/scripts.git
synced 2026-01-15 21:41:38 +01:00
The /usr partition was too small some time ago and we gained space again by switching to btrfs with compression and also removing/splitting out content. The /boot partition is too small all the time and we added many hacks to fit the kernel+initrd under 60 MB. To handle the case where the /oem partition is too small for the A/B-updated OEM extensions we added the workaround to write the inactive one (or both) to the rootfs. All this would not be needed if we had increased the partition sizes a few years ago so that we could now assume that most nodes have the increased sizes and we can make use of them. Still, we can do it now to prepare for the next time when in five or ten years we have serious size problems and run out of workarounds. We have to do the change now and wait a few years so that most nodes have been provisioned with the new layout. Then we can drop the workarounds and have a full featured kernel and initrd, and we can also increase the /usr filesystem to make use of the larger partition. Ideally we use large enough sizes that we never have to worry again but since we also want to support small ARM boards which might only have 8 GB internal storage, let's target this when increasing the partition sizes. With 1 GB /boot, two 2 GB /usr, and 1 GB /oem partitions we are already at 6 GB, leaving 2 GB for the rootfs. For now, reduce the extracted /usr update payload size to the current combined filesystem and verity data usage (same size as before). The rootfs size was also reduced for the initial .bin image so that we don't overshoot 8 GB - it will be resized to fit the disk anyway on first boot. Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com> Signed-off-by: Kai Lueke <kailuke@microsoft.com>
143 lines
3.1 KiB
JSON
143 lines
3.1 KiB
JSON
{
|
|
"_comment": "See http://www.chromium.org/chromium-os/building-chromium-os/disk-layout-format",
|
|
"metadata":{
|
|
"_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": 4096,
|
|
"disk_alignment": 258048,
|
|
"block_size": 512,
|
|
"fs_block_size": 4096
|
|
},
|
|
"layouts":{
|
|
"base":{
|
|
"1":{
|
|
"label":"EFI-SYSTEM",
|
|
"fs_label":"EFI-SYSTEM",
|
|
"type":"efi",
|
|
"blocks":"2097152",
|
|
"fs_type":"vfat",
|
|
"mount":"/boot",
|
|
"features": []
|
|
},
|
|
"2":{
|
|
"label":"BIOS-BOOT",
|
|
"type":"bios",
|
|
"blocks":"4096"
|
|
},
|
|
"3":{
|
|
"label":"USR-A",
|
|
"uuid":"7130c94a-213a-4e5a-8e26-6cce9662f132",
|
|
"type":"flatcar-rootfs",
|
|
"blocks":"4194304",
|
|
"extract_blocks":"2097152",
|
|
"fs_blocks":"260094",
|
|
"fs_type":"btrfs",
|
|
"fs_compression":"zstd",
|
|
"mount":"/usr",
|
|
"features": ["prioritize", "verity"]
|
|
},
|
|
"4":{
|
|
"label":"USR-B",
|
|
"uuid":"e03dd35c-7c2d-4a47-b3fe-27f15780a57c",
|
|
"type":"flatcar-rootfs",
|
|
"blocks":"4194304",
|
|
"extract_blocks":"2097152",
|
|
"fs_blocks":"262144"
|
|
},
|
|
"5":{
|
|
"label":"ROOT-C",
|
|
"uuid":"d82521b4-07ac-4f1c-8840-ddefedc332f3",
|
|
"type":"blank",
|
|
"blocks":"0"
|
|
},
|
|
"6":{
|
|
"label":"OEM",
|
|
"fs_label":"OEM",
|
|
"type":"data",
|
|
"blocks":"2097152",
|
|
"fs_type":"btrfs",
|
|
"fs_compression":"zlib",
|
|
"mount":"/oem"
|
|
},
|
|
"7":{
|
|
"label":"OEM-CONFIG",
|
|
"type":"flatcar-reserved",
|
|
"blocks":"131072"
|
|
},
|
|
"8":{
|
|
"type":"blank",
|
|
"label":"flatcar-reserved",
|
|
"blocks":"0"
|
|
},
|
|
"9":{
|
|
"label":"ROOT",
|
|
"fs_label":"ROOT",
|
|
"type":"flatcar-resize",
|
|
"blocks":"3653632",
|
|
"fs_type":"ext4",
|
|
"mount":"/"
|
|
}
|
|
},
|
|
"vm":{
|
|
"9":{
|
|
"label":"ROOT",
|
|
"fs_label":"ROOT",
|
|
"blocks":"12943360"
|
|
}
|
|
},
|
|
"azure":{
|
|
"9":{
|
|
"label":"ROOT",
|
|
"fs_label":"ROOT",
|
|
"blocks":"58875904"
|
|
}
|
|
},
|
|
"vagrant":{
|
|
"9":{
|
|
"label":"ROOT",
|
|
"fs_label":"ROOT",
|
|
"blocks":"33845248"
|
|
}
|
|
},
|
|
"onmetal":{
|
|
"7":{
|
|
"label":"config-2",
|
|
"fs_label":"config-2",
|
|
"type":"data",
|
|
"fs_type":"ext2"
|
|
}
|
|
},
|
|
"container":{
|
|
"1":{
|
|
"type":"blank"
|
|
},
|
|
"2":{
|
|
"type":"blank"
|
|
},
|
|
"3":{
|
|
"type":"blank"
|
|
},
|
|
"4":{
|
|
"type":"blank"
|
|
},
|
|
"5":{
|
|
"type":"blank"
|
|
},
|
|
"6":{
|
|
"type":"blank"
|
|
},
|
|
"7":{
|
|
"type":"blank"
|
|
},
|
|
"8":{
|
|
"type":"blank"
|
|
},
|
|
"9":{
|
|
"label":"ROOT",
|
|
"fs_label":"ROOT",
|
|
"type":"0fc63daf-8483-4772-8e79-3d69d8477de4",
|
|
"blocks":"12582912"
|
|
}
|
|
}
|
|
}
|
|
}
|