Updated script to properly allow efi boot
This commit is contained in:
parent
418e989946
commit
624861cab9
19
install.sh
19
install.sh
@ -1,14 +1,23 @@
|
|||||||
# Assuming /dev/sda is the target disk
|
# Assuming /dev/sda is the target disk
|
||||||
parted /dev/sda -- mklabel gpt
|
parted /dev/sda -- mklabel gpt
|
||||||
parted /dev/sda -- mkpart primary ext4 1MiB 100%
|
|
||||||
mkfs.ext4 /dev/sda1
|
|
||||||
mount /dev/sda1 /mnt
|
|
||||||
|
|
||||||
cryptsetup luksFormat /dev/sda1
|
parted /dev/sda -- mkpart ESP fat32 1MiB 513MiB
|
||||||
cryptsetup open /dev/sda1 root
|
parted /dev/sda -- set 1 boot on
|
||||||
|
|
||||||
|
parted /dev/sda -- mkpart primary ext4 513MiB 100%
|
||||||
|
|
||||||
|
mkfs.fat -F32 -n BOOT /dev/sda1
|
||||||
|
mkfs.ext4 /dev/sda2
|
||||||
|
|
||||||
|
mount /dev/sda2 /mnt
|
||||||
|
cryptsetup luksFormat /dev/sda2
|
||||||
|
cryptsetup open /dev/sda2 root
|
||||||
mkfs.ext4 /dev/mapper/root
|
mkfs.ext4 /dev/mapper/root
|
||||||
mount /dev/mapper/root /mnt
|
mount /dev/mapper/root /mnt
|
||||||
|
|
||||||
|
mkdir -p /mnt/boot
|
||||||
|
mount /dev/sda1 /mnt/boot
|
||||||
|
|
||||||
mkdir -p /mnt/etc/nixos
|
mkdir -p /mnt/etc/nixos
|
||||||
git clone https://git.luke-else.co.uk/luke-else/nixos-config.git /mnt/etc/nixos
|
git clone https://git.luke-else.co.uk/luke-else/nixos-config.git /mnt/etc/nixos
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
|
efiSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user