Add VM setup notes

master
Sven Slootweg 5 years ago
parent 28885995e9
commit e70151102d

2
.gitignore vendored

@ -1 +1 @@
notes
private

@ -0,0 +1,34 @@
fdisk /dev/sda
o
n p <enter> <enter> +1G
# boot partition
n p <enter> <enter> <enter>
# LVM partition
a 1
# set bootable
w
# Boot partition
mkfs.ext4 -L boot /dev/sda1
# LVM partition
pvcreate /dev/sda2
vgcreate vg_main /dev/sda2
lvcreate -L 2GB -n lv_swap vg_main
lvcreate -l 100%FREE -n lv_root vg_main
mkswap -L swap /dev/vg_main/lv_swap
swapon /dev/vg_main/lv_swap
mkfs.ext4 -L nixos /dev/vg_main/lv_root
mount /dev/vg_main/lv_root /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
# NixOS installation
nixos-generate-config --root /mnt
wget -O /mnt/etc/nixos/configuration.nix https://git.cryto.net/joepie91/morph-rc/raw/master/data/dummy-configuration.nix
# NOTE: Potentially update configuration.nix at this point if the primary disk is not /dev/sda!
nixos-install
Loading…
Cancel
Save