1
0
mirror of https://github.com/tboerger/nixos-config synced 2024-11-23 03:32:08 +01:00

chore: hopefully fixing non-efi boot

This commit is contained in:
Thomas Boerger 2022-10-25 16:49:36 +02:00
parent 88d1fa9b21
commit 2cdc9f7864
No known key found for this signature in database
GPG Key ID: 09745AFF9D63C79B
3 changed files with 14 additions and 13 deletions

@ -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;
};
};

@ -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

@ -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