1
0
mirror of https://github.com/tiyn/wiki.git synced 2025-11-07 05:31:17 +01:00

markdown syntax: formatted all files with prettier

This commit is contained in:
TiynGER
2020-11-01 16:06:38 +01:00
parent 0b7e2aa41b
commit 2951efa92e
45 changed files with 762 additions and 625 deletions

View File

@@ -7,22 +7,26 @@ At the end of this guide a fully functional Arch Linux will be installed.
## 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`.
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)`.
If you need to set the keyboard layout to anything other than english you can 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`.
If you need to set the keyboard layout to anything other than english you can
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
Using `lsblk` you can list all the drives and partitions.
Select a drive to install Arch on.
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.
@@ -30,9 +34,10 @@ This step can take quite a while especially for large drives.
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.
The swap partition will be created later under lvm.
@@ -62,21 +67,24 @@ For this guide this partition is assumed to be `/dev/sda2`.
- `cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sda2` - encryption
- confirm with `YES`
- Now you can assign a passphrase.
The passphrase has to be entered at boot to decrypt the system.
Recovering of this passphrase is **not** possible.
The passphrase has to be entered at boot to decrypt the system.
Recovering of this passphrase is **not** possible.
## 4. Setup LVM
- `cryptsetup luksOpen /dev/sda2 lvm` - Opening encrypted partition and mapping it to `/dev/mapper/lvm`
- `cryptsetup luksOpen /dev/sda2 lvm` - Opening encrypted partition and mapping
it to `/dev/mapper/lvm`
- `pvcreate /dev/mapper/lvm` - Create a LVM physical volume
- `vgcreate main /dev/mapper/lvm` - Create LVM Volume Group
- `lvcreate -L 16G -n swap main` - Create Swap in LVM (recommended: swap size is equal to ram size)
- `lvcreate -L 16G -n swap main` - Create Swap in LVM (recommended: swap size
is equal to ram size)
- `lvcreate -l 100%FREE -n root main` - Create LVM Logical Volume for /
## 5. Create filesystems and mounting them temporarily
We have to find out which partition is our boot-partition.
Using `blkid | grep /dev/sda` once again, we can identify it by looking for the `EFI system partition` label.
Using `blkid | grep /dev/sda` once again, we can identify it by looking for the
`EFI system partition` label.
The guide assumes this partition to be at `/dev/sda1`.
- `mkfs.fat -F 32 -n UEFI /dev/sda1` - Assign filesystem of EFI partition
@@ -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.
This will improve the download speed.
- `cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak` - Create a backup of mirrorlist
- `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`
- `cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak` - Create a backup
of mirrorlist
- `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
Now you need a working internet 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
- `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
- `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)
- `vim /etc/locale.gen` - Assigning system language by uncomment the lines depending on your needs.
In this example:
```
- `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)
- `vim /etc/locale.gen` - Assigning system language by uncomment the lines
depending on your needs.
In this example:
```txt
en_US.UTF-8 UTF-8
```
- `locale-gen` - Generate languages
- `echo KEYMAP=de-latin1-nodeadkeys > /etc/vconsole.conf` - set the keymap
- `tzselect` - Set region
# 9. Configure and create kernel-image
## 9. Configure and create kernel-image
- `vim /etc/mkinitcpio.conf`
- Search the line `MODULES=()` and change it to:
`MODULES=(ext4)`
- Search the line `HOOKS=([...])` and change it to:
`HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)`
- Search the line `MODULES=()` and change it to:
`MODULES=(ext4)`
- Search the line `HOOKS=([...])` and change it to:
`HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)`
- `mkinitcpio -p linux` - generate Kernel-Image
## 10. Install and configure UEFI bootloader
- `bootctl install` - Prepare bootloader
- `ls -l /dev/disk/by-uuid` - find out the UUID
- `lsblk -no UUID /dev/sda2 | head -n1 > /boot/loader/entries/arch.conf` - print the UUID in your configuration file
- `lsblk -no UUID /dev/sda2 | head -n1 > /boot/loader/entries/arch.conf` - print
the UUID in your configuration file
- `vim /boot/loader/entries/arch.conf` - Create configuration
- Change the config to look similar to this:
```
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=<enter your uuid here>:lvm:allow-discards root=/dev/mapper/main-root resume=/dev/mapper/main-swap rw quiet
```
- `cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-fallback.conf` - Create a fallback
- Change the config to look similar to this:
```txt
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=<enter your uuid here>:lvm:allow-discards root=/dev/mapper/main-root resume=/dev/mapper/main-swap rw quiet
```
- `cp /boot/loader/entries/arch.conf /boot/loader/entries/arch-fallback.conf`
- Create a fallback
- `vim /boot/loader/loader.conf` - Create loader configuration
- Insert the following text
```
timeout 0
default arch
```
- Insert the following text
```txt
timeout 0
default arch
```
## 11. Finishing base installation
- `passwd` - set password for the root account
@@ -159,12 +186,8 @@ en_US.UTF-8 UTF-8
- Now remove the Arch boot-stick
- Start the device again
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.
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.
## Changelog and versions
> 03.04.2020 - Version 1.1en (based on 03.04.2020 - Version 1.1)
>
> 05.04.2020 - Version 2.1en (based on 05.04.2020 - Version 2.1)
>
> 28.05.2020 - Version 3.0en
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.
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.

View File

@@ -9,11 +9,12 @@ This guide is done in collaboration with [rvbg.eu](https://wiki.rvbg.eu).
## Fan controlling
- ` yay -S lm_sensors thinkfan` - Install the needed utilities
- `yay -S lm_sensors thinkfan` - Install the needed utilities
- `sudo modprobe thinkpad_acpi` - After that load the kernel module thinkpad_acpi
- `sudo modprobe thinkpad_acpi` - After that load the kernel module `thinkpad_acpi`
- `sudo cp /usr/share/doc/thinkfan/examples/thinkfan.conf.simple /etc/thinkfan.conf` - Copy and configure the config file
- `sudo cp /usr/share/doc/thinkfan/examples/thinkfan.conf.simple /etc/thinkfan.conf`
Copy and configure the config file
- `systemctl start thinkfan` - Start the thinkfan service
@@ -26,9 +27,8 @@ This guide is done in collaboration with [rvbg.eu](https://wiki.rvbg.eu).
- `sudo vim /boot/loader/entries/arch.conf` - Open the bootloader configuration
- Go to the `options` line.
Append the following.
```
acpi_osi="!Windows 2012"
```
`acpi_osi="!Windows 2012"`
- `shutdown -r now` - Reboot the system
## Activate battery options
@@ -37,12 +37,14 @@ acpi_osi="!Windows 2012"
- `yay -S acpi_call` - Enables battery charging stop at given capacity
- `sudo vim /etc/tlp.conf` - Open the battery options
- Change the following lines
```
```txt
START_CHARGE_THRESH_BAT0=80
STOP_CHARGE_THRESH_BAT0=90
```
The battery will start charging at 80 percent and stop charging at 90.
- `sudo tlp start` - Start service and save changed options
- `sudo systemctl enable tlp.service` - Enable the service
@@ -52,13 +54,16 @@ The battery will start charging at 80 percent and stop charging at 90.
- `yay -S xrandr arandr` - Instll multimonitor tools
- Dock the system
- `arandr` - Setup the monitor configuration
- `dockd --config docked` - Save the changes (has to maybe be stopped by `CTRL + C`)
- `dockd --config docked` - Save the changes (has to maybe be stopped by
`CTRL + C`)
- Undock the system
- `arandr` - Setup the monitor configuration
- `dockd --config undocked` - Save the changes (has to maybe be stopped by `CTRL + C`)
- `dockd --config undocked` - Save the changes (has to maybe be stopped by
`CTRL + C`)
- `systemctl enable acpid` - Activate ACPI listener
- `systemctl start acpid` - Start ACPI listener
Scripts to change configuration at docking/undocking
- For the docked configuration use `vim /etc/dockd/dock.hook`
- For the undocked configuration use `vim /etc/dockd/undock.hook`

