Encrypted installation
Boot to USB
loadkeys i386/qwertz/cz-us-qwertz.map.gz
eth:
- share ethernet (wifi needs driver installation)
-
systemctl start dhcpcd@enp0s25.service
Internet sharing
Execute the command nm-connection-editor in your terminal.
Add a shared network connection by pressing the Add button.
Choose Ethernet from the list and press Create.
Click IPv4/IPv6 Settings in the left.
Choose Shared to other computers from the drop-down menu.
Enter a new name like Shared WiFi LAN as the Connection name at the top
Don't forget to install dnsmasq
on server PC.
timedatectl set-ntp true
timedatectl set-timezone Europe/Prague
Disk
Old disk wipe
dd if=/dev/urandom of=/dev/sda1 status=progress
dd if=/dev/urandom of=/dev/sda2 bs=4096 status=progress
Partition
https://wiki.archlinux.org/index.php/LVM
cfdisk /dev/sda
Desired state:
sda1 /boot 2 GB unencrypted
sda2 /swap 16 GB unencrypted
sda3 / rest encrypted
Format Swap partition
mkswap /dev/sda2
Encryption
Info
- System encryption
- Block device encryption
- dm-crypt LUKS
- sha512/bcrypt
Simple partition layout with LUKS:
+----------------+-----------------------+---------------------------+
| Boot partition | LUKS encrypted system | Optional free space |
| | partition | for additional partitions |
| /dev/sda1 | /dev/sda3 | or swap to be setup later |
+----------------+-----------------------+---------------------------+
Create
cryptsetup -y -v luksFormat /dev/sda3
cryptsetup open /dev/sda3 cryptroot
mkfs.ext4 /dev/mapper/cryptroot
mount /dev/mapper/cryptroot /mnt
Test
umount /mnt
cryptsetup close cryptroot
cryptsetup open /dev/sda3 cryptroot
mount /dev/mapper/cryptroot /mnt
How to resize LVM2 Logical Volumes
Shrinking has to be done offline (umount), expanding can be done online (even root partition).
Examples:
- Move 50 G from
/home
to/
df -h
umount /home
lvresize -L -50G --resizefs /dev/vgarch/home
mount -a
lvresize -l +100%FREE --resizefs /dev/vgarch/root
- Move 24G from
/home
toSWAP
lvs
free -th
umount /home
lvresize -L -24G --resizefs /dev/vgarch/home
swapoff /dev/vgarch/swap_1
lvresize -l +100%FREE /dev/vgarch/swap_1
mkswap /dev/vgarch/swap_1
# update new returned UUID in /etc/fstab
swapon /dev/vgarch/swap_1
free -th
Prepare /boot partition
mkfs.ext4 /dev/sda1
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
Installation
pacstrap /mnt base
genfstab -U /mnt >> /mnt/etc/fstab
blkid | grep swap >> /mnt/etc/fstab
vim /mnt/etc/fstab
# edit it so swap has dir: none, type: swap, options: defaults, dump: 0, pass: 0
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime
Uncomment in /etc/locale.gen
:
en_US.UTF-8 UTF-8
cs_CZ.UTF-8 UTF-8
Generate locales and update console settings:
locale-gen
echo "LANG=cs_CZ.UTF-8" > /etc/locale.conf
echo "KEYMAP=cz-us-qwertz" > /etc/vconsole.conf
echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
Set hostname:
echo meridix > /etc/hostname
Add the keyboard
and encrypt
hooks to /etc/mkinitcpio.conf
:
HOOKS="... keyboard block keymap encrypt ... filesystems ..."
Install GRUB:
pacman -S vim grub
lsblk -f | grep crypo >> /etc/default/grub
vim /etc/default/grub
# add after GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
# cryptdevice=UUID=<device-UUID>:cryptroot root=/dev/mapper/cryptroot
mkinitcpio -p linux
passwd
pacman -S intel-ucode
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
pacman -S sudo bash-completion
systemctl enable dhcpcd@eth0
useradd -m -g users -G wheel -s /bin/bash [username]
passwd [username]
visudo
# odkomentovat %wheel ALL=(ALL) ALL
Install bluetooth prerequisities:
sudo pacman -S --needed bluez bluez-utils gnome-bluetooth pulseaudio-bluetooth pulseaudio-equalizer sbc
Gnome Shell Extensions
Do NOT install gnome-shell-extensions
package. Install only the extensions below, otherwise Gnome Shell integration in browsers will constantly nag you to update even the extensions you're not using (and cannot update because they are in the system).
- https://extensions.gnome.org/extension/15/alternatetab
- https://extensions.gnome.org/extension/1055/docker-integration
- https://extensions.gnome.org/extension/600/launch-new-instance
- https://extensions.gnome.org/extension/55/media-player-indicator
- https://extensions.gnome.org/extension/921/multi-monitors-add-on
- https://extensions.gnome.org/extension/7/removable-drive-menu
- https://extensions.gnome.org/extension/657/shelltile
- https://extensions.gnome.org/extension/1031/topicons
- https://extensions.gnome.org/extension/302/windowoverlay-icons
Troubleshooting
NM VPN window in Gnome Shell doesn't remember login
- disconnect the VPN connection and don't touch it with regular NM tools
- add
form:main:username-flags=0
under[vpn]
section in conf file for VPN under/etc/NetworkManager/system-connections/
- run
nmcli connection reload
- verify with
nmcli -s -o connection show MyVPN
that the setting is as you edited - activate VPN profile > fill in the login > DON'T check the "Remember" checkbox > disconnect
- activate VPN profile again > DON'T check the "Remember" checkbox > see that login is prefiled
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/328#note_382240
Slow wifi
https://bbs.archlinux.org/viewtopic.php?id=246141
pacman -S broadcom-wl-dkms linux-headers
echo "# https://wiki.archlinux.org/index.php/Broadcom_wireless#broadcom-wl" > /etc/modprobe.d/conflicting-wifi.conf
echo "blacklist b43legacy" >> /etc/modprobe.d/conflicting-wifi.conf
echo "blacklist b43" >> /etc/modprobe.d/conflicting-wifi.conf
echo "blacklist bcma" >> /etc/modprobe.d/conflicting-wifi.conf
snd_hda_intel 0000:01:00.1: CORB reset timeout#2, CORBRP = 65535
Prevents sleep - halts on wakeup
- https://bbs.archlinux.org/viewtopic.php?id=199394
- https://ubuntuforums.org/showthread.php?t=2246301&page=2
tpm tpm0: A TPM error (7) occurred attempting to read a pcr value
echo blacklist tpm_tis > /etc/modprobe.d/tpm_tis.conf
radeon 0000:01:00.0: failed VCE resume (-110)
echo options radeon vce=0 > /etc/modprobe.d/radeon.conf
Audio devides not showing in Gnome Control Center
rm -fr ~/.config/pulse/
Remember SSH key password for commandline Git
sudo pacman -S gnome-keyring seahorse
ssh-add ~/.ssh/id_dsa
# Enter passphrase for /home/mith/.ssh/id_dsa:
ssh-add -L
Connecting works, but I cannot play sound
https://wiki.archlinux.org/index.php/Bluetooth_headset#Connecting_works.2C_but_I_cannot_play_sound
sudo journalctl -b | grep -e "Endpoint registered"
Make sure that you see the following messages in your system log:
bluetoothd[5556]: Endpoint registered: sender=:1.83 path=/MediaEndpoint/A2DPSource
bluetoothd[5556]: Endpoint registered: sender=:1.83 path=/MediaEndpoint/A2DPSink
Run:
mkdir -p ~gdm/.config/systemd/user
ln -s /dev/null ~gdm/.config/systemd/user/pulseaudio.socket
Restart, connect to bluetooth, go to audio settings and cycle through profiles. It should start playing your music.
Note: This happens again for some reason. Above mentioned process does not work anymore.
Hide Docker networks `veth*` in Gnome Networks panel
Install extension from https://extensions.gnome.org/extension/1055/docker-integration. Version in AUR is old.
Unmanaging them in /etc/NetworkManager/NetworkManager.conf
by adding the following does not work.
[keyfile]
unmanaged-devices=interface-name:docker0;interface-name:br-*;interface-name:veth*
Terminal
Popup terminal
Use guake
Use Byobu for split terminal inside Guake
Enable mouse scrolling
https://wiki.archlinux.org/index.php/tmux#Mouse_scrolling
Byobu have to use tmux
instead of screen
as backend. Check it in ~/.byobu/backend
file.
Also file ~/.byobu/tmux.conf
must contain:
set -g mouse on
Now scrolling through the content of a split will work.
Resizing splits is via drag&drop.
For selecting text hold Shift + LMouse
.
To select a split use LMouse
click.
Terms
Split < Window < Session
Keybindings
Creation
Shift + F2
| Create horizontal splitCtrl + F2
| Create vertical splitF2
| Create new windowCtrl + Shift + F2
| Create new session
Destruction
Ctrl + F6
| Remove selected split- <close all splits> | Remove window
F6
| Detach session and logoutShift + F6
| Detach session and stay logged inAlt + F6
| Detach all other clients
Movement
Shift + Left/Right/Up/Down
| Move focus among splitsAlt + Left/Right
| Move focus among windowsAlt + Up/Down
| Move focus among sessionsCtrl + F3/F4
| Move a splitCtrl + Shift + F3/F4
| Move a window
Zoom, arrange, expand, join
Shift + F11
| Zoom in/out of splitShift + F8
| Toggle through split arrangementsCtrl + F11
| Join window to another window on left as a vertical splitAlt + F11
| Expand split to new window
Rename
F8
| Rename current windowCtrl + F8
| Rename current session
Miscs
F9
| Show config menuShift + F1
| Show keybindings