From 4823509bb3b014dc85abefc13efcfa076d36338a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 16 Jun 2023 21:34:15 +0200 Subject: [PATCH] boot-raid1: switch to new gpt type --- example/boot-raid1.nix | 74 ++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 46 deletions(-) diff --git a/example/boot-raid1.nix b/example/boot-raid1.nix index 43d68c5..6a026ef 100644 --- a/example/boot-raid1.nix +++ b/example/boot-raid1.nix @@ -5,74 +5,56 @@ type = "disk"; device = builtins.elemAt disks 0; content = { - type = "table"; - format = "gpt"; - partitions = [ - { - name = "boot"; - start = "0"; - end = "1M"; - part-type = "primary"; - flags = [ "bios_grub" ]; - } - { - name = "ESP"; - start = "1MiB"; - end = "128MiB"; - fs-type = "fat32"; - bootable = true; + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; + }; + ESP = { + size = "128M"; + type = "EF00"; content = { type = "mdraid"; name = "boot"; }; - } - { - name = "mdadm"; - start = "128MiB"; - end = "100%"; + }; + mdadm = { + size = "100%"; content = { type = "mdraid"; name = "raid1"; }; - } - ]; + }; + }; }; }; two = { type = "disk"; device = builtins.elemAt disks 1; content = { - type = "table"; - format = "gpt"; - partitions = [ - { - name = "boot"; - start = "0"; - end = "1M"; - part-type = "primary"; - flags = [ "bios_grub" ]; - } - { - name = "ESP"; - start = "1MiB"; - end = "128MiB"; - fs-type = "fat32"; - bootable = true; + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; + }; + ESP = { + size = "128M"; + type = "EF00"; content = { type = "mdraid"; name = "boot"; }; - } - { - name = "mdadm"; - start = "128MiB"; - end = "100%"; + }; + mdadm = { + size = "100%"; content = { type = "mdraid"; name = "raid1"; }; - } - ]; + }; + }; }; }; };