Skip to content

Instantly share code, notes, and snippets.

@rubik
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubik/380dc246668b875c3111 to your computer and use it in GitHub Desktop.
Save rubik/380dc246668b875c3111 to your computer and use it in GitHub Desktop.
Brief installation guide for ArchLinux with a bootstrap script that sets up the environment as I like it.

Installation Guide

Excerpted from the official ArchLinux Installation Guide.

Keyboard layout

The available keymap files can be found in /usr/share/kbd/keymaps/ (you can omit the keymap path and file extension when using loadkeys).

Partition disks

See partitioning for details. Then, to format the partitions, see File Systems and optionally Swap for details.

Run arch-strap.sh

A DHCP service is already enabled for all available devices. If you need to setup a static IP or use management tools such as Netctl, you should stop this service first: systemctl stop dhcpcd.service. For more information read configuring network. Run wifi-menu to set up your wireless network. For details, see Wireless Setup and Netctl.

You're now ready to run the bootstrap script. Before running it, make sure to read it, understand it, and configure it as you like it.

Warning: the script may not be immune from errors, bugs or whatever. Execute carefully at your own risk.

#!/bin/bash
# Configuration
root=/dev/sda3
boot=/dev/sda1
home=/dev/sda4
lang=en_US-UTF-8
keyboard=it
zone=Europe
subzone=Rome
hostname=laptop
username=miki
eth0=enp2s0
base_pkgs=(base-devel wget zip unzip unrar)
intel_pkgs=(xf86-video-intel xf86-input-synaptics)
gui_pkgs=(xorg-utils xorg-xinit xclip lxappearance faenza-icon-theme obconf \
openbox)
system_pkgs=(slim acpi acpid lm_sensors)
app_pkgs=(thunar feh git vim conky pypanel rxvt-unicode chromium slim)
fonts_pkgs=(ttf-ms-fonts)
all_pkgs=(${base_pkgs[@]} ${intel_pkgs[@]} ${gui_pkgs[@]} ${system_pkgs[@]} \
${app_pkgs[@]} ${fonts_pkgs[@]})
mount $root /mnt
mkdir /mnt/{boot,home}
mount $boot /mnt/boot
mount $home /mnt/home
pacstrap -i /mnt base
genfstab -U -p /mnt >> /mnt/etc/fstab
nano /mnt/etc/fstab
arch-chroot /mnt
loadkeys $keyboard
vi /etc/locale.gen
locale-gen
echo LANG=$lang > /etc/locale.conf
export LANG=$lang
setfont Lat2-Terminus16
vi /etc/vconsole.conf
ln -s /usr/share/zoneinfo/$zone/$subzone /etc/localtime
hwclock --systohc --localtime
echo $hostname > /etc/hostname
vi /etc/mkinitcpio.conf # add i915 to modules (intel drivers)
mkinitcpio -p linux
dhcpcd
pacman -S syslinux
syslinux-install_update -i -a -m
useradd -m -g users -s /bin/bash $username
passwd $username
pacman -S ${all_pkgs[@]}
mkdir -p build/{gtk-theme-elegant-revisited,openbox-nova-theme,elegant-brit}
wget https://aur.archlinux.org/packages/gt/gtk-theme-elegant-revisited/PKGBUILD \
-O build/gtk-theme-elegant-revisited/PKGBUILD
wget https://aur.archlinux.org/packages/op/openbox-nova-theme/PKGBUILD \
-O build/openbox-nova-theme/PKGBUILD
wget https://drive.google.com/file/d/0B6AOgfrRDZVSTGhVQ0RzT0JVdTQ/edit \
-O build/elegant-brit/
echo "Packages to build downloaded in /build"
systemctl enable acpid.service
systemctl enable dhcpcd@${eth0}.service
systemctl enable slim.service
sensors-detect
exit
umount -l /mnt/{boot,home,}
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment