User:PeterSR
Real name: Peter Severin Rasmussen
GitHub: PeterSR
BitBucket: PeterSR
Arch level: Just started.
Contents
Personal setup
Here my personal setup will be explained.
Storage
Using a GPT partition table, the partitions are as follows: [1]
Every storage device reference below will be corresponding to this layout.
Installation
Set the keyboard to the Danish Dvorak keyboard layout:
# loadkeys no-dvorak
Don't bother setting up locale on the live system.
Also use a wired connection with DHCP, and the internet will most likely just work. Wireless connection can always be configured when the system is installed.
Activate swap partition
# mkswap /dev/sda3 # swapon /dev/sda3
Mount partitions
# mount /dev/sda1 /mnt # mkdir -p /mnt/boot # mount /dev/sda2 /mnt/boot # mkdir -p /mnt/boot/efi # mount /dev/sda5 /mnt/boot/efi # mkdir -p /mnt/home # mount /dev/sda4 /mnt/home
Edit /etc/pacman.conf
# vi /etc/pacman.conf
Find the line with #Color
and uncomment it
Edit the mirrorlist
# vi /etc/pacman.d/mirrorlist
Find first occurrence of Denmark and move it to the top.
Install the base system
# pacstrap -i /mnt base base-devel
Generate fstab file
# genfstab -U -p /mnt >> /mnt/etc/fstab # vi /mnt/etc/fstab
Configuration
Chroot into the system
# arch-chroot /mnt /bin/bash
Configure wired connection using DHCP:
# ip link # systemctl enable dhcpcd@interface_name.service
Here, read the output of ip link
and find the ethernet interface name, properly enp3s0
or something similar.
And then install preliminary packages
# pacman -S polkit
Locale
Edit /etc/locale.gen
# vi /etc/locale.gen
and uncomment da_DK.UTF-8 UTF-8
as well as en_US.UTF-8 UTF-8
.
DK
using vi's search /
. Remove the #
. Search for US
. Remove the #
.
Run
# locale-gen
and edit the file /etc/locale.conf
(which does not exist)
# vi /etc/locale.conf
and write
LANG=da_DK.UTF-8 LC_MESSAGES=en_US.UTF-8
This will use the Danish locale in terms of dates, currency etc., but keep the system language in English.
Setup Danish Dvorak permanently for VC (virtual console):
# localectl --no-convert set-keymap no-dvorak
/etc/vconsole.conf
:
# vi /etc/vconsole.conf
and write KEYMAP=no-dvorak
. If another font is desired, use FONT=
here as well.
Set timezone and hardware clock:
# pacman -S ntp # timedatectl set-timezone Europe/Copenhagen # ntpd -qg # hwclock --systohc # systemctl enable ntpd.service
Computer
Add hostname pc
to /etc/hostname
:
# echo pc > /etc/hostname
and edit /etc/hosts
accordingly:
# vi /etc/hosts #<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 localhost.localdomain localhost pc ::1 localhost.localdomain localhost pc
Remove PC case speaker beep:
# echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf
User
Install zsh
and change the default shell of the root:
# pacman -S zsh # chsh Changing shell for root. New shell [/bin/bash]: /bin/zsh
Create new user called user
:
# useradd -m -g users -G wheel,storage,power -s /bin/zsh user # passwd user
Allow the wheel
group to perform sudo by editing /etc/sudoers
:
# visudo
Go to the line # %wheel ALL=(ALL) ALL
and uncomment it.
Lock the root
user:
# passwd -l root
sudo passwd -u root
.Boot loader
The currently used boot loader is GRUB with UEFI. First install the packages:
# pacman -S grub efibootmgr
Install GRUB to the ESP partition:
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck
Create the configuration file
# grub-mkconfig -o /boot/grub/grub.cfg
Further reading: GRUB#Installation_2, Unified_Extensible_Firmware_Interface#EFI_System_Partition
The moment of truth
Exit the chroot
# exit
and reboot
# reboot
Now, in BIOS edit the default boot device to grub_uefi
and cross your fingers.
Post-installation
Here we set up the system as we actually want it to be. First login as the newly created user:
pc login: user Password:
If you are presented with a Z Shell screen, simply press q
. You should now see a command prompt.
First and foremost, update the system
# sudo pacman -Syu
Next, install preliminary packages
# sudo pacman -S vim git openssh upower
Now fetch the dotfiles using HTTPS (we will change this to SSH later):
# git clone https://PeterSR@bitbucket.org/PeterSR/dotfiles.git # cd dotfiles # git submodule init # git submodule update --recursive # ./install.sh symlink
Audio
Install ALSA
# sudo pacman -S alsa-utils
Go inside the alsamixer
and max the different volumes.
# alsamixer
GUI
Install Xorg
packages
# sudo pacman -S xorg-xinit xorg-server xorg-server-utils numlockx
Setup keyboard
# sudo localectl --no-convert set-x11-keymap da "" dvorak
Further reading: Xorg
Install Nvidia
packages
# sudo pacman -S nvidia
Further reading: NVIDIA
OR (in case of Intel graphics)
Install Intel
packages
# sudo pacman -S xf86-video-intel mesa-libgl
Install i3
packages
# sudo pacman -S i3
Further reading: i3
Copy the .xinitrc
and edit it
# cp /etc/skel/.xinitrc ~ # vim .xinitrc
Add the lines
#setxkbmap dk dvorak numlockx & exec i3
to the end of the file. Use startx
to access i3
.
.xinitrc
might be included in the dotfiles in the future.
Install GDM
:
# sudo pacman -S gdm # sudo systemctl enable gdm.service
OR
Install LightDM
:
# sudo pacman -S lightdm lightdm-gtk3-greeter # sudo systemctl enable lightdm.service
Fonts
# sudo pacman -S ttf-dejavu ttf-ubuntu-font-family
Fix fonts in Firefox
# sudo ln -s /etc/fonts/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/
Source: [3]
Applications
# sudo pacman -S firefox terminator nautilus nautilus-open-terminal librsvg gvim feh scrot imagemagick dmenu evince hexchat
gvim
package will conflict with vim
. But this is okay as the gvim
package will also install vim
.Programming
# sudo pacman -S python3 jdk8-openjdk nodejs