Skip to content

Instantly share code, notes, and snippets.

@ancorgs
Created July 12, 2016 16:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ancorgs/cbe59fd84b10906de34df837130bcff3 to your computer and use it in GitHub Desktop.
Save ancorgs/cbe59fd84b10906de34df837130bcff3 to your computer and use it in GitHub Desktop.
Candidate RSpec output (manually ajusted) for storage-ng booting

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
      • with an MS-DOS partition table
        • if there are no EFI partitions
          • requires /boot and a new /boot/efi partition
        • if there is already an EFI partition
          • requires /boot and a reused /boot/efi partition
      • with GPT partition table
        • if there are no EFI partitions
          • if there is no GRUB partition
            • requires a new /boot/efi and a new GRUB partition
          • if there is already a GRUB partition
            • requires only a new /boot/efi partition
        • if there is already an EFI partition
          • if there is no GRUB partition
            • requires a reused /boot/efi and a new GRUB partition
          • if there is already a GRUB partition
            • only requires to use the existing EFI partition
  • not using UEFI (legacy PC)
    • with an MS-DOS partition table
      • with sufficently large MBR gap
        • in a partitions-based proposal
          • does not require any particular volume
        • in a LVM-based proposal
          • requires only a /boot partition [1]
      • with too small MBR gap
        • in a partitions-based proposal
          • if proposing / as Btrfs
            • does not require any particular volume
          • if proposing / as non-Btrfs
            • raises an exception [2]
        • in a LVM-based proposal
          • raises an exception
      • with no MBR gap
        • TODO
      • with GPT partition table
        • if there is no GRUB partition
          • in a partitions-based proposal
            • only requires a new GRUB partition [3]
          • in a LVM-based proposal
            • only requires a new GRUB partition
        • if there is already a GRUB partition
          • in a partitions-based proposal
            • does not require any particular volume
          • in a LVM-based proposal
            • does not require any particular volume
    • 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.

[3] Not 100% sure why it is required

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