Last active
September 13, 2018 15:53
-
-
Save danielcbaldwin/b33b8b861a14547e20e7138ca1d68546 to your computer and use it in GitHub Desktop.
Arch Install Manual... dont try to run this file, just follow the steps.
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
# Boot from the usb, make sure that secure boot is disabled in the BIOS | |
# Default keymap is set to US | |
# Connect to wifi | |
wifi-menu | |
# Create partitions using cgdisk or fdisk | |
1 500MB EFI partition # Hex code ef00 | |
2 100% size partition # Hex code 8300 | |
# Make filesystem | |
mkfs.vfat -F32 /dev/sdX1 | |
# Setup the encryption of the system | |
cryptsetup -c aes-xts-plain64 -y --use-random luksFormat /dev/sdX2 | |
cryptsetup luksOpen /dev/sdX2 luks | |
# Create encrypted partitions | |
# This creates one partions for root, modify if /home or other partitions should be on separate partitions | |
pvcreate /dev/mapper/luks | |
vgcreate vg0 /dev/mapper/luks | |
lvcreate --size 8G vg0 --name swap | |
lvcreate -l +100%FREE vg0 --name root | |
# Create filesystems on encrypted partitions | |
mkfs.ext4 /dev/mapper/vg0-root | |
mkswap /dev/mapper/vg0-swap | |
# Mount the new system | |
mount /dev/mapper/vg0-root /mnt # /mnt is the installed system | |
swapon /dev/mapper/vg0-swap # Not needed but a good thing to test | |
mkdir /mnt/boot | |
mount /dev/sdX1 /mnt/boot | |
# Install the system also includes stuff needed for starting wifi when first booting into the newly installed system | |
# Unless vim and zsh are desired these can be removed from the command | |
pacstrap /mnt base base-devel vim git dialog wpa_supplicant | |
# 'install' fstab | |
genfstab -pU /mnt >> /mnt/etc/fstab | |
# Make /tmp a ramdisk (add the following line to /mnt/etc/fstab) | |
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |
# Change relatime on all non-boot partitions to noatime (reduces wear if using an SSD) | |
# Enter the new system | |
arch-chroot /mnt /bin/bash | |
# Setup system clock | |
ln -s /usr/share/zoneinfo/America/Denver /etc/localtime | |
hwclock --systohc --utc | |
# Set the hostname | |
echo MYHOSTNAME > /etc/hostname | |
# Update locale | |
vim /etc/locale.gen | |
# Uncomment en_US.UTF-8, then run the following | |
locale-gen | |
# Set password for root | |
passwd | |
# Add real user | |
useradd -m -g users -G wheel,storage,power USERNAME | |
passwd USERNAME | |
# Setup wheel to be able to sudo | |
visudo | |
# Uncomment the line: %wheel ALL=(ALL) ALL | |
# Configure mkinitcpio | |
vim /etc/mkinitcpio.conf | |
# Add 'ext4 dm_mod dm_crypt aes_x86_64' to MODULES | |
# Add 'encrypt' and 'lvm2' to HOOKS before 'filesystems' | |
# Regenerate initrd | |
mkinitcpio -p linux | |
# Setup boot loader | |
bootctl install | |
# Set up loader files | |
vim /boot/loader/loader.conf | |
timeout 3 | |
default arch | |
# Make arch.conf and arch-fallback.conf | |
vim /boot/loader/entries/arch.conf | |
title Arch Linux | |
linux /vmlinuz-linux | |
initrd /initramfs-linux.img | |
options cryptdevice=/dev/sdX2:luks:allow-discards root=/dev/mapper/vg0-root rw | |
# arch-fallback.conf | |
vim /boot/loader/entries/arch-fallback.conf | |
title Arch Linux fallback | |
linux /vmlinuz-linux | |
initrd /initramfs-linux-fallback.img | |
options cryptdevice=/dev/sdX2:luks:allow-discards root=/dev/mapper/vg0-root rw | |
# Install needed packages for GUI | |
pacman -S networkmanager xorg-server wget acpid | |
# Exit new system | |
exit | |
# Unmount all partitions | |
umount -R /mnt | |
swapoff -a | |
# Reboot into the new system | |
reboot | |
# Install pacaur | |
curl -L https://goo.gl/HKiGJA -o install_pacaur.sh | |
chmod +x ./install_pacaur.sh | |
./pacaur.sh | |
# Install yaourt | |
git clone https://aur.archlinux.org/package-query.git | |
cd package-query | |
makepkg -si | |
cd .. | |
git clone https://aur.archlinux.org/yaourt.git | |
cd yaourt | |
makepkg -si | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment