Step by Step Instructions for Installing ArchLinux
- passwd root
start SSH
- Start SSHD
systemctl start sshd
Get IP Address
-
ip addr - get IP Address
-
Check UEFI
ls /sys/firmware/efi/efivars
- Check Internet and Networking
ping archlinux.org -c 5
set clock
-
timedatectl set-ntp true
-
timedatectl status
-
mirror list - https://archlinux.org/mirrorlist/
-
write to /etc/pacman.d/mirrorlist
Server = https://archlinux.uk.mirror.allworldit.com/archlinux/$repo/os/$arch Server = https://mirror.bytemark.co.uk/archlinux/$repo/os/$arch Server = https://repo.c48.uk/arch/$repo/os/$arch Server = https://gb.mirrors.cicku.me/archlinux/$repo/os/$arch Server = https://london.mirror.pkgbuild.com/$repo/os/$arch Server = https://mirrors.gethosted.online/archlinux/$repo/os/$arch Server = https://mirrors.melbourne.co.uk/archlinux/$repo/os/$arch Server = https://mirror.infernocomms.net/archlinux/$repo/os/$arch Server = https://www.mirrorservice.org/sites/ftp.archlinux.org/$repo/os/$arch Server = https://mirror.netweaver.uk/archlinux/$repo/os/$arch Server = https://lon.mirror.rackspace.com/archlinux/$repo/os/$arch Server = https://mirror.server.net/archlinux/$repo/os/$arch Server = https://repo.slithery.uk/$repo/os/$arch Server = https://mirror.st2projects.com/archlinux/$repo/os/$arch Server = https://mirrors.ukfast.co.uk/sites/archlinux.org/$repo/os/$arch Server = https://mirror.cov.ukservers.com/archlinux/$repo/os/$arch Server = https://mirror.vinehost.net/archlinux/$repo/os/$arch Server = https://mirrors.xhosts.co.uk/arch/$repo/os/$arch
- Create disks
Create EFI partition:
fdisk -l to find the designation for the HDD. (Most likely /dev/sda) fdisk /dev/sda g (to create a new partition table) n (to create a new partition) 1 enter +300M t 1 (for EFI) w Create /root partition:
fdisk /dev/sda n 2 enter +30G w Create /home partiton:
fdisk /dev/sda n 3 enter enter w
- Format Partitions
mkfs.fat -F32 /dev/sda1 mkfs.ext4 /dev/sda2 mkfs.ext4 /dev/sda3
- Create the /root and /home directories:
mount /dev/sda2 /mnt mkdir /mnt/home mount /dev/sda3 /mnt/home
- Install Arch linux base packages:
pacstrap -i /mnt base linux linux-firmware sudo nano vim
- Generate the /etc/fstab file:
genfstab -U -p /mnt >> /mnt/etc/fstab
- Chroot into installed system:
arch-chroot /mnt
- Find available time zones:
timedatectl list-timezones
ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime
17, Update the Hardware clock:
hwclock --systohc
- Set your hostname and configure hosts
echo archlinux > /etc/hostname Update /etc/hosts with the following: 127.0.0.1 archlinux ::1 archlinux 127.0.1.1 archlinux.cyrus-consultants.co.uk archlinux
- set root passwd
passwd
- Enable network
pacman -S networkmanager systemctl enable NetworkManager
- Other packages
pacman -S grub efibootmgr dosfstools openssh os-prober mtools linux-headers linux-lts linux-lts-headers open-vm-tools
- Set locale:
sed -i 's/#en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen locale-gen
- Enable root login via SSH:
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config systemctl enable sshd.service passwd
- Create EFI boot directory:
mkdir /boot/EFI mount /dev/sda1 /boot/EFI
- Install GRUB on EFI mode:
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
- Setup locale for GRUB:
cp /usr/share/locale/en@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
- Write GRUB config:
grub-mkconfig -o /boot/grub/grub.cfg
- Create swap file:
fallocate -l 2G /swapfile chmod 600 /swapfile mkswap /swapfile echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab
- Create User: useradd -m -g users -G wheel adaph
passwd adaph
- Allow user to use sudo:
EDITOR=vim visudo
#%wheel ALL=(ALL) ALL (uncomment)
-
exit umount -a reboot
-
reboot