Last active
May 20, 2018 11:01
-
-
Save alexanderstephan/f3a42b483c37008c34f7bcd09f995899 to your computer and use it in GitHub Desktop.
Basic arch install with full encryption
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
\e[0;36m. | |
\e[0;36m/ \ | |
\e[0;36m/ \ \e[1;37m # \e[1;36m| * | |
\e[0;36m/^. \ \e[1;37m a##e #%" a#"e 6##% \e[1;36m| | |-^-. | | \ / | |
\e[0;36m/ .-. \ \e[1;37m.oOo# # # # # \e[1;36m| | | | | | X | |
\e[0;36m/ ( ) _\ \e[1;37m%OoO# # %#e" # # \e[1;36m| | | | ^._.| / \ \e[0;37mTM | |
\e[1;36m/ _.~ ~._^\ | |
\e[1;36m/.^ ^.\ © Alexander Stephan | |
Warranty Disclaimer: | |
I am not responsible for data loss, possible hardware failures, thermonuclear war, | |
or you getting fired because your arch driven atomic plant failed. | |
If you have any concerns regarding the installation don't hesitate to do some research | |
on your own to prevent possible failures or bugs | |
# Temporarely load your preferred keyboard layout | |
loadkeys de | |
#Find out your block device name | |
lsblk or lsblk -Sp | |
#Create boot and root partition | |
parted -a optimal /dev/<devicename> mklabel gpt mkpart primary 0% 257MiB name 1 boot mkpart primary 257MiB 100% name 2 root | |
mkfs.btrfs -L boot /dev/<devicename>1 | |
cryptsetup luksFormat /dev/<devicename>2 | |
cryptsetup open /dev/<devicename>2 root | |
mkfs.f2fs -l root /dev/mapper/root | |
#Mount devices | |
mount /dev/mapper/root /mnt | |
mkdir /mnt/boot | |
mount <devicename>1 /mnt/boot | |
#Install base system | |
pacstrap /mnt base base-devel intel-ucode | |
#Write fstab (contains all the drives that will be mounted upon booting) | |
genfstab -p /mnt > /mnt/etc/fstab | |
#Change root envirement to freshly installed base system | |
arch-chroot /mnt/ | |
#Name your machine | |
echo myhost > /etc/hostname | |
#Locals | |
echo LANG=en_US.UTF-8 > /etc/locale.conf | |
nano /etc/locale.gen | |
locale-gen | |
echo KEYMAP=de-latin1 > /etc/vconsole.conf | |
#Timezone | |
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime | |
#Mirrors | |
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak | |
grep -E -A 1 ".*Germany.*$" /etc/pacman.d/mirrorlist.bak | sed '/--/d' > /etc/pacman.d/mirrorlist | |
#Local adress | |
nano /etc/hosts | |
#<ip-address> <hostname.domain.org> <hostname> | |
127.0.0.1 localhost.localdomain localhost | |
::1 localhost.localdomain localhost | |
# Uncomment [multilib] to add 32-bit support | |
nano /etc/pacman.conf | |
pacman -Sy | |
#Set password | |
passwd | |
#Install syslinux bootloader | |
pacman -S gptfdisk syslinux | |
syslinux-install_update -iam | |
#Just keep DEFAULT + LABELS and add "cryptdevice=/dev/nvme0n1p2:root root=/dev/mapper/root rw" after APPEND | |
nano /boot/syslinux/syslinux.cfg | |
#Add "encrypt" Hook and create kernel image | |
nano /etc/mkinitcpio.conf | |
sudo pacman -S f2fs-tools btrfs-progs | |
mkinitcpio -p linux | |
#Possibly do a reboot here | |
#Add user with root privileges | |
useradd -m -g users -s /bin/bash <username> | |
pacman -S sudo | |
nano /etc/sudoers (uncomment %wheel ALL=(ALL) ALL) | |
gpasswd -a <username> wheel | |
pacman -S acpid dbus avahi cups cronie | |
#Time sync | |
systemctl enable systemd-timesyncd.service | |
systemctl start systemd-timesyncd.service | |
hwclock -w | |
#Install trizen AUR manager | |
git clone https://aur.archlinux.org/trizen-git.git && cd trizen-git && makepkg -si | |
#Install basic programs | |
trizen -S xorg-server xorg-xinit ttf-dejavu i3-gaps dmenu i3status i3lock polybar vim qutebrowser rofi ranger cmus | |
#Install Ly login manager and Excalibar | |
trizen -S ly-git excalibar-git | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment