anchor.diff:        parted --script $diskImage -- \
           mklabel msdos \
           mkpart primary ext4 1MiB -1
  +    '';
  +    "legacy+gpt" = ''
  +      parted --script $diskImage -- \
  +        mklabel gpt \
  +        mkpart no-fs 1MB 2MB \
  +        set 1 bios_grub on \
  +        align-check optimal 1 \
  +        mkpart primary ext4 2MB -1 \
  +        align-check optimal 2 \
  +        print
       '';
       efi = ''
         parted --script $diskImage -- \
  
positive.code:   format ? "raw"
  }:
  
  assert partitionTableType == "legacy" || partitionTableType == "efi" || partitionTableType == "hybrid" || partitionTableType == "none";
  # We use -E offset=X below, which is only supported by e2fsprogs
  assert partitionTableType != "none" -> fsType == "ext4";
  
  
negative.code: 
    rootPartition = { # switch-case
      legacy = "1";
      "legacy+gpt" = "2";
      efi = "2";
      hybrid = "3";
    }.${partitionTableType};
  