mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-23 18:21:34 +01:00
The compression feature of btrfs allows us to store more in the size-limited /usr and OEM partitions. The size should of course still be monitored to not bloat the image but more headroom helps to try things out quickly without hitting the hard limit which fails the build. Use btrfs with zstd compression for the /usr partition. While for ext2 a hack exists to force read-only mounts by manipulating some bytes of the filesystem, on btrfs we can use the subvolume read-only flag instead which also works for the default top level subvolume. However, it also makes also sense to mount the filesystem with the "norecovery" mount option to prevent any write attempts even when the "ro" option is set (not needed when using dm-verity in read-only mode but when directly mounting without dm-verity). A new subvolumes is not created because subvolumes don't offer anything special as long as we use the A/B partition update mechanism (but they could be an alternative for that). Note that switching to the btrfs on the /usr partition is only possible when the Flatcar Stable release has all patches in update-engine and seismograph's rootdev.
141 lines
3.1 KiB
JSON
141 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":"262144",
|
|
"fs_type":"vfat",
|
|
"mount":"/boot",
|
|
"features": ["hybrid"]
|
|
},
|
|
"2":{
|
|
"label":"BIOS-BOOT",
|
|
"type":"bios",
|
|
"blocks":"4096"
|
|
},
|
|
"3":{
|
|
"label":"USR-A",
|
|
"uuid":"7130c94a-213a-4e5a-8e26-6cce9662f132",
|
|
"type":"flatcar-rootfs",
|
|
"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":"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":"262144",
|
|
"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":"4427776",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|