Skip to content

Latest commit

 

History

History
181 lines (141 loc) · 3.35 KB

INSTALL.org

File metadata and controls

181 lines (141 loc) · 3.35 KB

Archlinux installation

Boot mode

We have to make sure we are in UEFI mode

ls /sys/firmware/efi/efivars

should not return any errors.

Wifi configuration

iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect network-name
station wlan0 show
exit

System clock

Making sure the system clock is accurate:

timedatectl status

Disk partition

List all disks

fdisk -l

Start partitionig the disk

fdisk /dev/sda

We end up in an interactive mode where we can create partitions. Most important commands are:

  • m brings help menu
  • d delete a partition
  • n add a new partition
  • p print the partition table

We first delete all partitions with d (as many times as necessary depending on the tisk)

Then we create the following partitions:

  • a primary partition for boot of 200M
  • a primary partition for swap of 12G
  • a primary partition for the rest (default value takes all remaining space)

When we are happy we can saves the change with w. ⚠️ It will format the disk.

We need to set filesytem for our partitions

For the boot and the main partition

mkfs.fat -F 32 /dev/sda1
mkfs.ext4 /dev/sda3

For the swap partition

mkswap /dev/sda2
swapon /dev/sda2

Final installation

Finally we are going to mount the main partition in order to be able to install archlinux on it.

mount /dev/sda3 /mnt

mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

lsblk can be used to check if everything is properly mounted.

pacman -Sy archlinux-keyring
pacstrap /mnt base base-devel linux linux-firmware vim dhcpcd netctl dialog wpa_supplicant git

fstab and boot

We generate a fstab so the system can automatically mount things appropriately

# first run to check the output
# -U is to use uuid
genfstab -U /mnt 

# actually write the fstab
genfstab -U /mnt >> /mnt/etc/fstab

Let’s switch from the USB drive to the new arch install

arch-chroot /mnt
pacman -S refind
refind-install
vim /boot/refind_linux.conf
#keep only the good line

Final configuration

Root password

root password:

passwd

locale and lang settings

locale settings

vim /etc/locale.gen
#uncomment en_US lines

locale-gen
# new file
vim /etc/locale.conf
# insert LANG=en-US.UTF-8
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime

hostname

#new file
vim /etc/hostname
#insert hostname (thinkpad for instance)

Reboot and post-install setup

exit
reboot now

Set up user

useradd -m -g wheel flocks
passwd flocks

Get user sudo access

vim /etc/sudoers
#uncomment %wheel ALL=(ALL) ALL

ssh and gpg

  • copy .ssh backup folder
chown -R flocks:wheel ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
ssh-add ~/.ssh/id_rsa #ssh-agent should already be on
gpg --import path-to-file.asc