Compare commits

..

No commits in common. "7d9cf9d7e6bd8092fcd736f4eb86d0268a6e27ab" and "d6d9d15c4febf0cf41e9b0cb6f50ef2af3a0db83" have entirely different histories.

2 changed files with 2 additions and 341 deletions

View File

@ -1,256 +0,0 @@
# Installation of Arch Linux
After creating an ISO and starting the system.
See `archlinux-2024.06.01-x86_64.iso` via https://archlinux.org/download/
### Create a Live USB or DVD or ISO directly in a Virtual Machine
#### USB stick on a Linux machine
# dd bs=4M if=/[path_to_archlinux.iso] of=/dev/[path_to_usb_device] statuts=progress && sync
Replace [path_to_archlinux.iso] with the actual path to your Arch Linux ISO file and [path_to_usb_device] with the correct path to your USB device.
Be careful specifieng the path to the USB device.
Check the path with
# lsblk
A USB stick is usually mounted under /run/media/ e.g.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 111.8G 0 disk
├─sda1 8:1 1 102G 0 part /
└─sda2 8:2 1 9.8G 0 part [SWAP]
sdb 8:16 1 3.6T 0 disk /data
/srv
/raid1
sdc 8:32 1 3.6T 0 disk
sdd 8:48 1 7.6G 0 disk
└─sdd1 8:49 1 7.6G 0 part /run/media/tom/TUEVAUSTRIA
sr0 11:0 1 1024M 0 rom
In this example the USB device partition is `sdd1` and the device itself is `sdd` which should be used as [path_to_usb_device].
### Start the install ISO
Select **Arch Linux install medium (x86_64)** and press **Enter** to start the setup process
### Set the Keyboard Layout
The default keymap is set to US. To list other available layouts run
# ls /usr/share/kbd/keymaps/**/*.map.gz
To change to the German keyboard layout enter
# loadkeys de-latin1
It is a little difficult to find the correct keys on a US keyboard. The **`y`** is swapped with the **`z`**, and the **`-`** is on the **`ß`** key.
### Check the Internet Connection
# ping -c 3 google.com
### Enable Network Time Protocol (NTP)
# timedatectl set-ntp true
To check the NTP service, use:
# timedatectl status
### Partition the Disk
#### BTRF file system without a partition
Just to get an overview of the drives
# lsblk
Create the filesystem with
# mkfs.btrfs /dev/sdX --label arch
Replace X with the drive letter or if it is an nvme drive use /dev/nvmeXX with the correct drive label. `--label` or `-L` defines the Label of the drive, e.g. *arch*.
### Check the Mirror List for an Suitable Mirror
To speed up the download, set up the mirror list so that the fastest mirrors are at the top.
First, sync the Arch repository with `pacman`
# pacman -Syy
Install **reflector** to be able to update the mirrors and sort them by download speed. Add reflector by running:
# pacman -S reflector
Backup the mirror list with:
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
The reflector updates the mirror list, run:
# reflector -c "XX" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
Replace **"XX"** with the your location country code (e.g. enter "US" if you are
located in the United States, or "AT,DE" if you are located close to Austria and Germany)
## Install Arch Linux
### Mount the **root** partition
Btrfs filesystem has the following options, which are useful to change:
* **noatime**, useful to use by default because atime updates increases metadata writes. relatime is default,
* **commit=300**, default is 30, the interval of periodic transaction commit,
* **compress=zstd:2**, default is no, use zstd compression from [1,15] ratio. Default zstd ratio is 3.
#### Mount the Drive with Label *arch* to /mnt
# mount -o compress=zstd:2,noatime,commit=300 LABEL=arch /mnt
### PACSTRAP installation script for necessary packages to the bootable device
# pacstrap /mnt base linux linux-firmware nano mc btrfs-progs dhcpcd
## Configure Arch Linux
### Generate fstab File
The **fstab** file defines the order in which disks, partitions, block devices, and other data sources are mounted.
Create the **fstab** file by running:
# genfstab -U /mnt >> /mnt/etc/fstab
### Use Arch-Chroot and Enter the Mounted Disk as Root
Change the **root** to the newly installed Arch Linux system with the 'arch-chroot' command:
# arch-chroot /mnt
[root@archiso /]#
### Set the Time Zone
Setting the correct time zone ensures the system clock reflects the accurate local time.
#### List all available time zones
# find /usr/share/zoneinfo -type f | more
Find your timezone and make a note of the name, make an `ln`command to create a symbolic link from the timezone to */etc/localtime*. For *Europe/Vienna* run
# ln -sf /usr/share/zoneinfo/Europe/Vienna /etc/localtime
#### Set the Locale
Open the file *locale.gen* with `nano`, and uncomment the name by removing the leading # of your preferred locale and any other you would like to use.
I uncomment the line with
# nano /etc/locale.gen
I personally like to have an English environment with European setting, so I remove the **#** for *en_DK.UTF-8 UTF-8*.
...
#en_CA ISO-8859-1
en_DK.UTF-8 UTF-8
#en_DK ISO-8859-1
#en_GB.UTF-8 UTF-8
...
Enter **Ctr + X** to exit and type **Y** to save the changes.
Generate a locale configuration file with the following command:
# locale-gen
Create the *locale.conf*, run:
# echo LANG=en_DK.UTF-8 > /etc/locale.conf
# export LANG=en_DK.UTF-8
Set the **console keyboard layout**, make the changes persistent in *vconsole.conf(5):
# echo KEYMAP=de-latin1 > /etc/vconsole.conf
### Set Hostname *debian* (or any other name)
# echo debian > /etc/hostname
### Enable the DHCP, the Dynamic Host Configuration Protocol
Run
# systemctl enable dhcpcd
### Set the root password with the command **passwd**
# passwd
## Installation of the Grub Bootloader
#### Installation on a Non-UEFI System
# pacman -S grub os-prober
# grub-install /dev/sdX
Replace X with the letter of the drive you want to install GRUB on. For example `grub-install /dev/sda`.
Create a GRUB configuration file with:
# grub-mkconfig -o /boot/grub/grub.cfg
#### Installation on a UEFI System
# pacman -S grub efibootmgr
# mkdir /boot/efi
# mount /dev/sdX1 /boot/efi
Replace X with the drive letter of the disk the partition belongs to.
Install Grub with:
# grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
Finally create GRUB configuration file:
# grub-mkconfig -o /boot/grub/grub.cfg
## Create a New User and Set Privileges
#### Install `sudo` before adding a new user
# pacman -S sudo
#### Create a New User with:
# useradd -m [username]
Replace [username] with the real username for the system.
#### Create the Password
# passwd [username]
#### Add the User to several groups, granting specific permissions:
# usermod -aG wheel,audio,video,storage [username]
#### sudoers -- Edit the *visudo* File, uncomment the **wheel** group:
# EDITOR=nano visudo
#
...
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL
...
## Exit the Environment of ARCH-Chroot and Reboot
# exit
### Unmount the **root** with:
# umount -l /mnt
Remove the USB or CD/DVD and reboot the system with:
# reboot

