-
Change keyboard layout:
loadkeys no
-
Verify boot mode:
ls /sys/firmware/efi/efivars
(If the directory exist your computer supports EFI)
-
Ping some site on the Internet to verify connection:
ping archlinux.org
-
Update system clock:
timedatectl set-ntp true
- You can verify the status with
timedatectl status
-
Enable SSH:
systemctl start sshd
-
Change root password:
passwd
-
Go to https://archlinux.org/mirrorlist and find the closest mirror that supports HTTPS:
- Add the mirrors on top of the
/etc/pacman.d/mirrorlist
file. Server = https://mirror.neuf.no/archlinux/$repo/os/$arch
(Norway)
- Add the mirrors on top of the
-
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
-
Create the filesystems:
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
-
Generate the
/etc/fstab
file:genfstab -U -p /mnt >> /mnt/etc/fstab
-
Chroot into installed system:
arch-chroot /mnt
-
Set the timezone:
ln -sf /usr/share/zoneinfo/Europe/Oslo /etc/localtime
-
Update the Hardware clock:
hwclock --systohc
-
Install boot manager and other needed packages:
pacman -S grub efibootmgr dosfstools openssh os-prober mtools linux-headers linux-lts linux-lts-headers
-
Set locale:
sed -i 's/#en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen
(uncomment en_US.UTF-8)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
(for changing the root password)
-
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
-
Exit, unount and reboot:
exit
umount -a
reboot
-
-
Save chriscandy/16899e0d701a05654cb4f79ef2d2d062 to your computer and use it in GitHub Desktop.
Thank you! I had followed the Arch Linux "Installation guide", and got stuck at installing a boot loader.
BTW, I haven't done so much manual installation since 4.1BSD on a VAX-11/780, 40+ years ago!
I suggest getting 'sshd' up and running ASAP, to allow copy/paste (I'm installing to a VMware virtual machine, accessible via the host-only network). I had to do 'pacman -S net-tools' (in the chroot environment), to get 'ifconfig' so I could see what the IP address was.
In reply to:
How does grub-install find a EFI directory in the 22 step?
and:
I needed to specify efi directory when grub-install like this
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck --efi-directory=/boot/EFI
It seems be a matter of "/boot/EFI" vs "/boot/efi". I'm using /boot/efi (lower-case, apparently the default), and didn't need the '--efi-directory'.
I prefer /boot/efi because there's an "EFI" subdir, and /boot/EFI/EFI can be confusing.
Just in case.
If someone doesn't have compressed linux kerne
You can check if this is because the first install by check menuentry, using
If there is only the firmware entry you will have to add this file, then rebuild all.
If file are totally missing of your hard drive, use