change formatting

input examples are now given as

```bash
input $ARG1
```

While outputs use md's '> ' sign as a quote.
This commit is contained in:
2023-06-17 21:28:20 +02:00
parent 1ba3010b81
commit ba8026e0c3
102 changed files with 2388 additions and 3211 deletions

View File

@@ -7,7 +7,9 @@ tags: [ "Documentation", "Distros", "Arch" ]
Edit `/etc/systemd/system/getty@tty1.service.d/override.conf` by typing:
> sudo systemctl edit getty@tty1
```bash
sudo systemctl edit getty@tty1
```
The put in the following, changing `[ USER ]` to your username.

View File

@@ -4,94 +4,150 @@ tags: [ "Documentation", "arch" ]
---
Keyboard layout changed.
> ls /usr/share/kbd/keymaps/**/*.map.gz
```bash
ls /usr/share/kbd/keymaps/**/*.map.gz
```
> loadkeys uk.map.gz
```bash
loadkeys uk.map.gz
```
Check if boot mode is UEFI
> ls /sys/firmware/efi/efivars
```bash
ls /sys/firmware/efi/efivars
```
Without efivars, the system must boot with BIOS.
# Check network's up
> ping archlinux.org
```bash
ping archlinux.org
```
Set system clock properly
> timedatectl set-ntp true
```bash
timedatectl set-ntp true
```
Check disks
> lsblk
```bash
lsblk
```
Make partition
> parted -s /dev/sda mklabel gpt
```bash
parted -s /dev/sda mklabel gpt
```
> parted -s /dev/sda mklabel msdos
```bash
parted -s /dev/sda mklabel msdos
```
> parted -s /dev/sda mkpart primary ext4 512 100%
```bash
parted -s /dev/sda mkpart primary ext4 512 100%
```
> parted -s /dev/sda set 1 boot on
```bash
parted -s /dev/sda set 1 boot on
```
> mkfs.ext4 /dev/sda1
```bash
mkfs.ext4 /dev/sda1
```
Use pacstrap to get the base install.
> mount /dev/sda1 /mnt/
```bash
mount /dev/sda1 /mnt/
```
> pacstrap /mnt base base-devel vim linux linux-firmware
```bash
pacstrap /mnt base base-devel vim linux linux-firmware
```
Make fstab notes for new system.
> genfstab -U /mnt >> /mnt/etc/fstab
```bash
genfstab -U /mnt >> /mnt/etc/fstab
```
> arch-chroot /mnt
```bash
arch-chroot /mnt
```
> echo 'en_GB.UTF-8' > /etc/default/locale
```bash
echo 'en_GB.UTF-8' > /etc/default/locale
```
> pacman -Sy networkmanager grub
```bash
pacman -Sy networkmanager grub
```
For legacy:
> grub-install --target=i386-pc /dev/sda
```bash
grub-install --target=i386-pc /dev/sda
```
For EFI:
> sudo pacman -S efibootmgr
```bash
sudo pacman -S efibootmgr
```
> mkdir /boot/efi
```bash
mkdir /boot/efi
```
> grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --remmovable
```bash
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --remmovable
```
> grub-mkconfig -o /boot/grub/grub.cfg
```bash
grub-mkconfig -o /boot/grub/grub.cfg
```
set local time
> ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime
```bash
ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime
```
Find the desired locale's and uncomment them.
> vi /etc/locale.gen
```bash
vi /etc/locale.gen
```
> locale-gen
```bash
locale-gen
```
Make your keyboard changes permenent with:
> vi /etc/vconsole.conf
```bash
vi /etc/vconsole.conf
```
Then set: `KEYMAP=uk.map.gz`
unsure about this bit - is this name just for the loadkeys function?
Make a hostname
> echo pc > /etc/hostname
```bash
echo pc > /etc/hostname
```
Set hostnames for network, or at least your own.
> vi /etc/hosts
```bash
vi /etc/hosts
```
# This should have the following, at least:
@@ -103,17 +159,27 @@ If the system has a permanent IP address, it should be used instead of localhost
Ping some sites to make sure the network's working
> passwd
```bash
passwd
```
> exit
```bash
exit
```
> umount -R /mnt
```bash
umount -R /mnt
```
Remove that awful beep sound:
> rmmod pcspkr
```bash
rmmod pcspkr
```
...and make the change permanent:
> sudo echo "blacklist pcspkr" >> /etc/modprobe.d/nobeep.conf
```bash
sudo echo "blacklist pcspkr" >> /etc/modprobe.d/nobeep.conf
```

View File

@@ -1,98 +0,0 @@
---
title: "encrypted"
tags: [ "Documentation", "distros" ]
---
> # taken from https://0x00sec.org/t/arch-linux-with-lvm-on-luks-dm-crypt-disk-encryption-installation-guide-legacy-bios-system/1479
> # if you need wifi
> wifi-menu
> timedatectl set-ntp true
> fdisk -l
> parted /dev/sda
> (parted) mklabel msdos
> (parted) mkpart primary ext2 1MB 512MB
> (parted) mkpart primary ext4 512MB 100%
> (parted) print
> (parted) set 1 boot on
> (parted) quit
> fdisk -l
> cryptsetup luksFormat /dev/sda2
> # make a name. Here I use "crypt".
cryptsetup open /dev/sda2 crypt
> pvcreate /dev/mapper/crypt
> # now a group name - "usb"
> vgcreate usb /dev/mapper/crypt
> lvcreate -L 8GB usb -n swap
> lvcreaate -L 30G usb -n root
> lvcreate -l 100%FREE usb -n home
> mkfs.ext4 /dev/mapper/usb-home
mkfs.ext4 /dev/mapper/usb-root
> mkswap /dev/mapper/usb-swap
> mkfs.ext2 /dev/sda1
> mount /dev/mapper/usb-root /mnt
mkdir /mnt/home
> mount /dev/mapper/usb-home /mnt/home
mkdir /mnt/boot
> mount /dev/sda1 /mnt/boot
swapon /dev/mapper/usb-swap
pacstrap -i /mnt base base-devel efibootmgr grub
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
############ new root #############
ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime
# uncomment en_GT.UTF-8
> vi /etc/locale.gen
> locale-gen
> # add `LANG=en_GB.UTF-8` to /etc/locale.conf
> vi /etc/locale.conf
> echo crypt > /etc/hostname
> # make sure keyboard encrypt lvm2 are on the list of HOOKS
> vi /etc/mkinitcpio.conf
> grub-install /dev/sda
> vi /etc/default/grub
edit the GRUB_CMDLINE_LINUX=""
`GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:usb root=/dev/mapper/usb-root"`
> grub-mkconfig -o /boot/grub/grub.cfg
> mkinitcpio -p linux
> pacman -S wpa_supplicant dialog

View File

@@ -6,14 +6,20 @@ tags: [ "Documentation", "distros" ]
Update font-cache:
> fc-cache
```bash
fc-cache
```
List fonts:
> fc-list
```bash
fc-list
```
Grab the part of the font name you need for Xresources:
> fc-list | cut -d: -f2
```bash
fc-list | cut -d: -f2
```
Add field 3 for styles.

View File

@@ -13,13 +13,17 @@ Include = /etc/pacman.d/mirrorlist
And update:
> sudo pacman -Syu
```bash
sudo pacman -Syu
```
# Step 2: Check Card Manufacturer
Check your graphics card type:
> lspci | grep VGA
```bash
lspci | grep VGA
```
# Step 3: Install Drivers
@@ -27,23 +31,33 @@ Check your graphics card type:
If you see `Nvidia`, then install the intel drivers:
> sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader
```bash
sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader
```
## Step 3B
If you see `Intel`, then install the intel drivers:
> sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader xf86-video-intel
```bash
sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader xf86-video-intel
```
## Step 3C
If you see `AMD`, then check your card support `vulkan`:
> yay -S gpu-viewer
```bash
yay -S gpu-viewer
```
> vulkaninfo | grep 'VkPhysicalDeviceVulkanMemoryModelFeatures' -A 3
```bash
vulkaninfo | grep 'VkPhysicalDeviceVulkanMemoryModelFeatures' -A 3
```
You should see 'true' here.
> sudo pacman -S --needed lib32-mesa vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader xf86-video-amdgpu
```bash
sudo pacman -S --needed lib32-mesa vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader xf86-video-amdgpu
```

View File

@@ -7,11 +7,15 @@ Packages are kept in /var/cache/pacman/pkg.
Delete unused old packages with:
> sudo pacman -Sc
```bash
sudo pacman -Sc
```
Signatures are handled by the pacman-key, initially set up with:
> sudo pacman-key --populate archlinux
```bash
sudo pacman-key --populate archlinux
```
And refreshed with:
@@ -19,23 +23,33 @@ sudo pacman-key --refresh-keys
If you have usigned keys, you can refresh with:
> sudo pacman -Sc
```bash
sudo pacman -Sc
```
or
> sudo pacman -Scc
```bash
sudo pacman -Scc
```
Reset all keys with:
> sudo rm -r /etc/pacmand.d/gnupg/ && sudo pacman-key --init
```bash
sudo rm -r /etc/pacmand.d/gnupg/ && sudo pacman-key --init
```
If you're constantly getting 'everything corrupted, nothing upgraded', try running:
> sudo pacman -S archlinux-keyring
```bash
sudo pacman -S archlinux-keyring
```
List all orphaned packages:
> sudo pacman -Qtdq
```bash
sudo pacman -Qtdq
```
## Cleaning Config Files