Skip to content

Instantly share code, notes, and snippets.

@ancorgs
Last active July 14, 2016 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ancorgs/db671cf6c0c12c5f2c62bae36a7d68c0 to your computer and use it in GitHub Desktop.
Save ancorgs/db671cf6c0c12c5f2c62bae36a7d68c0 to your computer and use it in GitHub Desktop.

needed_partitions in a PPC64 system

  • in a non-PowerNV system (KVM/LPAR)
    • with a partitions-based proposal
      • if there are no PReP partitions
        • requires only a PReP partition
      • if the existent PReP partition is not in the target disk
        • requires only a PReP partition
      • if there is already a PReP partition in the disk
        • does not require any particular volume
    • with a LVM-based proposal
      • if there are no PReP partitions
        • requires /boot and PReP partitions
      • if the existent PReP partition is not in the target disk
        • requires /boot and PReP partitions
      • if there is already a PReP partition in the disk
        • only requires a /boot partition
  • in bare metal (PowerNV)
    • with a partitions-based proposal
      • does not require any particular volume
    • with a LVM-based proposal
      • requires only a /boot partition
  • when proposing a boot partition
    • requires /boot to be ext4 with at least 100 MiB
    • requires /boot to be in the system disk out of LVM
    • recommends /boot to be 200 MiB
  • when proposing a PReP partition
    • requires it to be between 256KiB and 8MiB, despite the alignment
    • recommends it to be 1 MiB
    • requires it to be out of LVM
    • requires it to be bootable (ms-dos partition table)

needed_partitions in a x86 system

  • using UEFI
    • with a partitions-based proposal
      • if there are no EFI partitions
        • requires only a new /boot/efi partition
      • if there is already an EFI partition
        • only requires to use the existing EFI partition
    • with a LVM-based proposal
      • if there are no EFI partitions
        • requires only a new /boot/efi partition
      • if there is already an EFI partition
        • only requires to use the existing EFI partition
  • not using UEFI (legacy PC)
    • with GPT partition table
      • in a partitions-based proposal
        • if there is no GRUB partition
          • only requires a new GRUB partition
        • if there is already a GRUB partition
          • does not require any particular volume
      • in a LVM-based proposal
        • if there is no GRUB partition
          • only requires a new GRUB partition
        • if there is already a GRUB partition
          • does not require any particular volume
    • with an MS-DOS partition table
      • if the MBR gap is big enough to embed Grub
        • in a partitions-based proposal
          • does not require any particular volume
        • in a LVM-based proposal
          • if the MBR gap has additional space for grubenv
            • does not require any particular volume
          • if the MBR gap has no additional space
            • requires only a /boot partition [1]
      • with too small MBR gap or with no MBR gap at all
        • in a partitions-based proposal
          • if proposing root (/) as Btrfs
            • does not require any particular volume
          • if proposing root (/) as non-Btrfs
            • raises an exception [2]
        • in a LVM-based proposal
          • raises an exception
    • when proposing a boot partition
      • requires /boot to be ext4 with at least 100 MiB
      • requires /boot to be in the system disk out of LVM
      • recommends /boot to be 200 MiB
    • when proposing an new EFI partition
      • requires /boot/efi to be vfat with at least 33 MiB
      • requires /boot/efi to be out of LVM
      • recommends /boot/efi to be 500 MiB
      • requires /boot/efi to be close enough to the beginning of disk
    • when proposing an new GRUB partition
      • requires it to have the correct id
      • requires it to be out of LVM
      • requires it to be between 256KiB and 8MiB, despite the alignment
      • recommends it to be 1 MiB

[1] Needed for hibernation to work

[2] There is a chance that Grub2 can still be installed using blocklist mode, but IMHO it makes no much sense for us to propose a fragile layout. Users can still use expert partitioner and we will not prevent them to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment