diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2022-09-04 12:10:09 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2022-09-04 12:27:59 +0200 |
commit | fd2de4ddd46ce24c10cb2ba8fbfc744acc36da03 (patch) | |
tree | 4d5d2d81a76bb80f66c412c459f5a32be46f92b8 /example/gpt-bios-compat.nix | |
parent | e0de34c07d1b78b81f6c3fbf3aa41f08ef8db7fb (diff) |
fix gpt-bios-compat example and test it.
Diffstat (limited to 'example/gpt-bios-compat.nix')
-rw-r--r-- | example/gpt-bios-compat.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/example/gpt-bios-compat.nix b/example/gpt-bios-compat.nix new file mode 100644 index 0000000..9abe691 --- /dev/null +++ b/example/gpt-bios-compat.nix @@ -0,0 +1,37 @@ +# Example to create a bios compatible gpt partition +{ + disk = { + vdb = { + device = "/dev/vdb"; + type = "disk"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + name = "boot"; + type = "partition"; + start = "0"; + end = "1M"; + part-type = "primary"; + flags = ["bios_grub"]; + } + { + name = "root"; + type = "partition"; + # leave space for the grub aka BIOS boot + start = "1M"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; + }; + }; +} |