diff --git a/machines/asgard/boot.nix b/machines/asgard/boot.nix index 47efddb..65a3f8e 100644 --- a/machines/asgard/boot.nix +++ b/machines/asgard/boot.nix @@ -15,7 +15,7 @@ grub = { enable = true; version = 2; - device = "nodev"; + device = "/dev/disk/by-path/pci-0000:00:14.1-ata-1"; efiSupport = false; }; }; diff --git a/scripts/chnum-partitions b/scripts/chnum-partitions index a1b80a2..b7eee29 100755 --- a/scripts/chnum-partitions +++ b/scripts/chnum-partitions @@ -23,12 +23,15 @@ while true; do done echo "----> Drop existing partitions" -sgdisk --zap-all /dev/sda -sgdisk -og /dev/sda +wipefs -a /dev/sda +sfdisk --delete /dev/sda echo "-----> Wait for cleanup" sleep 3 +echo "-----> Mark GPT disk" +echo yes | parted /dev/sda -- mklabel gpt + echo "-----> Create boot partition" sgdisk -n 0:0:+1G -t 0:ef00 -c 0:boot /dev/sda @@ -79,9 +82,6 @@ mount -t ext4 /dev/system/home /mnt/home echo "-----> Create boot filesystem" mkfs.vfat -n boot /dev/disk/by-partlabel/boot -echo "-----> Wait for boot" -sleep 3 - echo "-----> Mount boot filesystem" mkdir /mnt/boot mount /dev/disk/by-label/boot /mnt/boot diff --git a/scripts/utgard-partitions b/scripts/utgard-partitions index d3b719f..b33fb1e 100755 --- a/scripts/utgard-partitions +++ b/scripts/utgard-partitions @@ -23,14 +23,18 @@ while true; do done echo "----> Drop existing partitions" -sgdisk --zap-all /dev/sda -sgdisk -og /dev/sda -sgdisk --zap-all /dev/sdb -sgdisk -og /dev/sdb +wipefs -a /dev/sda +sfdisk --delete /dev/sda +wipefs -a /dev/sdb +sfdisk --delete /dev/sdb echo "-----> Wait for cleanup" sleep 3 +echo "-----> Mark GPT disk" +echo yes | parted /dev/sda -- mklabel gpt +echo yes | parted /dev/sdb -- mklabel gpt + echo "-----> Create boot partition" sgdisk -n 0:0:+1G -t 0:ef00 -c 0:boot /dev/sda @@ -78,9 +82,6 @@ mount -t ext4 /dev/system/home /mnt/home echo "-----> Create boot filesystem" mkfs.vfat -n boot /dev/disk/by-partlabel/boot -echo "-----> Wait for boot" -sleep 3 - echo "-----> Mount boot filesystem" mkdir /mnt/boot mount /dev/disk/by-label/boot /mnt/boot