Created
August 6, 2018 03:27
-
-
Save william8th/b65dd2e4fedd46ccc46e9d643833f0ca to your computer and use it in GitHub Desktop.
ArchLinux installation guide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Boot into Live CD/USB | |
# Use UK keyboard | |
loadkeys uk | |
# Check partitions available | |
fdisk -l | |
# Use fdisk to format partitions | |
# o to overwrite the disk | |
# n to create new partition | |
# a to make partition bootable | |
fdisk /dev/sda | |
# Create 3 partitions | |
# 1. Boot partition 10G | |
# 2. Swap partition 500M | |
# 3. Home partition Remaining | |
# Check if partitions are correct, they should show | |
# /dev/sda1 Bootable 10G | |
# /dev/sda2 Swap 500M | |
# /dev/sda3 Linux Remaining | |
fdisk -l | |
# Format partition 1 and 3 to use ext4 | |
mkfs.ext4 /dev/sda1 | |
mkfs.ext4 /dev/sda3 | |
# Initialise swap | |
mkswap /dev/sda2 | |
swapon /dev/sda2 | |
# Mount bootable drive | |
mount /dev/sda1 /mnt | |
# Mount home drive | |
mkdir /mnt/home | |
mount /dev/sda3 /mnt/home | |
# Run pacstrap to initialise ArchLinux | |
pacstrap /mnt base base-devel | |
# Generate fstab | |
genfstab -pU /mnt >> /mnt/etc/fstab | |
# Change any Linux drive from realtime to noatime for SSD drives | |
vi /mnt/etc/fstab | |
# Change root into the new system | |
arch-chroot /mnt | |
# Link local time | |
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime | |
# Sync clock | |
hwclock --systohc --utc | |
# Install software | |
pacman -S git vim linux-headers linux-lts linux-lts-headers grub-bios | |
# Uncomment en_GB.UTF-8 | |
vim /etc/locale.gen | |
# Generate locale information, set language, and set keyboard layout | |
locale-gen | |
echo LANG=en_GB.UTF-8 >> /etc/locale.conf | |
echo KEYMAP=uk >> /etc/vconsole.conf | |
# Set root password | |
passwd | |
# Install GRUB (does not matter if it's i386 or x86_64) | |
grub-install --target=i386-pc /dev/sda | |
# Exit and unmount new ArchLinux installation | |
exit | |
unmount -R /mnt | |
# Turn swap off before reboot | |
swapoff -a | |
# Restart computer. Should continue boot to GRUB when computer restarts | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment