Skip to content

Latest commit

 

History

History
211 lines (211 loc) · 5.23 KB

arch-install.org

File metadata and controls

211 lines (211 loc) · 5.23 KB

Main article

Installation guide

Get distribution

Download

Verify boot was with UEFI

ls /sys/firmware/efi/efivars

If the directory doesn’t exist, change boot mode in BIOS

Verify connection with ping

ping 8.8.8.8

Update the system clock

timedatectl set-ntp true

Partition the disks for GPT

gdisk -l /dev/sda
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB   EF00  EFI System
   2         1050624         7342079   3.0 GiB     8300  Linux filesystem
   3         7342080       234441614   108.3 GiB   8300  Linux filesystem

Format the partitions

EFI with FAT32

mkfs.fat -F32 /dev/sda1

Others with ext4

mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda3

Mount the file systems

Root

mount /dev/sda3 /mnt

Others

mkdir -p /mnt/boot /mnt/home
mount /dev/sda1 /mnt/boot
mount /dev/sda2 /mnt/boot

Swap file

fallocate -l 2G /mnt/swapfile
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile

Select the mirrors

Edit /etc/pacman.d/mirrorlist

Install the base packages

pacstrap /mnt base

Fstab

genfstab -U /mnt >> /mnt/etc/fstab

/etc/fstab

Chroot

arch-chroot /mnt

Time zone

ln -sf /usr/share/zoneinfo/Asia/Jerusalem /etc/localtime
hwclock --systohc

Locale

/etc/locale.gen

locale-gen

/etc/locale.conf

Hostname

/etc/hostname

/etc/hosts

Network

/etc/systemd/network/25-wired.network

ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl enable --now systemd-networkd
systemctl enable --now systemd-resolved

Root password

passwd

Grub + EFI boot manager + Intel microcode updates

pacman -S grub efibootmgr intel-ucode
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg

NTFS

pacman -S ntfs-3g
mkdir /mnt/Big /mnt/Large /mnt/New
groupadd users
chown :users /mnt/Big
chown :users /mnt/Large
chown :users /mnt/New

Create a user

useradd -m -G wheel -s /bin/bash vasya
passwd vasya
gpasswd users -a vasya

Reboot

exit
umount -R /mnt
reboot

Install additional packages

Edit /etc/pacman.conf, uncomment multilib

Install

pacman -S xorg-server xorg-xinit nvidia plasma-meta kde-applications-meta \
kde-l10n-ru bash-completion jdk9-openjdk samba ttf-dejavu ttf-symbola noto-fonts \
util-linux deluge python2-gobject2 pygtk git openssh sudo

SSD

systemctl enable --now fstrim.timer

Samba

/etc/samba/smb.conf

mkdir -p /var/lib/samba/usershare
groupadd -r sambashare
chown root:sambashare /var/lib/samba/usershare
chmod 1770 /var/lib/samba/usershare
gpasswd sambashare -a vasya
systemctl enable --now smbd

Automatic login to virtual console

systemctl edit getty@tty1

/etc/systemd/system/[email protected]/override.conf

Edit /etc/systemd/logind.conf, set NAutoVTs=2

xinit

~/.xserverrc

~/.xinitrc

cp /etc/X11/xinit/xinitrc ~/.xinitrc

~/.Xdefaults

Autostart X at login

Append to the end of ~/.bash_profile

if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
  exec startx
fi

AUR

pacman -S --needed base-devel

Set Chromium as default browser

Settings -> Applications -> File Associations –> text/html & xhtml+xml

SSH

Config

mkdir -p ~/.ssh/sockets
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
chmod 700 ~/.ssh/sockets

~/.ssh/config

Agent

~/.config/systemd/user/ssh-agent.service

Put into ~/.pam_environment

SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket"

And then

systemctl --user enable --now ssh-agent

Example of creating a key

Save the key as ~/.ssh/github.com_id_rsa

ssh-keygen -t rsa -b 4096 -C "[email protected]"
ssh -T [email protected]

Git

git config --global user.email "[email protected]"
git config --global user.name "your name"