Intel® Core™ i7-4790K 4.0Ghz
2x8GB DDR3 1866 PC3-14900
GeForce GTX 970/PCIe/SSE2
MSI Z97 Gaming 5
-
Download the iso from the Archlinux Oficial Download Page.
-
Make sure the checksum of the downloaded iso is the same that the previous download page says:
Windows: fciv.exe -both <iso_file> Unix: md5sum <iso_file> && sha1sum <iso_file>
-
Make a bootable USB with the downloaded iso.
Windows: Rufus (Make sure to use 'ISO image', 'Quick format', 'FAT32', 'GPT + UEFi') Unix: sudo dd if=/path_to_arch_.iso of=/dev/sdX (you can use lsblk to check the devices) When using the unix method, you can monitor the progress using: https://askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd
-
Check the BIOS is properly configured and boot with the USB:
Boot mode = UEFI fast boot = disabled Windows 8/10 feature (aka secure boot) = disabled.
-
Make sure you have a valid internet connection
ping -c 3 google.com
. If you don't have one, you can connect via wifi:# Retrieve the wireless interface name iw dev # Enable the wireless interface ip link set INTERFACE_NAME up # Run 'rfkill unblock all' If you get the error "RTNETLINK answers: Operation not possible due to RF-kill" # Setup the wifi connection wpa_passphrase "WIFI_SSID" "WIFI_PASSPHRASE" > /tmp/wpa_setup.tmp wpa_supplicant -B -i INTERFACE_NAME -c /tmp/wpa_setup.tmp dhcpcd INTERFACE_NAME # Check that everything went ok ping -c 3 google.com
-
Erase everything in the disk you will be installing arch in, and perform a secure wipe of the generated free space, so it's later indistinguishable from data written by dm-crypt.
# Spot your disk (format like sdX) lsblk # Destroy GPT and MBR sgdisk --zap-all /dev/sdX # Create a temporary encrypted container cryptsetup open --type plain /dev/sdX container --key-file /dev/random # Check "/dev/mapper/container" exists in this list: fdisk -l # Override the container with zeros dd if=/dev/zero of=/dev/mapper/container status=progress # Close the container cryptsetup close container reboot
-
Create partitions (if enough space, create separate partitions for root/home instead, as explained here)
lsblk cgdisk /dev/sdX [New] Press Enter First Sector: Leave this blank ->press Enter Size in sectors: 512MiB ->press Enter Hex Code: EF00 press Enter Enter new partition name: boot ->press Enter [New] Press Enter First Sector: Leave this blank ->press Enter Size in sectors: Leave this blank ->press Enter Hex Code: Leave this blank ->press Enter Enter new partition name: Leave this blank ->press Enter [Write] yes [Quit] reboot
-
Setup LVM on LUKS file system
# Set up file system for the boot aprtition mkfs.vfat -F32 /dev/sdX1 # Make sure you have all they keys needed for your passphrase loadkeys es # Set up LUKS on the main partition cryptsetup -c aes-xts-plain64 -s 512 -h sha512 -i 5000 -y --use-random luksFormat /dev/sdX2 # Open the container cryptsetup open --type luks /dev/sdX2 lvm # The decrypted container is now available at /dev/mapper/lvm # Create a physical volume on top of the opened LUKS container pvcreate /dev/mapper/lvm # Create a volume group vgcreate ArchLinux /dev/mapper/lvm # Create logical volumes (omiting a home lv and only doing 0.5*RAM swap, since hibernation won't be used) lvcreate -L 8G ArchLinux -n swap lvcreate -l 100%FREE ArchLinux -n root # Check the created volumes lvdisplay -v /dev/ArchLinux # Format filesystem on each lv mkfs.ext4 /dev/mapper/ArchLinux-root mkswap /dev/mapper/ArchLinux-swap
-
Install ArchLinux
# Mount the filesystems mount /dev/mapper/ArchLinux-root /mnt mkdir /mnt/home swapon /dev/mapper/ArchLinux-swap mkdir /mnt/boot mount /dev/sdX1 /mnt/boot # Ensure the time clock is accurate timedatectl set-ntp true # Uncomment the top 6 mirrors cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist # Install ArchLinux base and development files plus some usefull utils # For any options that come up just press enter or type y and press enter pacstrap -i /mnt base base-devel zsh vim git openssh # Generate fstabfile genfstab -U -p /mnt >> /mnt/etc/fstab
-
Configure ArchLinux
# Chroot into the installed system arch-chroot /mnt # Uncomment your locale nano /etc/locale.gen # ctrl+W to search for en_GB.UTF-8 # Generate locale locale-gen # Set it as your language echo LANG=en_GB.UTF-8 > /etc/locale.conf export LANG=en_GB.UTF-8 # Set time zone (all of them in: ls /usr/share/zoneinfo/) ln -s /usr/share/zoneinfo/Europe/Madrid > /etc/localtime # Configure keymap echo KEYMAP=es >> /etc/vconsole.conf # Set up the clock hwclock --systohc --utc # Set up the host name echo adria > /etc/hostname nano /etc/hosts # Add a matching entry for your hostname 127.0.1.1 adria.localdomain adria # Enable multilib nano /etc/pacman.conf # Uncomment: #[multilib] #Include = /etc/pacman.d/mirrorlist # Update pacman pacman -Sy # Set a password for root passwd # Set your user useradd -m -g users -G wheel,storage,power,audio -s /bin/zsh adria passwd adria # Add sudo privilegies EDITOR=vim visudo # Uncomment %wheel ALL=(ALL) ALL # In the next line add: Defaults rootpw vim /etc/mkinitcpio.conf # Add 'ext4' 'nvidia' 'nvidia_modeset' 'nvidia_uvm' 'nvidia_drm' to MODULES (check https://wiki.archlinux.org/index.php/Kernel_mode_setting#Early_KMS_start for an updated list of modules to load) # Add 'keymap' 'encrypt' and 'lvm2' before 'filesystem' in HOOKS # Save and exit vim # Regenerate initrd mkinitcpio -p linux
-
Create boot loder
# Enable intel microcode updates pacman -S intel-ucode # Mount EFI variables (ignore if is already mounted) mount -t efivarfs efivarfs /sys/firmware/efi/efivars # Install boot manager bootctl install # Get UUID of LUKS partition blkid -s UUID -o value /dev/sdX2 # Configure boot (replace <UUID> with the previous uuid) echo title Arch Linux >> /boot/loader/entries/arch.conf echo linux /vmlinuz-linux >> /boot/loader/entries/arch.conf echo initrd /intel-ucode.img >> /boot/loader/entries/arch.conf echo initrd /initramfs-linux.img >> /boot/loader/entries/arch.conf echo options cryptdevice=UUID=<UUID>:luks root=/dev/mapper/ArchLinux-root quiet rw >> /boot/loader/entries/arch.conf echo default arch > /boot/loader/loader.conf echo timeout 0 >> /boot/loader/loader.conf echo editor no >> /boot/loader/loader.conf # Install nvidia drivers BEFORE first boot pacman -S nvidia # Reboot exit umount -R /mnt swapoff -a reboot # Remember to remove the usb
-
Customize it and make it user friendly
# Disable the annoying 'beep' pc speaker modprobe -r pcspkr # Install internet interface ip link # ignore lo, use the other one in the next command as <ADAPTER>, example: enp3s0 sudo systemctl enable dhcpcd@<ADAPTER>.service reboot # Install printer service sudo pacman -S cups cups-pdf samba avahi systemctl enable org.cups.cupsd.service systemctl start org.cups.cupsd.service systemctl enable avahi-daemon.service systemctl start avahi-daemon.service # Config nvidia sudo pacman -Syy sudo pacman -Syu sudo nvidia-xconfig # Install desktop manager sudo pacman -S gnome gdm gnome-calendar gnome-tweak-tool sudo systemctl enable gdm.service sudo pacman -S networkmanager sudo systemctl disable dhcpcd@<ADAPTER>.service sudo systemctl enable NetworkManager reboot # Install Oh My Zsh sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # Install VLC sudo pacman -S vlc # Install Firefox sudo pacman -S firefox # Install docker pacman -S docker docker-compose systemctl enable docker.service sudo usermod -aG docker $USER # Install redshift pacman -S redshift # Go to the config path and paste + customize the settings # It's important that you update at least the latitude/longitude coords # Path+settings+info: https://wiki.archlinux.org/index.php/Redshift#Manual_setup vim <REDSHIFT_CONFIG_PATH> # Install trizen sudo pacman -S gettext json-c git clone https://aur.archlinux.org/trizen.git cd trizen && makepkg -sri && cd .. && rm -rf ./trizen # Add official sublime text repo curl -O https://download.sublimetext.com/sublimehq-pub.gpg sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/dev/x86_64" | sudo tee -a /etc/pacman.conf # Install utils sudo pacman -S arc-gtk-theme telegram-desktop pacman-contrib trizen -S spotify slack-desktop chrome-gnome-shell-git # Make sure every update of the 'systemd-boot' is handled correctly trizen -S systemd-boot-pacman-hook
Check out cool terminal themes:
Usefull programs/GNOME extensions:
- https://extensions.gnome.org/extension/517/caffeine/
- https://extensions.gnome.org/extension/307/dash-to-dock/
- https://github.com/horst3180/arc-icon-theme
- https://extensions.gnome.org/extension/858/volume-mixer/
- https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/
- https://extensions.gnome.org/extension/1497/topicons-redux/
- https://extensions.gnome.org/extension/1128/hide-activities-button/
- https://extensions.gnome.org/extension/1362/custom-hot-corners/
Update:
pacaur
is no longer mantained. Usetrizen
instead.