| { |
| # See README_disk_layout |
| "parent": "common_disk_layout.json", |
| |
| "metadata": { |
| "block_size": 512, |
| "fs_block_size": 4096, |
| "fs_align": "2 MiB" |
| }, |
| "layouts": { |
| # common is the standard layout template. |
| "common": [ |
| { |
| # Reserve space for RW firmware. Not used on modern boards. |
| # BIOS Boot Partition for COS. |
| "num": 11, |
| "label": "RWFW", |
| "type": "firmware", |
| "size": "8 MiB" |
| }, |
| { |
| # Unused partition, reserved for software slot C. |
| "num": 6, |
| "label": "KERN-C", |
| "type": "kernel" |
| }, |
| { |
| # Unused partition, reserved for software slot C. |
| "num": 7, |
| "label": "ROOT-C", |
| "type": "rootfs" |
| }, |
| { |
| # Unused partition, reserved for future changes. |
| "num": 9, |
| "type": "reserved", |
| "label": "reserved" |
| }, |
| { |
| # Unused partition, reserved for future changes. |
| "num": 10, |
| "type": "reserved", |
| "label": "reserved" |
| }, |
| { |
| # Kernel for Slot A, no file system. |
| # Not used by COS. |
| "num": 2, |
| "label": "KERN-A", |
| "type": "kernel", |
| "size": "16 MiB" |
| }, |
| { |
| # Kernel for Slot B, no file system. |
| # Not used by COS. |
| "num": 4, |
| "label": "KERN-B", |
| "type": "kernel", |
| "size": "16 MiB" |
| }, |
| { |
| # Board specific files, OEM partition for COS/Anthos. |
| # Used for installing application binaries like Anthos. |
| "num": 8, |
| "label": "OEM", |
| "type": "data", |
| "fs_format": "ext4", |
| "size": "2048 MiB", |
| "uuid": "random" |
| }, |
| { |
| # Used for Legacy Bios, and EFI Bios, not ChromeOS hardware |
| "num": 12, |
| "label": "EFI-SYSTEM", |
| "type": "efi", |
| "fs_format": "vfat", |
| "size": "64 MiB", |
| "uuid": "clear" |
| }, |
| { |
| # Slot B rootfs. Must match Root A in side for normal |
| # updates. Will contain copy of Root A after install, and |
| # contain new rootfs's after runtime updates. |
| # Shrink to 16 MiB since we disable update-engine. |
| "num": 5, |
| "label": "ROOT-B", |
| "type": "rootfs", |
| "size": "16 MiB" |
| }, |
| { |
| # Slot A rootfs. Rootfs + extras (AKA verity) must fit, AKA: |
| # size <= FS size + Verity size |
| # |
| # Verity's size can be found by: |
| # verity_bytes = div_round_up(fs_bytes, 128) + |
| # div_round_up(fs_bytes, 16384) + 4096 |
| # |
| # That means that the FS MiB should be: |
| # ((total_MiB * 1024 * 1024 - 4096) * 16384 / 16513) / (1024 * 1024) |
| # |
| # The reason to not set your fs_size to be exactly what is specified |
| # by the formula above is to make builds start failing a little bit |
| # before we're truly out of space, allowing a quick release valve to |
| # relieve some of the pressure while we try to find other ways to save |
| # space. |
| # |
| # Note that in the past it was observed that updates would fail if the |
| # rootfs size shrunk (crbug.com/192136). There are no known reasons to |
| # shrink the rootfs size, but if you come up with one you should |
| # revisit that bug and make sure it won't affect you. |
| # |
| # Changes to the offset of this partition may require |
| # changes in cros-signing/security_test_baselines/ |
| # ensure_secure_kernelparams.config to allow secure boot. |
| "num": 3, |
| "label": "ROOT-A", |
| "type": "rootfs", |
| "fs_format": "ext2", |
| "fs_options": { |
| "squashfs": "-noI -comp lzo -Xalgorithm lzo1x_999 -Xcompression-level 9", |
| "btrfs": "skinny-metadata" |
| }, |
| "size": "2048 MiB", |
| "fs_size": "2000 MiB", |
| "uuid": "clear" |
| }, |
| { |
| # User data, stateful partition. |
| # User data, fills all remaining space on drive. |
| "num": 1, |
| "label": "STATE", |
| "type": "data", |
| "fs_format": "ext4", |
| "fs_options": { |
| # A consequence of this option is that some file system |
| # structures are initialized lazily when resizing, |
| # resulting in much faster resize2fs invocations. |
| "ext4": "-O metadata_csum" |
| }, |
| "size": "5000 MiB", |
| "features": ["expand"], |
| "uuid": "random" |
| } |
| ], |
| # Used for installs on main device |
| # by default, same as 'common'. |
| "base": [ |
| ], |
| # Used for bootable USB installs (not recovery). |
| "usb": [ |
| { |
| # Slot B rootfs, unused on USB, but pad to 2M. |
| # installation will expand this to size from base. |
| "num": 5, |
| "size": "2 MiB" |
| } |
| ], |
| # Used for factory install images. |
| "factory_install": [ |
| { |
| "num": 12, |
| "size": "32 MiB" |
| }, |
| { |
| "num": 5, |
| "size": "2 MiB" |
| }, |
| { |
| "num": 3, |
| "size": "420 MiB", |
| "fs_size": "400 MiB" |
| }, |
| { |
| "num": 1, |
| "size": "140 MiB" |
| } |
| ], |
| # Used for recovery images. |
| "recovery": [ |
| { |
| # Slot B rootfs, unused on USB, but pad to 2M. |
| # installation will expand this to size from base. |
| "num": 5, |
| "size": "2 MiB" |
| }, |
| { |
| # Stateful on recovery is dynamically resized larger. |
| "num": 1, |
| "size": "2 MiB" |
| } |
| ], |
| # Larger rootfs, suitable for development with symbols, etc. |
| # Cannot apply updates when running from USB (no slot B). |
| "2gb-rootfs": [ |
| { |
| # Will be grown to size from base on install. |
| "num": 5, |
| "size": "2 MiB" |
| }, |
| { |
| # Will be shrunk to size from base on install. |
| "num": 3, |
| "size": "2048 MiB", |
| "fs_size": "2000 MiB" |
| } |
| ], |
| # Larger rootfs, suitable for development with symbols, etc. |
| # CAN apply updates when running from USB. |
| "2gb-rootfs-updatable": [ |
| { |
| # The partition size matches base, so it's installable. |
| "num": 5, |
| "size": "2048 MiB" |
| }, |
| { |
| # The partition size matches base, so it's installable. |
| "num": 3, |
| "size": "2048 MiB", |
| "fs_size": "2000 MiB" |
| }, |
| { |
| "num": 1, |
| "size": "4096 MiB" |
| } |
| ], |
| # Very large rootfs, suitable for development with symbols, |
| # etc. Cannot apply updates when running from USB (no slot B) |
| "4gb-rootfs": [ |
| { |
| "num": 5, |
| "size": "2 MiB" |
| }, |
| { |
| # This partition is larger than the base partition, so the |
| # installer will corrupt the disk during installation. |
| "num": 3, |
| "size": "4096 MiB", |
| "fs_size": "4000 MiB" |
| } |
| ], |
| # Huge rootfs, suitable for VM only images, should not be used |
| # for actual hardware devices. |
| "16gb-rootfs": [ |
| { |
| "num": 5, |
| "size": "2 MiB" |
| }, |
| { |
| "num": 3, |
| "size": "16384 MiB", |
| "fs_size": "16000 MiB" |
| } |
| ] |
| } |
| } |