View File

@ -6,12 +6,9 @@
## Prerequisites
1. A running Linux system, e.g. Debian, Arch, etc.
0. User has administrative access via sudo
0. Python Version >3
0. Selenium for Python
0. Chromium Web browser (headless)
0. Selenium for Python via Webdriver Manager
0. Optional: User has an ssh key pair
0. Optional: git, ? wget, ? curl
## Installation of Python, Selenium, Chromium
@ -41,20 +38,7 @@ Upgrade your Debian installation if the version is lower than the above value.
$ sudo apt update
$ sudo apt upgrade
If this does not work, then the user \<username\> must be added to the sudo group with :
$ su -
Password:
root@debian:~# usermod -aG sudo <username>
For the group membership to take effect, the user must log out and log in again or the system must be restarted.
#### Python3
Check if Python is already installed in Debian:
$ python3 --version
Python 3.11.2
If it is not already installed, then:
$ sudo apt install python3
@ -62,74 +46,7 @@ If it is not already installed, then:
$ sudo apt install chromium
#### Manager (selenium)
Afterwards, selenium is installed:
$ sudo apt install python3-selenium
#### SSH key generation
The program `openssh` is preinstalled on Debian systems. But there is no private/public key installed yet. Best practices generating the key pair:
$ ssh-keygen -t ed25519 -C "your_email@example.com"
Personally, I don't use a different name for the keys, I just click through the process.
The same applies to the passphrase.
Now go to the website https://git.kuschel.at and copy the content of the public key from ~/.ssh/id__ed25519.pub to the "Manage SSH keys" -- via "Add Key".
$ cat .ssh/id_ed25519.pub
#### Git installation and clone the scripts from git.kuschel.at
$ sudo apt install git
You have to globally configure your `git` with:
$ git config --global user.name "John Doe"
$ git config --global user.email your_email@example.com
Checking the git configuration with:
$ git config -l
user.name=<your name>
user.email=<your e-mail>
etc.
Now create a folder and cd into it
$ mkdir gitea
$ cd gitea
Clone the repository `script` to your site with:
~/gitea$ git clone ssh://git@kuschel.at:21861/public/scripts.git
Ensure you can run `pip` from command line
$ python3 -m pip --version
If pip isnt already installed ("No module named pip"), then first try to bootstrap it from the standard library
$ python3 -m ensurepip --default-pip
If this does not work, install the package
$ sudo apt install python3-pip
Also `sudo apt install pip` should work.
$ pip install webdriver-manager
### Arch Linux (@todo)
### Arch Linux
#### Check Version