I just installed arch on a new hard drive and recorded the steps below. Note this is the UEFI method only if anyone wants to edit for a Non-UEFI install feel free.
If you notice any errors let me know I will correct them ASAP
Installing Arch Linux on EFI System
-----------------------------------------------------
1.) Check your available drives default is 'sda'
2.) run 'cfdisk' to setup partitions, make sure to include boot/efi, swap, /root and /home partitons
Boot efi partitons are normally 500/mb (fat32)
Swap partitions are around 2500/mb
Root should be about 30-40% of remaining space (ext4)
Home should be about 60-70% of remaining space (ext4)
3.) Format partitions
SWAP Partition
EFI Boot Partition
Code:
mkfs.fat -F32 /dev/sda1
/ Partition
Code:
mkfs.ext4 /dev/sda3
/home Partition
Code:
mkfs.ext4 /dev/sda4
4.)If using wireless - Authenticate to the wireless network
use
help to list all available commands
5.) Check internet connection
6.) Mount Partitions and Generate fstab
# Setup and mount efi
Code:
mkdir /mnt/boot/efi
# Mount efi partition
Code:
mount /dev/sda1 /mnt/boot/efi
#Mount Root /
Code:
mount /dev/sda3 /mnt
#Mount Swap
#Mount Home
Code:
mnt /dev/sda3 /mnt/home
#Generate fstab file
Code:
genfstab -U /mnt >> /mnt/etc/fstab
7.) chroot into new system
8.) Install base system **(exclude efibootmgr if non UEFI system)**
Code:
pacstrap /mnt base base-devel linux linux-firmware vim nano mc grub efibootmgr networkmanager
9.) Set timezone
#Find your timezone
Code:
timedatectl list-timezones
#Set Your timezone
Code:
timedatectl set-timezone America/New_York
10.) Set locale & edit locale-gen
# Set locale
Code:
nano /etc/locale.gen
# uncomment both lines
PHP Code:
en_US.UTF-8 UTF-8
en_US ISO-8859-1
# save file and run
Code:
echo LANG=en_US.UTF-8 > /etc/locale.conf
Code:
export LANG=en_US.UTF-8
11.) Set you hostname
Code:
echo yourhostname > /etc/hostname
12.) Create hosts file
#example hosts file
PHP Code:
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
::1 localhost
127.0.1.1 yourhostname #Change this to your own hostname
13.) Set root password
14.) Add a user
# Set password for new user
15.) Exit chroot and reboot into UEFI
#Now lets exit chroot
#And Reboot
16.) We need to reboot installer into UEFI mode to install bootloader
# Mount root again and chroot
Code:
mount /dev/sda3 /mnt
17.) Install grub
Code:
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
18.) mkconfig
Code:
grub-mkconfig -o /boot/grub/grub.cfg
19.) Enable networkmanager
Code:
systemctl enable NetworkManager
20.) Exit chroot
21.) Reboot
22.) Upon reboot you should be met with a terminal this is your installed system, before we install the desktop now would be a good time to add your user to the sudoers file
Login as root
Look for root and add your username below it (example below)
PHP Code:
##
## User privilege specification
##
root ALL=(ALL) ALL
username ALL=(ALL) ALL
23.) Update Pacman Database
24.) Install plasma desktop and sddm
Code:
pacman -S xorg plasma plasma-wayland-session kde-applications
25.) Enable sddm
Code:
systemctl enable sddm
Code:
systemctl start sddm
Everything should be working!
-----------------------------------------------------------------------------------------
Note:
Once you have a base system installed you may want to save the package list
Code:
pacman -Qqe | grep -v "$(pacman -Qqm)" > pkglist.txt
If you ever reinstall Arch all you need to do is run
Code:
pacman -S --needed - < pkglist.txt
This will save time in the future installing packages after a clean install.