[TASK] Improve readme
This commit is contained in:
parent
4e3207dbc0
commit
88929f83e6
45
README.md
45
README.md
@ -7,8 +7,7 @@ sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils vir
|
||||
```
|
||||
|
||||
- Video: QXL
|
||||
- In `configuration.nix`: `services.spice-vdagentd.enable = true;`
|
||||
- Falls die HDD zu klein ist: `qemu-img resize nixos.qcow2 +20G`
|
||||
- If the HDD for the VM is too small: `qemu-img resize nixos.qcow2 +20G`
|
||||
|
||||
## Manuelle Installation (UEFI)
|
||||
|
||||
@ -20,7 +19,7 @@ sudo -i
|
||||
# Use german keyboard layout
|
||||
loadkeys de
|
||||
|
||||
# Short for all the stuff below !!! ONLY ON EMPTY DRIVES !!!
|
||||
# Short for all the stuff below !!! TAKE CARE OF THE USERDATA !!!
|
||||
curl -L https://www.fischer.im/nixos/minimal-install --output install.sh
|
||||
chmod 744 ./install.sh
|
||||
./install.sh
|
||||
@ -32,7 +31,7 @@ If you don't use the installation script, you need to follow the steps 2-8
|
||||
|
||||
### 2. Partitionierung
|
||||
|
||||
Das folgende Schema erstellt view Partitionen auf `/dev/sda`:
|
||||
The following schema creates four partitions on `/dev/sda`:
|
||||
|
||||
| Partition | Typ | Groesse | Mountpoint |
|
||||
|-------------|----------------|-------------------|------------|
|
||||
@ -41,26 +40,26 @@ Das folgende Schema erstellt view Partitionen auf `/dev/sda`:
|
||||
| `/dev/sda3` | ext4 (Root) | Rest minus Home | `/` |
|
||||
| `/dev/sda4` | ext4 (Home) | 50% des Rests | `/home` |
|
||||
|
||||
**Hinweis:** Die Groessen muessen an die eigene Festplatte angepasst werden. Im Beispiel wird eine 100 GB Festplatte verwendet.
|
||||
**HINT:** The sizes must be adapted to your hard drive. In the example it's assumed that a 100GB drive is in use.
|
||||
|
||||
```bash
|
||||
# GPT-Partitionstabelle erstellen
|
||||
# GPT-partition table
|
||||
parted /dev/sda -- mklabel gpt
|
||||
|
||||
# EFI-Partition (512 MB)
|
||||
# EFI-partition (512 MB)
|
||||
parted /dev/sda -- mkpart esp fat32 1MB 512MB
|
||||
parted /dev/sda -- set 1 esp on
|
||||
|
||||
# Swap-Partition (8 GB)
|
||||
# Swap-partition (8 GB)
|
||||
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
|
||||
|
||||
# Home-Partition (Rest)
|
||||
# Home-partition (Rest)
|
||||
parted /dev/sda -- mkpart home ext4 40000MB 100%
|
||||
|
||||
# Ergebnis pruefen
|
||||
# Check result
|
||||
parted /dev/sda -- print
|
||||
```
|
||||
|
||||
@ -100,28 +99,30 @@ mount /dev/disk/by-label/home /mnt/home
|
||||
swapon /dev/disk/by-label/swap
|
||||
```
|
||||
|
||||
### 6. Konfiguration generieren
|
||||
### 6. Generate configuration
|
||||
|
||||
```bash
|
||||
nixos-generate-config --root /mnt
|
||||
```
|
||||
|
||||
Dies erzeugt zwei Dateien:
|
||||
- `/mnt/etc/nixos/hardware-configuration.nix` — erkannte Hardware und Mountpoints
|
||||
- `/mnt/etc/nixos/configuration.nix` — Grundkonfiguration
|
||||
This creates two files:
|
||||
- `/mnt/etc/nixos/hardware-configuration.nix` — detected hardware and mountpoints
|
||||
- `/mnt/etc/nixos/configuration.nix` — Base configuration
|
||||
|
||||
### 7. Bootloader konfigurieren
|
||||
### 7. Check the detected bootloader
|
||||
|
||||
In `/mnt/etc/nixos/configuration.nix` sicherstellen, dass der Bootloader korrekt eingerichtet ist:
|
||||
Check inn `/mnt/etc/nixos/configuration.nix`, that the bootloader is configured like this:
|
||||
|
||||
```nix
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
{
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### 8. System installieren
|
||||
### 8. Install system
|
||||
|
||||
```bash
|
||||
nixos-install
|
||||
|
||||
@ -10,7 +10,7 @@ lsbkl
|
||||
# Partitioning
|
||||
read -p "Create partitions table? DELETES ALL DATA! (j/N): " answer
|
||||
if [ "$answer" = "j" ] || [ "$answer" = "J" ]; then
|
||||
# GPT-partition table creation
|
||||
# GPT-partition table
|
||||
parted /dev/sda -- mklabel gpt
|
||||
|
||||
# EFI-partition (512 MB)
|
||||
@ -30,17 +30,11 @@ fi
|
||||
# Check results
|
||||
parted /dev/sda -- print
|
||||
|
||||
|
||||
# Format EFI-partition
|
||||
mkfs.fat -F 32 -n boot /dev/sda1
|
||||
|
||||
# Format swap-partition
|
||||
mkswap -L swap /dev/sda2
|
||||
|
||||
# Format root-partition
|
||||
mkfs.ext4 -L nixos /dev/sda3
|
||||
|
||||
read -p "Home-Partition formatieren? LOESCHT BENUTZERDATEN! (j/N): " answer
|
||||
read -p "Format Home-partition? Deletes all userdata! (j/N): " answer
|
||||
if [ "$answer" = "j" ] || [ "$answer" = "J" ]; then
|
||||
# Format home-partition
|
||||
mkfs.ext4 -L home /dev/sda4
|
||||
@ -65,7 +59,7 @@ nixos-install
|
||||
|
||||
|
||||
# If root password wasn't set because the installation needed to be restarted.
|
||||
read -p "Root-Passwort mit nixos-enter setzen? (j/N): " answer
|
||||
read -p "Set Root-password with nixos-enter? (j/N): " answer
|
||||
if [ "$answer" = "j" ] || [ "$answer" = "J" ]; then
|
||||
nixos-enter --root '/mnt'
|
||||
passwd
|
||||
|
||||
Loading…
Reference in New Issue
Block a user