Compare commits
No commits in common. "fbb483acbc9444f1f385fda3e5e50045b5cd8766" and "5fe8e0d8f2c692311dd7cebf9e7106a24911706d" have entirely different histories.
fbb483acbc
...
5fe8e0d8f2
@ -20,10 +20,8 @@ sudo -i
|
|||||||
# Use german keyboard layout
|
# Use german keyboard layout
|
||||||
loadkeys de
|
loadkeys de
|
||||||
|
|
||||||
# Short for all the stuff below !!! ONLY ON EMPTY DRIVES !!!
|
# List block devices
|
||||||
curl -L https://www.fischer.im/nixos/minimal-install --output install.sh
|
lsbkl
|
||||||
chmod 744 ./install.sh
|
|
||||||
./install.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Partitionierung
|
### 2. Partitionierung
|
||||||
|
|||||||
@ -7,65 +7,55 @@ loadkeys de
|
|||||||
lsbkl
|
lsbkl
|
||||||
|
|
||||||
|
|
||||||
# Partitioning
|
# GPT-Partitionstabelle erstellen
|
||||||
read -p "Create partitions table? DELETES ALL DATA! (j/N): " answer
|
|
||||||
if [ "$answer" = "j" ] || [ "$answer" = "J" ]; then
|
|
||||||
# GPT-partition table creation
|
|
||||||
parted /dev/sda -- mklabel gpt
|
parted /dev/sda -- mklabel gpt
|
||||||
|
|
||||||
# EFI-partition (512 MB)
|
# EFI-Partition (512 MB)
|
||||||
parted /dev/sda -- mkpart esp fat32 1MB 512MB
|
parted /dev/sda -- mkpart esp fat32 1MB 512MB
|
||||||
parted /dev/sda -- set 1 esp on
|
parted /dev/sda -- set 1 esp on
|
||||||
|
|
||||||
# Swap-partition (8 GB)
|
# Swap-Partition (8 GB)
|
||||||
parted /dev/sda -- mkpart swap linux-swap 512MB 8626MB
|
parted /dev/sda -- mkpart swap linux-swap 512MB 8626MB
|
||||||
|
|
||||||
# Root-partition (ca. 45 GB)
|
# Root-Partition (ca. 45 GB)
|
||||||
parted /dev/sda -- mkpart root ext4 8636MB 40000MB
|
parted /dev/sda -- mkpart root ext4 8636MB 40000MB
|
||||||
|
|
||||||
# Home-partition (Rest)
|
# Home-Partition (Rest)
|
||||||
parted /dev/sda -- mkpart home ext4 40000MB 100%
|
parted /dev/sda -- mkpart home ext4 40000MB 100%
|
||||||
fi
|
|
||||||
|
|
||||||
# Check results
|
# Ergebnis pruefen
|
||||||
parted /dev/sda -- print
|
parted /dev/sda -- print
|
||||||
|
|
||||||
|
|
||||||
# Format EFI-partition
|
# EFI-Partition formatieren
|
||||||
mkfs.fat -F 32 -n boot /dev/sda1
|
mkfs.fat -F 32 -n boot /dev/sda1
|
||||||
|
|
||||||
# Format swap-partition
|
# Swap-Partition formatieren
|
||||||
mkswap -L swap /dev/sda2
|
mkswap -L swap /dev/sda2
|
||||||
|
|
||||||
# Format root-partition
|
# Root-Partition formatieren
|
||||||
mkfs.ext4 -L nixos /dev/sda3
|
mkfs.ext4 -L nixos /dev/sda3
|
||||||
|
|
||||||
read -p "Home-Partition formatieren? LOESCHT BENUTZERDATEN! (j/N): " answer
|
# Home-Partition formatieren
|
||||||
if [ "$answer" = "j" ] || [ "$answer" = "J" ]; then
|
|
||||||
# Format home-partition
|
|
||||||
mkfs.ext4 -L home /dev/sda4
|
mkfs.ext4 -L home /dev/sda4
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Mount partitions
|
# Root mounten
|
||||||
mount /dev/disk/by-label/nixos /mnt
|
mount /dev/disk/by-label/nixos /mnt
|
||||||
|
|
||||||
|
# Boot-Verzeichnis erstellen und mounten
|
||||||
mkdir /mnt/boot
|
mkdir /mnt/boot
|
||||||
mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
|
mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
|
||||||
|
|
||||||
|
# Home-Verzeichnis erstellen und mounten
|
||||||
mkdir -p /mnt/home
|
mkdir -p /mnt/home
|
||||||
mount /dev/disk/by-label/home /mnt/home
|
mount /dev/disk/by-label/home /mnt/home
|
||||||
|
|
||||||
# Activate swap
|
# Swap aktivieren
|
||||||
swapon /dev/disk/by-label/swap
|
swapon /dev/disk/by-label/swap
|
||||||
|
|
||||||
|
|
||||||
nixos-generate-config --root /mnt
|
nixos-generate-config --root /mnt
|
||||||
|
|
||||||
|
|
||||||
# If root password wasn't set because the installation needed to be restarted.
|
|
||||||
read -p "Root-Passwort mit nixos-enter setzen? (j/N): " answer
|
|
||||||
if [ "$answer" = "j" ] || [ "$answer" = "J" ]; then
|
|
||||||
nixos-enter --root '/mnt'
|
nixos-enter --root '/mnt'
|
||||||
passwd
|
passwd
|
||||||
fi
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user