Last active
August 29, 2015 14:07
-
-
Save wwqrd/0e94790dd18bcac4b9fd to your computer and use it in GitHub Desktop.
Installing Arch
This file contains 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
# Source: https://wiki.archlinux.org/index.php/Beginners%27_Guide#Installation | |
# Set keyboard layout | |
loadkeys uk | |
# Have a look at the disks | |
lsblk -f | |
# Wipe disk | |
sgdisk --zap-all /dev/sda | |
# Create GPT partition(s) | |
cgdisk /dev/sda | |
# If on BIOS system create a bios partition | |
# 1M, 0xef02 | |
# Format partition(s) | |
mkfs.ext4 /dev/sda1 | |
# Mount the parition(s) | |
mount /dev/sda1 /mnt | |
# Install base system to partition | |
pacstrap -i /mnt base base-devel | |
# Make an fstab | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
# Check it | |
nano /mnt/etc/fstab | |
# Chroot! | |
arch-chroot /mnt /bin/bash | |
# Install vim | |
pacman -S vim | |
# Setup locale | |
vim /etc/locale.gen | |
locale-gen | |
echo LANG=en_GB.UTF-8 > /etc/locale.conf | |
export LANG=en_GB.UTF-8 | |
# Set console layout and font for permanent | |
vim /etc/vconsole.conf | |
# KEYMAP=uk | |
# FONT=Lat2-Terminus16 | |
# Set timezone | |
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime | |
# Set clock to utc | |
hwclock --systohc --utc | |
# Set hostname | |
echo myhostname > /etc/hostname | |
vim /etc/hosts | |
# 127.0.0.1 localhost.localdomain localhost myhostname | |
# Take a look at the beginner's guide for more config, like networking | |
# Set the root password | |
passwd # Make sure keyboard layout is set up!! | |
# Install grub | |
pacman -S grub # Install grub package | |
grub-install --target=i386-pc --recheck /dev/sda # Apply it to disk | |
grub-mkconfig -o /boot/grub/grub.cfg # Save the config | |
# Post install | |
# ============ | |
# Set up network | |
ip link # List devices | |
ip link set interfacenamehere up # Active device | |
systemctl enable [email protected] | |
# Misc | |
pacman -S gptfdisk # fdisk, cgdisk etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment