Skip to content

Instantly share code, notes, and snippets.

@rubik
Last active December 18, 2015 16:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubik/5812283 to your computer and use it in GitHub Desktop.
Save rubik/5812283 to your computer and use it in GitHub Desktop.
A little script that does the basic things when installing ArchLinux
#!/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 xorg-xmessage)
system_pkgs=(slim acpi acpid lm_sensors gvfs udiskie ntp tlp)
app_pkgs=(pcmanfm feh git vim conky pypanel rxvt-unicode chromium slim \
imagemagick mplayer gprename bleachbit words the_silver_searcher \
thunderbird)
fonts_pkgs=(ttf-ms-fonts ttf-monaco ttf-dejavu ttf-droid)
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/
## Add:
#vattery
#volumeicon
#adb
#freetype2-infinality
#fontconfig-infinality
#pacbuilder
echo "Packages to build downloaded in /build"
timedatectl set-ntp true
systemctl enable acpid.service
systemctl enable dhcpcd@${eth0}.service
systemctl enable ntpd.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