From ac33388db2b7feb6b47468df312178dde0803f45 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 31 Aug 2021 15:49:46 +0200 Subject: [PATCH 001/211] linux: added further guides for disk management and for raid --- wiki/linux/disk-management.md | 17 ++++++++++++----- wiki/linux/mdadm.md | 34 ++++++++++++++++++++++++++++++++-- wiki/linux/proxmox.md | 5 ++++- 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/wiki/linux/disk-management.md b/wiki/linux/disk-management.md index 7209536..ccca227 100644 --- a/wiki/linux/disk-management.md +++ b/wiki/linux/disk-management.md @@ -1,15 +1,22 @@ # Disk Management +This entry focusses on non-LVM and non-MDADM storage. +For [LVM](lvm.md) and [MDADM](./mdadm.md) there are separate entries. + +## Create Partition + +In the following it is assumed that the disk is `/dev/sda` + +- open up parted with `parted /dev/sdd` +- if not already done create a partition table with `mklabel GPT` +- create a primary partition (ext4 format) with `mkpart primary 2048s 100%` +- `quit` parted + ## 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. -SSH into the VM. - -- run `lsblk` check if the disk size has changed -- if not `reboot` the 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` diff --git a/wiki/linux/mdadm.md b/wiki/linux/mdadm.md index 6b17d13..4c12599 100644 --- a/wiki/linux/mdadm.md +++ b/wiki/linux/mdadm.md @@ -2,14 +2,44 @@ `mdadm` is a utility to create and manage raid devices. +## Get information about a raid + +To get an info for a running raid (assuming it is `/dev/md0`) run +`mdadm -D /dev/md0`. + +### Add disk/partition to raid device + +You can add a disk or partition to a raid device by running the following. +It is assumed you are adding a partition called `/dev/sdd1` but it could also +be a whole drive and the mdadm drive is called `/dev/md0`. + +`mdadm --add /dev/md0 /dev/sdd1` + ## Raid 1 Raid 1 creates a mirror with even amount of drives. -### Create Raid 0 device +### Create raid 1 device -You can create a Raid 0 device with +You can create a Raid 1 device with `mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb` where `sda` and `sdb` are the disks you want to include in your raid. You can increase the number of raid devices, but they have to be at least 2. If it is an uneven amount of disks in the raid, a disk will act as a spare disk. + +### Convert raid 1 to raid 5 + +Assuming the raid device is called `/dev/md0`. +All other drives are part of the `md0` raid device. + +- Remove all drives but 2 by running `mdadm /dev/md0 --fail /dev/sda1` and + `mdadm /dev/md0 --remove /dev/sda1` where `sda1` is the drive to remove +- Make sure your raid 1 array has only 2 active drives by running + `mdadm --grow /dev/md0 -n 2` +- Now convert your raid 1 to a raid 5 device with `mdadm --grow /dev/md0 -l5` +- Add the disks you removed back to the raid with + `mdadm /dev/md0 --add /dev/sda1` +- Finally grow the active drive number to your needs (in this example 4) + `mdadm --grow /dev/md0 -n4` +- `mdadm` now reshapes the raid. You can monitor it by running + `watch cat /proc/mdstat` diff --git a/wiki/linux/proxmox.md b/wiki/linux/proxmox.md index c0fc6b9..1d64d0a 100644 --- a/wiki/linux/proxmox.md +++ b/wiki/linux/proxmox.md @@ -14,6 +14,9 @@ After that follow the instructions and fill in the fields to your liking. ### Enlarging disk of a VM +Make sure there is enough disk space available. +For further information see [the disk management entry](./disk-management.md) + SSH into Proxmox. Enlarge a disk by using: @@ -27,7 +30,7 @@ For example (100G is 100GibiByte): qm resize 100 ide0 +100G ``` -After that grow the filesystem as described in [the disk-management article](disk-management.md). +After that grow the filesystem as described in [the disk management article](./disk-management.md). ## Remove local-lvm and add its size to local From c8debe2fa957249cbfb3227d7a20b604e21d47de Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 7 Sep 2021 18:57:08 +0200 Subject: [PATCH 002/211] linux: resizing lvm and luks added --- .../docker-images/johnktims_-_folding-at-home.md | 2 +- wiki/linux/arch-linux/installation.md | 6 ++---- wiki/linux/disk-management.md | 5 +++-- wiki/linux/dm-crypt.md | 16 ++++++++++++++++ wiki/linux/lvm.md | 16 +++++++++++++++- wiki/linux/proxmox.md | 7 ++++--- wiki/linux/vim/c-language.md | 3 ++- wiki/linux/vim/golang.md | 6 ++++-- wiki/linux/vim/python.md | 4 ++-- wiki/linux/vim/vhdl.md | 2 +- wiki/matrix.md | 2 +- 11 files changed, 51 insertions(+), 18 deletions(-) diff --git a/wiki/docker-images/johnktims_-_folding-at-home.md b/wiki/docker-images/johnktims_-_folding-at-home.md index 3d06409..e996104 100644 --- a/wiki/docker-images/johnktims_-_folding-at-home.md +++ b/wiki/docker-images/johnktims_-_folding-at-home.md @@ -22,7 +22,7 @@ There are some special variables to set. ### GPU -GPU support is documented in [the docker entry](../docker.md). +GPU support is documented in [the docker article](../docker.md). ## rebuild.sh diff --git a/wiki/linux/arch-linux/installation.md b/wiki/linux/arch-linux/installation.md index 9d367d5..3d30897 100644 --- a/wiki/linux/arch-linux/installation.md +++ b/wiki/linux/arch-linux/installation.md @@ -1,9 +1,7 @@ # Arch installation with LUKS encryption and LVM -This is the English version of the -[German installation guide on rvbg.eu](https://wiki.rvbg.eu/#arch/installation.md). This guide is based upon a -[german arch wiki entry](https://wiki.archlinux.de/title/Moderne_Installation_mit_UEFI_und_Verschlüsselung). +[german arch wiki article](https://wiki.archlinux.de/title/Moderne_Installation_mit_UEFI_und_Verschlüsselung). At the end of this guide a fully functional Arch Linux will be installed. @@ -203,4 +201,4 @@ this will install a bunch of useful software including a graphical environment. You can go on to other guides aswell. Additionally if you have a NVidia Graphics Cards you should read -[the NVidia entry](../nvidia.md) too. +[the NVidia article](../nvidia.md) too. diff --git a/wiki/linux/disk-management.md b/wiki/linux/disk-management.md index ccca227..9678852 100644 --- a/wiki/linux/disk-management.md +++ b/wiki/linux/disk-management.md @@ -1,7 +1,8 @@ # Disk Management -This entry focusses on non-LVM and non-MDADM storage. -For [LVM](lvm.md) and [MDADM](./mdadm.md) there are separate entries. +This article focusses on non-LVM and non-MDADM storage. +For [LVM](lvm.md), [MDADM](./mdadm.md) and [LUKS volumes](./dm-crypt.md) there +are separate entries. ## Create Partition diff --git a/wiki/linux/dm-crypt.md b/wiki/linux/dm-crypt.md index 091f5c1..6d259fe 100644 --- a/wiki/linux/dm-crypt.md +++ b/wiki/linux/dm-crypt.md @@ -13,3 +13,19 @@ Where `/dev/sda2` is the device you want to create. To open and map a device run `cryptsetup -y -v luksFormat /dev/sda1 crypt0` where `/dev/sda1` is your encrypted device and `crypt0` is where it will be mapped to with `dev/mapper/crypt0`. + +## Resize a LUKS encrypted volume + +If you have volume groups on the encrypted volume make sure to close them +with the following command modified to your needs: +`vgchange -a n ` + +Open the encrypted volume (assuming its stored at `/dev/sda2` and you map it +to `crypt-volume`): +`cryptsetup luksOpen /dev/sda2 crypt-volume` + +Now resize the encrypted volume to all available space of the partition. +If you don't want to extend the encrypted volume to the whole partition +or the partition is to small for your purposes, make sure to resize the +partition first accordingly (see [disk management](./disk-management.md)). +`cryptsetup resize crypt-volume` diff --git a/wiki/linux/lvm.md b/wiki/linux/lvm.md index e78a45b..305a382 100644 --- a/wiki/linux/lvm.md +++ b/wiki/linux/lvm.md @@ -24,10 +24,24 @@ pvcreate /dev/sdc1 vgextend /dev/sdc1 ``` +## Resize a physical volume + +To increase the size of a physical volume you have to have free free space +in the partition containing the physical volume. +A guide to change 'normal' partitions can be found in the +[disk management article](./disk-management.md); if you have a volume that is +encrypted with LUKS a guide is available in +[the dm-crypt articel](./dm-crypt.md). + +To resize the physical volume to the size of the containing volume run: +`pvresize /dev/mapper/` + ## Increase size of a logical volume -To increase the size of the logical volume you need to have free space in the +To increase the size of the logical volume you have to have free space in the according volume group. You can check that by running: `vgdisplay`. +If you don't have enough space you have to resize the physical volume as +described in this article. Then run: ```shell diff --git a/wiki/linux/proxmox.md b/wiki/linux/proxmox.md index 1d64d0a..7d38bc2 100644 --- a/wiki/linux/proxmox.md +++ b/wiki/linux/proxmox.md @@ -15,7 +15,7 @@ After that follow the instructions and fill in the fields to your liking. ### Enlarging disk of a VM Make sure there is enough disk space available. -For further information see [the disk management entry](./disk-management.md) +For further information see [the disk management article](./disk-management.md) SSH into Proxmox. Enlarge a disk by using: @@ -24,13 +24,14 @@ Enlarge a disk by using: qm resize ``` -For example (100G is 100GibiByte): +For example if you want to the disk 100 by 100G (100GibiByte): ```shell qm resize 100 ide0 +100G ``` -After that grow the filesystem as described in [the disk management article](./disk-management.md). +After that grow the filesystem in the vm as described in +[the disk management article](./disk-management.md). ## Remove local-lvm and add its size to local diff --git a/wiki/linux/vim/c-language.md b/wiki/linux/vim/c-language.md index 1196d1c..e5bbc18 100644 --- a/wiki/linux/vim/c-language.md +++ b/wiki/linux/vim/c-language.md @@ -1,7 +1,8 @@ # C in Vim C is a common programming language. -In this entry we will focus on making vim support c and use vim as an ide for c. +In this article we will focus on making vim support c and use vim as an ide for +c. ## Autocompletion diff --git a/wiki/linux/vim/golang.md b/wiki/linux/vim/golang.md index d753367..14738bc 100644 --- a/wiki/linux/vim/golang.md +++ b/wiki/linux/vim/golang.md @@ -1,8 +1,10 @@ # GoLang in Vim GoLang is a common programming language. -In this entry we will focus on making vim support Go and use vim as an ide for it. -This guide is based on a guide from [octetz.com](https://octetz.com/docs/2019/2019-04-24-vim-as-a-go-ide/). +In this article we will focus on making vim support Go and use vim as an ide +for it. +This guide is based on a guide from +[octetz.com](https://octetz.com/docs/2019/2019-04-24-vim-as-a-go-ide/). ## Build, Test, Run, Docs, Debug, Format diff --git a/wiki/linux/vim/python.md b/wiki/linux/vim/python.md index d97d186..d1334f3 100644 --- a/wiki/linux/vim/python.md +++ b/wiki/linux/vim/python.md @@ -1,8 +1,8 @@ # Python in Vim Python is a common programming language. -In this entry we will focus on making vim support python and use vim as an ide -for it. +In this article we will focus on making vim support python and use vim as an +ide for it. ## Autocompletion diff --git a/wiki/linux/vim/vhdl.md b/wiki/linux/vim/vhdl.md index 65f1ce5..fe9f50d 100644 --- a/wiki/linux/vim/vhdl.md +++ b/wiki/linux/vim/vhdl.md @@ -1,7 +1,7 @@ # VHDL in Vim VHDL is a hardware description language. -In this entry we will focus on making vim support VHDL. +In this article we will focus on making vim support VHDL. ## Linting diff --git a/wiki/matrix.md b/wiki/matrix.md index 3b7af41..0d201c4 100644 --- a/wiki/matrix.md +++ b/wiki/matrix.md @@ -12,7 +12,7 @@ This setup guide follows a modified version of the [guide by matusnovak](https://gist.github.com/matusnovak/37109e60abe79f4b59fc9fbda10896da). Furthermore this guide will assume you already have a [traefik v2.4](./traefik.md) instance setup as described in the -[traefik docker image entry](./docker-images/traefik.md). +[traefik docker image article](./docker-images/traefik.md). ### DNS records From 0116cdfb7a8a8292ccfaa49ebf21cf2964d49e30 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sun, 12 Sep 2021 14:20:53 +0200 Subject: [PATCH 003/211] video: added bugfix for makemkv linux --- wiki/video.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wiki/video.md b/wiki/video.md index c708c96..666b66f 100644 --- a/wiki/video.md +++ b/wiki/video.md @@ -22,6 +22,14 @@ This way you don't have to search for your discs all the time. - [MakeMKV](https://www.makemkv.com) for windows can extract a `.mkv` file from a disc (Beta key can be found [here](https://www.makemkv.com/forum/viewtopic.php?f=5&t=1053)). + On Linux it is possible that the drive is not detected in MakeMKV. + To fix this issue run the following lines and reboot afterwards. + + ``` + su + echo sg > /etc/modules-load.d/sg.conf + ``` + - [MKS Extractor GUI](https://www.videohelp.vom/software/MKS-Extractor-GUI) for windows can extract subtitles from a `.mkv` file - [VidCoder](https://vidcoder.net) for windows can compress `.mkv` files. From 77a7ca133beda1b11558174f551606e0f3636b38 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sun, 14 Nov 2021 19:21:45 +0100 Subject: [PATCH 004/211] ssh: added sshfs mounting --- wiki/linux/ssh.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wiki/linux/ssh.md b/wiki/linux/ssh.md index 57143a7..44d7ef6 100644 --- a/wiki/linux/ssh.md +++ b/wiki/linux/ssh.md @@ -23,3 +23,13 @@ You can use the modified command below for ease of use: ```shell cat ~/.ssh/id_rsa.pub | ssh username@server 'cat >> ~/.ssh/authorized_keys' ``` + +## Mount directory with sshfs + +To mount a directory (in this case called `directory`) from a remote server +(in this case called `server` also can be substituted by something like +`user@server-ip`) on a local mount (in this case `mountpoint`) run: + +```shell +sshfs server:/directory mountpoint +``` From bde52880787cde81c64463be8b7c1b1dc62b7bf1 Mon Sep 17 00:00:00 2001 From: tiyn Date: Mon, 6 Dec 2021 20:59:52 +0100 Subject: [PATCH 005/211] linux: added proper guide to noisecancellation with pipewire --- wiki/linux/audio.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/wiki/linux/audio.md b/wiki/linux/audio.md index 4ec559d..55dda31 100644 --- a/wiki/linux/audio.md +++ b/wiki/linux/audio.md @@ -2,9 +2,36 @@ Audio is an important point in a linux desktop environment +## Pulseaudio + +[Pulseaudio](https://www.freedesktop.org/wiki/Software/PulseAudio) is the go-to +audio server program for linux distributions. + ## Noise cancellation -Noise cancellation can be achieved by installing +Noise cancellation can be easily achieved by installing [Noisetorch](https://github.com/lawl/NoiseTorch). -This works for `pulseaudio` and `pipewire`. After the installation modify the `Voice Activation Threshhold` to your needs. + +## Pipewire + +[Pipewire](https://pipewire.org) is a graph based processing engine for +`pulseaudio` and `JACK`. +It makes improvements for the input and output handling. + +### Installation + +If the current audio server program running is `pulseaudio`, you can just +install `pipewire-pulse` (on Arch-based distros or according packages on other +distros) and pipewire is running. +Make sure to restart to be sure everything is running correctly. + +### Noise cancellation + +Noise cancellation can be easily achieved in `pipewire`-style by installing +[easyeffects](https://github.com/wwmm/easyeffects). +Make sure to check the box `Process all Inputs` and `Process all Outputs` to +route everything through `easyeffects`. +Make log out of your system afterwards. +To enable noise cancellation navigate `Inputs` and click `Plugins`. +After that click `Add Plugin` and select `Noise Reduction`. From 28b40ea5108b6fb70cda5487e8bfb46db71dc4b8 Mon Sep 17 00:00:00 2001 From: tiyn Date: Thu, 30 Dec 2021 15:23:41 +0100 Subject: [PATCH 006/211] arch package manager: added importing and trusting keys --- wiki/linux/arch-linux/package-manager.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wiki/linux/arch-linux/package-manager.md b/wiki/linux/arch-linux/package-manager.md index 73caee7..ddfbab1 100644 --- a/wiki/linux/arch-linux/package-manager.md +++ b/wiki/linux/arch-linux/package-manager.md @@ -18,3 +18,18 @@ right package. It is possible that it runs into errors when importing new keys. If this happens you should try to restart your gpg key server with `gpgconf --kill all`. + +### Unknown public key + +If the error `ERROR: One or more PGP signatures could not be verified!`, you +have to manually receive the key and trust it. +This is done by running the following lines: + +```sh +gpg --recv-key +gpg --lsign +``` + +Where is the placeholder of the identification string of the key. +It usually gets gets printed in the line above the error looking like +`FAILED (unknown public key )`. From 2f03bef81922362fddf275b68085a6cccef96eda Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Thu, 2 Jun 2022 17:36:22 +0200 Subject: [PATCH 007/211] Update disk-management.md --- wiki/linux/disk-management.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wiki/linux/disk-management.md b/wiki/linux/disk-management.md index 9678852..bfecdb9 100644 --- a/wiki/linux/disk-management.md +++ b/wiki/linux/disk-management.md @@ -24,7 +24,8 @@ In the following it is assumed that the partition to enlarge is `/dev/sda2` - 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 +the last step (alternatively you can insert `100%` as end, if you want to add all +the available free space to the partition) - `quit` parted Now you need to resize the filesystem with `resize2fs /dev/sda2`. From b462e5e73402aa262a214cb14d08039472739d34 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sun, 3 Jul 2022 03:45:42 +0200 Subject: [PATCH 008/211] dm-crypt: added automatic usb key decryption --- wiki/linux/arch-linux/installation.md | 4 ++ wiki/linux/dm-crypt.md | 64 +++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/wiki/linux/arch-linux/installation.md b/wiki/linux/arch-linux/installation.md index d37400a..92f355e 100644 --- a/wiki/linux/arch-linux/installation.md +++ b/wiki/linux/arch-linux/installation.md @@ -207,3 +207,7 @@ You can go on to other guides aswell. Additionally if you have a NVidia Graphics Cards you should read [the NVidia article](../nvidia.md) too. + +If you are interested in automatic decryption of the dm-crypt encrypted +partition, take a look at the according section in +[the dm-crypt article](../dm-crypt.md). diff --git a/wiki/linux/dm-crypt.md b/wiki/linux/dm-crypt.md index 6d259fe..3bd040c 100644 --- a/wiki/linux/dm-crypt.md +++ b/wiki/linux/dm-crypt.md @@ -29,3 +29,67 @@ If you don't want to extend the encrypted volume to the whole partition or the partition is to small for your purposes, make sure to resize the partition first accordingly (see [disk management](./disk-management.md)). `cryptsetup resize crypt-volume` + +## Creating a automatic encryption key with an USB stick + +This guide assumes you to have an Arch Linux System, as installed in +[this wiki arch linux installation](./arch-linux/installation.md). +This section is based on entries from the +[arch linux forum](https://forum.archlinux.de/d/28886-systementschluesselung-per-usb-stick). + +Insert your USB stick. +This guide will assume its address is `/dev/sde`. + +Fill in the first sectors (in this case 94, make sure this number is bigger +than skip sector count and size sector count combined) stick with a random +sequence: +`dd if=/dev/urandom of=/dev/sde bs=512 seek=1 count=94`. +Save the key to a keyfile (with offset 14848 = 29 x 512 and +keysize 2048 = 4 x 512): +`dd if=/dev/sde bs=512 skip=29 count=4 > key.bin`. + +Add the keyfile to the encrypted partition (assuming the dm-crypted device is +called `/dev/sda2`): +`cryptsetup luksAddKey /dev/sda2 key.bin`. + +Next it has to be made sure that the decryption key, is available at the same +position every time. +For this check the `serial` and `product` of your USB stick with the following +commands. + +```sh +udevadm info -a -p `udevadm info -q path -n /dev/sde` | grep ATTRS{serial} +udevadm info -a -p `udevadm info -q path -n /dev/sde` | grep ATTRS{product} +``` + +The first line gives the `serial`, the second the `product`. +The `product` should match your USB stick. + +After this create a file at `/etc/udev/rules.d/50-usbkey.rules` with the +following content. +Assuming the `serial` is `14AB0000000096`. + +```txt +SUBSYSTEMS=="usb", ATTRS{serial}=="14AB0000000096", KERNEL=="sd*", SYMLINK+="usbkey%n" +``` + +Then reload the udev rules by running: +`udevadm control --reload-rules`. + +Unplug the stick and plug it back in. +It should be available under `dev/usbkey`. + +After that make sure in `/etc/mkinitcpio.conf` under the `HOOKS` section +`keymap encrypt lvm2` are written before `filesystems`. +Add `/etc/udev/rules.d/50-usbkey.rules` under the `FILES` section. + +Then modify `/boot/loader/entries/arch.conf` and add +`cryptkey=/dev/usbkey:14848:2048` to the +end of the `options` line. + +Finally run: +`mkinitcpio -p linux`. + +Reboot the system with `reboot`. +Make sure the USB key for decryption is plugged in. +If so the encrypted partition should be decrypted automatically. From 91d25f1822f6b4ed19a0695a89009c6543b83e07 Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Sun, 3 Jul 2022 13:00:16 +0200 Subject: [PATCH 009/211] Update dm-crypt.md --- wiki/linux/dm-crypt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/linux/dm-crypt.md b/wiki/linux/dm-crypt.md index 3bd040c..4eae7f1 100644 --- a/wiki/linux/dm-crypt.md +++ b/wiki/linux/dm-crypt.md @@ -30,7 +30,7 @@ or the partition is to small for your purposes, make sure to resize the partition first accordingly (see [disk management](./disk-management.md)). `cryptsetup resize crypt-volume` -## Creating a automatic encryption key with an USB stick +## Creating an automatic encryption key with an USB stick This guide assumes you to have an Arch Linux System, as installed in [this wiki arch linux installation](./arch-linux/installation.md). From 7730a31c826353f474d36e604e6531fbf14ea51d Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Sun, 3 Jul 2022 13:01:55 +0200 Subject: [PATCH 010/211] Update dm-crypt.md --- wiki/linux/dm-crypt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/linux/dm-crypt.md b/wiki/linux/dm-crypt.md index 4eae7f1..35452f8 100644 --- a/wiki/linux/dm-crypt.md +++ b/wiki/linux/dm-crypt.md @@ -33,7 +33,7 @@ partition first accordingly (see [disk management](./disk-management.md)). ## Creating an automatic encryption key with an USB stick This guide assumes you to have an Arch Linux System, as installed in -[this wiki arch linux installation](./arch-linux/installation.md). +[this wikis arch linux installation](./arch-linux/installation.md). This section is based on entries from the [arch linux forum](https://forum.archlinux.de/d/28886-systementschluesselung-per-usb-stick). From aad5b725c9f61dec3e1881fede557566db376f0d Mon Sep 17 00:00:00 2001 From: tiyn Date: Thu, 14 Jul 2022 14:56:34 +0200 Subject: [PATCH 011/211] systemd: start service at boot added --- wiki/linux/systemd.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 wiki/linux/systemd.md diff --git a/wiki/linux/systemd.md b/wiki/linux/systemd.md new file mode 100644 index 0000000..0d2ee5c --- /dev/null +++ b/wiki/linux/systemd.md @@ -0,0 +1,30 @@ +# SystemD + +SystemD is a software suit for system components for Linux systems. +It is mainly used for service configuration. + +## Run command on boot + +To run a command (in this case `/bin/bash /root/run.sh`) create the following +file at `/etc/systemd/system/` with a name ending on `.service`. +In this case it is called `unturned.service`. + +```txt +[Unit] +Description=Description of the service + +[Install] +WantedBy=multi-user.target + +[Service] +ExecStart=/bin/bash /root/run.sh +Type=simple +``` + +For [Proxmox](./proxmox.md) you can add the following line under the `[Unit]` +section to make sure the service is started after Proxmox has finished +initializing. + +```txt +After=pve-guests.service +``` From 01aee89e941e7f297fa8804da049e74b93ec34f4 Mon Sep 17 00:00:00 2001 From: tiyn Date: Thu, 14 Jul 2022 15:10:19 +0200 Subject: [PATCH 012/211] dm-crypt: added manual usb key decryption --- wiki/linux/dm-crypt.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wiki/linux/dm-crypt.md b/wiki/linux/dm-crypt.md index 35452f8..bc9858d 100644 --- a/wiki/linux/dm-crypt.md +++ b/wiki/linux/dm-crypt.md @@ -93,3 +93,14 @@ Finally run: Reboot the system with `reboot`. Make sure the USB key for decryption is plugged in. If so the encrypted partition should be decrypted automatically. + +## Unlock an encrypted device with the USB key created in the previous section + +With the following command an encrypted device can be decrypted with the usb +stick created in the previous section. +Make sure to edit `--key-file`, `--keyfile-offset` and `--keyfile-size` to +match the settings used in the creation of the USB key. + +```sh +cryptsetup luksOpen /dev/sda2 crypt-volume --key-file=/dev/usbkey --keyfile-offset=14848 --keyfile-size=2048 +``` From 78d1d415ec8e5396834dfce0f5a123be6bea7d59 Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Thu, 4 Aug 2022 20:03:22 +0200 Subject: [PATCH 013/211] package-manager: new error added is marginal trust --- wiki/linux/arch-linux/package-manager.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wiki/linux/arch-linux/package-manager.md b/wiki/linux/arch-linux/package-manager.md index ddfbab1..031a9ad 100644 --- a/wiki/linux/arch-linux/package-manager.md +++ b/wiki/linux/arch-linux/package-manager.md @@ -33,3 +33,18 @@ gpg --lsign Where is the placeholder of the identification string of the key. It usually gets gets printed in the line above the error looking like `FAILED (unknown public key )`. + +### Error while updating `is marginal trust` + +Both `yay` and `pacman` use gpg keys to confirm the package manager gets the +right package. +It is possible that it runs into errors when importing new keys. +If the error `[...] Key [...] is marginal trust` occurs while updating the +system, it can be fixed by running the following commands and then restarting +the update process of the package manager. + +```sh +pacman -Sy archlinux-keyring +pacman-key --populate archlinux +pacman-key --refresh-keys +``` From 030d53200b6b09da444484ee367d88fdb1d0ecb6 Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Fri, 5 Aug 2022 03:19:32 +0200 Subject: [PATCH 014/211] Update dm-crypt.md --- wiki/linux/dm-crypt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/linux/dm-crypt.md b/wiki/linux/dm-crypt.md index bc9858d..fa9e665 100644 --- a/wiki/linux/dm-crypt.md +++ b/wiki/linux/dm-crypt.md @@ -30,7 +30,7 @@ or the partition is to small for your purposes, make sure to resize the partition first accordingly (see [disk management](./disk-management.md)). `cryptsetup resize crypt-volume` -## Creating an automatic encryption key with an USB stick +## Creating an automatic decryption key with an USB stick This guide assumes you to have an Arch Linux System, as installed in [this wikis arch linux installation](./arch-linux/installation.md). From 3aef8ced1d3f698835d1507ea4999eed04cf019b Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Sun, 7 Aug 2022 20:42:48 +0200 Subject: [PATCH 015/211] Update video.md --- wiki/video.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wiki/video.md b/wiki/video.md index 666b66f..0d5497c 100644 --- a/wiki/video.md +++ b/wiki/video.md @@ -31,5 +31,8 @@ This way you don't have to search for your discs all the time. ``` - [MKS Extractor GUI](https://www.videohelp.vom/software/MKS-Extractor-GUI) - for windows can extract subtitles from a `.mkv` file -- [VidCoder](https://vidcoder.net) for windows can compress `.mkv` files. + for windows can extract subtitles from a `.mkv` file. +- [Subtitleedit]([https://www.videohelp.vom/software/MKS-Extractor-GUI](https://www.nikse.dk/subtitleedit)) + for linux can extract subtitles from a `.mkv` file and do ocr. +- [VidCoder](https://vidcoder.net) for windows can compress `.mkv` files. Its an adapted version of the HandBrake software. +- [HandBrake]([https://vidcoder.net](https://handbrake.fr/)) for linux can compress `.mkv` files. From e1e72879a9c3d5a13a86e35133a5fc81388d63cd Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Wed, 10 Aug 2022 02:49:59 +0200 Subject: [PATCH 016/211] Update music.md --- wiki/music.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/music.md b/wiki/music.md index 2060aa9..1ac83a7 100644 --- a/wiki/music.md +++ b/wiki/music.md @@ -9,10 +9,10 @@ access a server for it. ## Server/Client If you want to keep your system clean of much data, you can use this kind of setup. -There are differences depending on your preffered client interface. +There are differences depending on your preffered software interface. - [Airsonic](./airsonic.md) is a free fork of Subsonic, can be dockerized and has - a web-interface. + a web-interface and multiple possible client options. ## Scan CDs From 3688c29f8f4547da6edbfc395627c961e44b183b Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Wed, 10 Aug 2022 03:26:11 +0200 Subject: [PATCH 017/211] Update airsonic.md --- wiki/airsonic.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wiki/airsonic.md b/wiki/airsonic.md index b67fe3c..7a4473b 100644 --- a/wiki/airsonic.md +++ b/wiki/airsonic.md @@ -14,4 +14,7 @@ As already mentioned it is possible to use a bunch of different clients because the server is compatible with most of the Subsonic clients. - [Ultrasonic](https://www.f-droid.org/en/packages/org.moire.ultrasonic) is a - free and open-source android subsonic/airsonic client. + free and open-source android subsonic-compatible client. +- [Sonixd](https://github.com/jeffvli/sonixd) is a + free and open-source cross-plattform subsonic- and jellyfin-compatible client. + It uses a look and feel similar to the spotify client. From 7fd8afa61b63168c81b47044e6e6069460fcf5b3 Mon Sep 17 00:00:00 2001 From: tiyn Date: Fri, 12 Aug 2022 23:48:42 +0200 Subject: [PATCH 018/211] flac: added splitting by cue --- wiki/linux/flac.md | 18 ++++++++++++++++++ wiki/music.md | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 wiki/linux/flac.md diff --git a/wiki/linux/flac.md b/wiki/linux/flac.md new file mode 100644 index 0000000..1922e4b --- /dev/null +++ b/wiki/linux/flac.md @@ -0,0 +1,18 @@ +# Flac + +`flac` - short for Free Lossless Audio Codec - is a audio codec without +compression losses. +On most distributions it is bundled together with the tagging software +`metaflac` and other auxiliary tools in the `flac` package. + +## Splitting Flac file according to cue file + +An easy way to split flac files according to a cue file is using +`cuebreakpoints` and `shnsplit`. +On most distributions they are in a package with the same name. +The following line of shell command splits a flac file according to a cue file. +The `-o` tag specifies the output file format. + +```sh +cuebreakpoints '' | shnsplit -o flac '