@ -7,22 +7,26 @@ At the end of this guide a fully functional Arch Linux will be installed.
## 1. Preparation
## 1. Preparation
Ahead of the installation an Arch boot-stick has to be created. The iso-file can be found on the [official website](https://www.archlinux.org/download/).
Ahead of the installation an Arch boot-stick has to be created. The iso-file can
be found on the [official website](https://www.archlinux.org/download/).
The iso can be written on an USB-stick using `dd`.
The iso can be written on an USB-stick using `dd`.
After that the USB can be plugged in the system on which Arch should be installed.
After that the USB can be plugged in the system on which Arch should be installed.
Boot the target system and select `Boot Arch Linux (x86_64)`.
Boot the target system and select `Boot Arch Linux (x86_64)`.
If you need to set the keyboard layout to anything other than english you can temporarily do so by using the `loadkeys` command.
If you need to set the keyboard layout to anything other than english you can
This has to be followed by your country id (for example a german keyboard layout would be `de`,`de-latin1` or `de-latin1-nodeadkeys`.
temporarily do so by using the `loadkeys` command.
This has to be followed by your country id (for example a german keyboard layout
would be `de`,`de-latin1` or `de-latin1-nodeadkeys`.
## 2. Formatting of the target drive
## 2. Formatting of the target drive
Using `lsblk` you can list all the drives and partitions.
Using `lsblk` you can list all the drives and partitions.
Select a drive to install Arch on.
Select a drive to install Arch on.
In this step you can see if old partitions need to be deleted.
In this step you can see if old partitions need to be deleted.
For reasons of simplicity the following guide will assume the selected drive to be `/dev/sda`.
For reasons of simplicity the following guide will assume the selected drive to
be `/dev/sda`.
### Clear disk completely:
### Clear disk completely
This step can take quite a while especially for large drives.
This step can take quite a while especially for large drives.
@ -30,9 +34,10 @@ This step can take quite a while especially for large drives.
Now all partitions should be removed.
Now all partitions should be removed.
### Create new partitions:
### Create new partitions
If you miss click during the progress of the following commands you can press `CTRL+C` to close the program.
If you miss click during the progress of the following commands you can press
`CTRL+C` to close the program.
No changes will be made until the confirmation at the end.
No changes will be made until the confirmation at the end.
The swap partition will be created later under lvm.
The swap partition will be created later under lvm.
@ -67,16 +72,19 @@ Recovering of this passphrase is **not** possible.
## 4. Setup LVM
## 4. Setup LVM
- `cryptsetup luksOpen /dev/sda2 lvm` - Opening encrypted partition and mapping it to `/dev/mapper/lvm`
@ -95,61 +103,80 @@ Now the created filesystems will be mounted for the installation.
In this step the country specific mirrorserver for the installation will be configured.
In this step the country specific mirrorserver for the installation will be configured.
This will improve the download speed.
This will improve the download speed.
- `cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak` - Create a backup of mirrorlist
- `cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak` - Create a backup
- `grep -E -A 1 ".*Germany.*$" /etc/pacman.d/mirrorlist.bak | sed '/--/d' > /etc/pacman.d/mirrorlist` - Example command to only use *German* mirrors
of mirrorlist
- `cat /etc/pacman.d/mirrorlist` - Check if the file is to your liking. If it is not, you can just recover by using `mirrorlist.bak`
- `grep -E -A 1 ".*Germany.*$" /etc/pacman.d/mirrorlist.bak | sed '/--/d' > /etc/pacman.d/mirrorlist`
- Example command to only use _German_ mirrors
- `cat /etc/pacman.d/mirrorlist` - Check if the file is to your liking. If it is
not, you can just recover by using `mirrorlist.bak`
## 7. Starting base installation
## 7. Starting base installation
Now you need a working internet connection.
Now you need a working internet connection.
Plug in your lan cable or use `wifi-menu` to get a wireless connection.
Plug in your lan cable or use `wifi-menu` to get a wireless connection.
- `pacstrap /mnt base base-devel dosfstools gptfdisk lvm2 linux linux-firmware vim networkmanager` - Installation of main system with needed tools
- `pacstrap /mnt base base-devel dosfstools gptfdisk lvm2 linux linux-firmware vim networkmanager`
- Installation of main system with needed tools
- `genfstab -Up /mnt > /mnt/etc/fstab` - creation of fstab
- `genfstab -Up /mnt > /mnt/etc/fstab` - creation of fstab
- `arch-chroot /mnt` - Switch into the newly installed system
- `arch-chroot /mnt` - Switch into the newly installed system
- `echo ArchLinux > /etc/hostname` - Assign hostname. `ArchLinux` can be changed for any name of your preference.
- `echo ArchLinux > /etc/hostname` - Assign hostname. `ArchLinux` can be changed
for any name of your preference.
## 8. Set Region and Language
## 8. Set Region and Language
- `echo LANG=en\_US.UTF-8 > /etc/locale.conf` - Assign system Language to be english (you can use other languages, look into the `/etc/locale.gen` for a list of all available languages)
- `echo LANG=en\_US.UTF-8 > /etc/locale.conf` - Assign system Language to be
- `vim /etc/locale.gen` - Assigning system language by uncomment the lines depending on your needs.
english (you can use other languages, look into the `/etc/locale.gen` for a list of all available languages)
- `vim /etc/locale.gen` - Assigning system language by uncomment the lines
depending on your needs.
In this example:
In this example:
```
```txt
en_US.UTF-8 UTF-8
en_US.UTF-8 UTF-8
```
```
- `locale-gen` - Generate languages
- `locale-gen` - Generate languages
- `echo KEYMAP=de-latin1-nodeadkeys > /etc/vconsole.conf` - set the keymap
- `echo KEYMAP=de-latin1-nodeadkeys > /etc/vconsole.conf` - set the keymap
- `tzselect` - Set region
- `tzselect` - Set region
# 9. Configure and create kernel-image
## 9. Configure and create kernel-image
- `vim /etc/mkinitcpio.conf`
- `vim /etc/mkinitcpio.conf`
- Search the line `MODULES=()` and change it to:
- Search the line `MODULES=()` and change it to:
`MODULES=(ext4)`
`MODULES=(ext4)`
- Search the line `HOOKS=([...])` and change it to:
- Search the line `HOOKS=([...])` and change it to:
If the system is installed in a virtual environment or a system with deactivated UEFI, don't forget to enable the EFI option, otherwise the system won't boot.
If the system is installed in a virtual environment or a system with deactivated
Now you can follow my larbs installation script (`curl -o larbs.sh https://raw.githubusercontent.com/tiyn/larbs/master/larbs.sh` or go on to other guides.
UEFI, don't forget to enable the EFI option, otherwise the system won't boot.
To use GPUs or other PCI devices you need to work with PCI passthrough.
To use GPUs or other PCI devices you need to work with PCI passthrough.
For documentation you can look in the [Proxmox wiki](https://pve.proxmox.com/wiki/Pci_passthrough).
For documentation you can look in the [Proxmox wiki](https://pve.proxmox.com/wiki/Pci_passthrough).
There is also an [article](https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough) on reddit, that focusses especially on windows 10 VMs with GPU passthrough.
There is also an[article](https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough)
on reddit, that focusses especially on windows 10 VMs with GPU passthrough.