View File

@@ -2,16 +2,21 @@
## Grow non-LVM ext4 partition
ATTENTION: Please note that the partition to enlarge has to be the last one with the free space after it.
ATTENTION: Please note that the partition to enlarge has to be the last one with
the free space after it.
SSH into the VM.
- run `lsblk` check if the disk size has changed
- if not `reboot` the virtual machine
In the following it is assumed that the partition to enlarge is `/dev/sda2`
- change the size of the partition with `parted /dev/sda`
- inside of parted run `print free` and check where the free space after your partition ends
- run `resizepart` and follow the instructions; End is the number you checked in the last step
- inside of parted run `print free` and check where the free space after your
partition ends
- run `resizepart` and follow the instructions; End is the number you checked in
the last step
- `quit` parted
Now you need to resize the filesystem with `resize2fs /dev/sda2`.
@@ -22,10 +27,12 @@ Now you need to resize the filesystem with `resize2fs /dev/sda2`.
source: [https://askubuntu.com/questions/197459/how-to-fix-sudo-unable-to-open-read-only-file-system]
Ususally the filesystem will go into read-only mode whe the system is running and there is a consistency error.
Ususally the filesystem will go into read-only mode whe the system is running
and there is a consistency error.
To fix it run:
- `sudo fsck -Af -M` - check all filesystems
If `fsck` gets stuck after its version banner:
`fsck from util-linux 2.20.1`
you may want to try using the ext4-specific fsck:
If `fsck` gets stuck after its version banner:
`fsck from util-linux 2.20.1`
you may want to try using the ext4-specific fsck:
- `fsck.ext4 -f /dev/sda1`

View File

@@ -13,7 +13,7 @@ To sync calendars you'll need `vdirsyncer` aswell.
- To configure vdirsyncer edit a file in `~/.config/vdirsyncer/config`.
```
```txt
[general]
status_path = "~/.cache/vdirsyncer/status"
@@ -41,8 +41,9 @@ password = "<password>"
- `vdirsyncer discober && vdirsyncer metasync` - After that initialize vdirsyncer.
- `vdirsyncer sync` - Synchronize your data (put it in a crontab to run periodically)
- Edit the `~/.config/khal/config`
- Insert the following lines
```
- Insert the following lines
```txt
[calendars]
[[calendars]]

View File

@@ -12,8 +12,9 @@ To sync the data using CardDAV you'll need `vdirsyncer` aswell.
### Configuration
- Edit the `~/.config/vdirsyncer/config`.
- Insert the following lines:
```
- Insert the following lines:
```txt
[general]
status_path = "~/.cache/vdirsyncer/status"
@@ -34,12 +35,15 @@ username = "<username>"
password = "<password>"
auth = "basic"
```
- `vdirsyncer discover && vdirsyncer metasync` - Initialize vdirsyncer
- `vdirsyncer sync` - Synchronize the addressbook (put this into a crontab to update periodically)
- `vdirsyncer sync` - Synchronize the addressbook (put this into a crontab to
update periodically)
- Add and configure a config for khard
- `mkdir ~/.config/khard` - add a directory for the config
- `cp /usr/share/doc/khard/khard.conf.example ~/.config/khard/khard.conf` - Copy the example configuration
- Adjust `khard.conf` to your needs
- `mkdir ~/.config/khard` - add a directory for the config
- `cp /usr/share/doc/khard/khard.conf.example ~/.config/khard/khard.conf` -
Copy the example configuration
- Adjust `khard.conf` to your needs
#### Mutt

View File

@@ -8,11 +8,13 @@ It can be easily configured using mutt-wizard.
### Arch-Linux
- `yay -S neomutt isync msmtp pass` - Install all dependecies
- Install mutt-wizard from [github](https://github.com/LukeSmithxyz/mutt-wizard) (AUR is not up to date)
- Install mutt-wizard from [github](https://github.com/LukeSmithxyz/mutt-wizard)
(AUR is not up to date)
#### Using mutt-wizard
After installation you're able to use the following commands, that will guide you through configuration.
After installation you're able to use the following commands, that will guide
you through configuration.
`mw add` to add mailaccounts
@@ -31,15 +33,16 @@ After installation you're able to use the following commands, that will guide yo
## Khard in NeoMutt
- Edit `~/.config/mutt/muttrc`
- Append the following lines.
```
- Append the following lines.
```txt
set query_command= "khard email --parsable --search-in-source-files %s"
bind editor <Tab> complete-query
bind editor ^T complete
macro index,pager A \
"<pipe message>khard add-email<return>" \
"add the sender email address to khard"
"<pipe message>khard add-email<return>" \
"add the sender email address to khard"
```
- You should now be able to tab-complete email-addresses in neomutt
- You can also add new ones by pressing A

View File

@@ -22,4 +22,5 @@ You can insert new rows `ir`/`i3r` or columns `ic`/`i3c`.
There are some functions you can use when in numbers mode.
- `=@sum(<start-cell>:<end-cell>)` - Summarize all number-entries in the range of given cells
- `=@sum(<start-cell>:<end-cell>)` - Summarize all number-entries in the range
of given cells

View File

@@ -11,4 +11,5 @@ This is a guide on how to persistently change the symlink /bin/sh from bash to d
- `yay -S dash` - Install dash
- `sudo ln -sfT /bin/dash /bin/sh` - link /bin/sh to dash
- `sudo vim /usr/share/libalpm/hooks/bash-update.hook` - setup a hook to avoid bash resetting the symlink
- `sudo vim /usr/share/libalpm/hooks/bash-update.hook` - setup a hook to avoid
bash resetting the symlink

View File

@@ -5,11 +5,13 @@ Wine is a compatibility layer to run windows programs on linux machines.
## Setup
- Enable multilib support in pacman
- `vim /etc/pacman.conf` - Uncomment the following lines
```
[multilib]
Include = /etc/pacman.d/mirrorlist
```
- `vim /etc/pacman.conf` - Uncomment the following lines
```txt
[multilib]
Include = /etc/pacman.d/mirrorlist
```
- `pacman -S wine winetricks` - Install wine and configuration helper
## Configuration
@@ -17,5 +19,6 @@ Wine is a compatibility layer to run windows programs on linux machines.
- Set the global variable `WINEPREFIX` to your liking, standard is `$HOME/.wine`
- `winetricks` - run the installation of basic windows dependencies to the wine directory
- Move the program you want to run to `$WINEPREFIX/drive_c/`
- `winetricks sandbox` - (Optional) if you don't want wine to set up directories or files into your home directory
- `winetricks sandbox` - (Optional) if you don't want wine to set up directories
or files into your home directory
- `wine $WINEPREFIX/drive_c/<insert program>` - Run the program with wine

View File

@@ -7,11 +7,12 @@
Linux can sometimes have problems with screen tearing.
To get this working you need to change the `/etc/X11/xorg.conf.d/20-intel.conf` to:
```
```txt
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
EndSection
```
This was found on [maketecheasier](https://www.maketecheasier.com/get-rid-screen-tearing-linux).