Del 1.. install.sh ------------------------------------------------------------------------------------------------------------------------------------ #!/bin/bash DISK="/dev/sda" PARTITION="${DISK}1" echo DISK="$DISK", PARTITION="$PARTITION" parted -s "$DISK" mklabel msdos parted -s -a optimal "$DISK" mkpart primary ext4 0% 100% parted -s "$DISK" set 1 boot on mkfs.ext4 -F "$PARTITION" # you can find your closest server from: https://www.archlinux.org/mirrorlist/all/ echo 'Server = http://ftp.acc.umu.se/mirror/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist mount "$PARTITION" /mnt pacman -Syy pacstrap /mnt base base-devel grub git genfstab -p /mnt >> /mnt/etc/fstab cp ./chroot.sh /mnt arch-chroot /mnt ./chroot.sh "$DISK" rm /mnt/chroot.sh cp ./world.sh /mnt/home/mathisen cp ./.bash_profile /mnt/home/mathisen umount -R /mnt systemctl reboot ------------------------------------------------------------------------------------------------------------------------------------ Del 2. chroot.sh ------------------------------------------------------------------------------------------------------------------------------------ #!/bin/bash HOST=tempy USERNAME=mathisen HOME_DIR="/home/${USERNAME}" SWAP_SIZE=4G echo DISK="$1", HOST="$HOST", USERNAME="$USERNAME", HOME_DIR="$HOME_DIR" # grub as a bootloader grub-install --target=i386-pc --recheck "$1" # This makes the grub timeout 0, it's faster than 5 :) sudo sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub grub-mkconfig -o /boot/grub/grub.cfg # run these following essential service by default systemctl enable dhcpcd.service echo "$HOST" > /etc/hostname # adding your normal user with additional wheel group so can sudo useradd -m -G wheel -s /bin/bash "$USERNAME" #timezone here ln -f -s /usr/share/zoneinfo/Europe/Helsinki /etc/localtime hwclock --systohc # adjust your name servers here if you don't want to use google echo 'name_servers="8.8.8.8 8.8.4.4"' >> /etc/resolvconf.conf echo en_US.UTF-8 UTF-8 > /etc/locale.gen echo LANG=en_US.UTF-8 > /etc/locale.conf locale-gen # because we are using ssh keys, make sudo not ask for passwords echo 'root ALL=(ALL) ALL' > /etc/sudoers echo 'mathisen ALL=(ALL) ALL' >> /etc/sudoers # creating the swap file fallocate -l "$SWAP_SIZE" /swapfile chmod 600 /swapfile mkswap /swapfile echo /swapfile none swap defaults 0 0 >> /etc/fstab # auto-complete these essential commands echo complete -cf sudo >> /etc/bash.bashrc echo complete -cf man >> /etc/bash.bashrc ------------------------------------------------------------------------------------------------------------------------------------ Del 3. world.sh ------------------------------------------------------------------------------------------------------------------------------------ #!/bin/bash #enable multilib in pacman.conf sudo sed -i '93,94 s/# *//' /etc/pacman.conf sudo pacman -Syu # Lets start with the X install sudo pacman -S xf86-video-vesa sudo pacman -S xorg-server xorg-apps xorg-xinit sudo pacman -S ttf-dejavu ttf-droid ttf-inconsolata sudo pacman -S terminus-font #sudo pacman -S xfce4 xfce4-goodies # installing yaourt for easy AUR installs git clone https://aur.archlinux.org/package-query.git cd package-query makepkg -sri cd .. git clone https://aur.archlinux.org/yaourt.git cd yaourt makepkg -si cd .. yaourt -Syu --aur # installing i3-gaps sudo pacman -S i3 i3blocks dmenu yaourt -S i3-gaps echo exec i3 > .xinitrc #Download mathisen theme from git git clone https://github.com/mathisen99/i3-gaps.git cd i3-gaps #move stuff to right places mkdir ~/.config mkdir ~/.config/i3 cp config ~/.config/i3 cp i3blocks.conf ~/.config/i3 mkdir ~/.fonts cp fontawesome-webfont.ttf ~/.fonts mkdir ~/Images cp maxresdefault.jpg ~/Images/wallpaper.jpg cp .Xdefaults ~/.Xdefaults cd .. echo exec xrandr --output VGA-1 --mode 1920x1080 >> ~/.config/i3/config #installing stuff again :) sudo pacman -S rxvt-unicode chromium lm_sensors mps-youtube feh htop youtube-dl mpv pamixer alsa-utils #some friends for vbox :) sudo pacman -S virtualbox-guest-utils sudo pacman -S linux-headers sudo pacman -S virtualbox-guest-dkms sudo systemctl enable vboxservice.service echo --------------------------------------------------------------- echo Reboot and get a beer and pray that it worked! echo Have fun, Greetings from Mathisen echo ---------------------------------------------------------------