From 702a23d79e461917a33515158b2f80a98069a2de Mon Sep 17 00:00:00 2001 From: Luke Else Date: Thu, 24 Apr 2025 20:32:52 +0100 Subject: [PATCH] Updated install script to correct install procedure --- install.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 5645e14..0cfceef 100644 --- a/install.sh +++ b/install.sh @@ -4,23 +4,23 @@ DISK="/dev/sda" # Create a new partition table parted $DISK -- mklabel gpt +# Create the EFI partition +parted $DISK -- mkpart ESP fat32 1MiB 512MiB +parted $DISK -- set 1 esp on + # Create the root partition parted $DISK -- mkpart primary ext4 512MiB 100% -# Create the EFI partition -parted $DISK -- mkpart ESP fat32 1MiB 512MiB -parted $DISK -- set 2 esp on +# Format the EFI partition +mkfs.fat -F 32 -n BOOT ${DISK}1 # Format the root partition -mkfs.ext4 ${DISK}1 - -# Format the EFI partition -mkfs.fat -F 32 -n BOOT ${DISK}2 +mkfs.ext4 ${DISK}2 # Mount the partitions -mount ${DISK}1 /mnt -mkdir -p /mnt/boot -mount ${DISK}2 /mnt/boot +mount ${DISK}2 /mnt +mkdir -p /mnt/boot/efi +mount ${DISK}1 /mnt/boot/efi # Clone the configuration repository mkdir -p /mnt/etc/nixos @@ -29,6 +29,9 @@ git clone https://git.luke-else.co.uk/luke-else/nixos-config.git /mnt/etc/nixos # Install NixOS using the cloned configuration nixos-install --flake /mnt/etc/nixos#vm +# Ensure the bootloader is installed +nixos-enter --root /mnt -- nixos-rebuild boot + # Reboot the system echo "Installation complete. Rebooting..." reboot \ No newline at end of file