Open oneingan opened 1 year ago
well it's hybrid as it can be booted by bios or efi with grub. I wouldn't recommend the DOS table as it is quite limited and doesn't support big disks
Sure, but then gpt-bios-compat.nix
example looks enough and much less confusing. Because Hybrid MBR as in https://www.rodsbooks.com/gdisk/hybrid.html is a totally different beast and sometimes is required. For instance (my use case) to boot Raspberry Pi with Tow-Boot and whatever UEFI Vanilla Linux OS.
Thinking about implementation, If there is interest I could go with a PR using sgdisk
.
Interface side will be as simple as adding a hybrid = true;
in partitions attrset.
What do you think about this tentative interface??
{
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "hybrid_table";
efiGptPartitionFirst = false;
extraMbrProtection = false;
hybrid_partitions = [
{
type = "hybrid_partition";
gptPartitionNumber = 1;
mbrPartitionType = "0x0c";
mbrBootableFlag = false;
}
];
content = {
type = "table";
format = "gpt";
partitions = [
#...
];
};
};
}
Also usable with sane defaults as:
{
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "hybrid_table";
content = {
type = "table";
format = "gpt";
partitions = [
#...
];
};
};
}
i notice that every hybrid example is not an Hybrid partitioning scheme, only a GPT BIOS compatible. Am I wrong?
I need a real Hybrid where
dos
table have a firstvfat
(0x0C) partition and then a full diskgpt
(0xEE) type partition:And
gpt
table have the real partition info:I guess a new interface similar to ones for lvm or mdraid will be needed to implement this.