Arch Installation Guide
with HiDPI 4K UHD tips
Wed Oct 04 2017
0. Prep
- Get Rufus.
- Download the Arch installation image.
- Plug in USB (USB will be wiped).
- Select the Arch iso on Rufus, leave all settings default, click start. Skip to Section 1 if NOT dual booting with Windows
- <win> + <r>, type
diskmgmt.msc
, enter. - Right click the main volume and select shrink. Just make some empty free space for Arch. Also account for the swap partition which should be the same size as RAM.
- Disable Fast Startup.
- Disable UEFI secure boot if machine has it in BIOS.
1. Init archiso env
- Boot into archiso using BIOS boot (i.e. pressing f12). If possible, boot using EFI boot.
Skip to Section 2 if ethernet is connected and
ping google.com
works. TODO Ethernet connection instructions ip link
to list wifi interfaces. Find out your wifi device name.wifi-menu [device name]
, thenping google.com
to verify connection.
1.5 High DPI tiny text solution
pacman -Sy terminus-font
thensetfont ter-v32n
. Also if you want bigger text in general. If no internet just dosetfont latarcyrheb-sun32
as it’s the only default 8x32 font.
2. Partition
lsblk
to check disk name of the place where you want to install Arch. It looks something like/dev/sda
.cfdisk
to make an EFI partition for booting ONLY IF your device does not have one, swap partition with size same as RAM, and then a filesystem partition. Write after each command.
3. Init swap
mkswap -L "Linux Swap" [swap partition name]
. Usefdisk -l
to find the name that looks something like/dev/sda2
. Also refer back to this command to find partition name for filesystem and EFI.swapon [swap partition name]
.free -m
to verify. It should have a size for swap in the last line.
4. Init filesystem
mkfs.ext4 -L "Arch Linux" [filesystem partition name]
formats filesystem partition to ext4.mount [filesystem partition name] /mnt
mounts the partition to a port.
5. Init EFT
mkdir -p /mnt/boot
.- If NOT dual booting with Windows,
mkfs.vfat [EFI partition name]
. Keep your Windows EFI partition intact if dual booting. mount [EFI partition name] /mnt/boot
mounts the EFI partition within the filesystem.pacstrap /mnt base
to install the base Arch Linux package on the filesystem and boot partition. Usebase-devel
instead ofbase
for more development tools.genfstab -U -p /mnt >> /mnt/etc/fstab
to create boot information containing partition information. Check withcat /mnt/etc/fstab
.
6. Basic config
arch-chroot /mnt
to access the installed Arch Linux from archiso. Alsopacman -Sy dialog wpa_supplicant iw
to usewifi-menu
when booting directly to Arch.pacman -Sy intel-ucode
for intel processor info. Throw invim
andterminus-font
as you see fit. Localevim /etc/locale.gen
and uncomment the line with your layout and timezone (e.g.en_US.UTF-8 UTF-8
). Use another editor likenano
instead ofvim
as you see fit.locale-gen
.echo LANG=en_US.UTF-8 > /etc/locale.conf
.export LANG=en_US.UTF-8
.rm /etc/localtime
.ln -s /usr/share/zoneinfo/[continent]/[location] /etc/localtime
. Use <tab> to list options in brackets.hwclock --systohc --utc
.timedatectl
to check time & date. Hostnameecho [hostname] > /etc/hostname
names how your device shows up on networks.vim /etc/hosts
then add hostname after bothlocalhosts
. Pacman swag-
vim /etc/pacman.conf
underArchitecture = Auto
addILoveCandy
andColor
on their own lines so it looks like:... Architecture = Auto ILoveCandy Color ...
Then add these to the end of the document:
[archlinuxfr] SigLevel = Never Server = http://repo.archlinux.fr/$arch update: "pacman -Syu"
- If running 32-bit, uncomment the include line under
[multilib]
Root and users passwd
to set root password.useradd -m -g users -G wheel,storage,power -s /bin/bash [username]
to create user.passwd [username]
to assign password to said user.
7. Bootloader setup
bootctl install
and pray.-
vim /boot/loader/loader.conf
, delete everything in it and add:timeout 4 default arch
-
vim /boot/loader/entries/arch.conf
and add:title Archlinux linux /vmlinuz-linux initrd /initramfs-linux.img initrd /intel-ucode.img options root=PARTUUID=[type ':r !blkid' and copy from Arch partition] rw
- Alternatively,
blkid >> /boot/loader/entries/arch.conf
and then use your editor of choice to fill in the rest. ` - Skip the
intel-ucode.img
if you don’t have it in/boot
- Reboot and pray to the gods
- Log back in as root
7.5 Nvidia + Intel GPU causes shutdown/reboot hang fix
vim /etc/modprobe.d/modprob.conf
and add these 3 lines:blacklist nvidia
,blacklist nouveau
, andoptions bbswitch load_state=0 unload_state=1
.- If you wish to turn ON/OFF the GPU, enter:
sudo rmmod bbswitch
/sudo modprobe bbswitch
.
8. Install things as you see fit
xf86-input-synaptics
for touchpadmesa
an open-source implementation of the OpenGL specificationbash-completion
xorg-server xorg-apps xorg-xinit
that’s for window managersgvim git openssh
gvim for the+clipboard
over vim- Run
pacaur_helper.sh
in the Scripts folder.pacaur
searches, installs, and manages packages from the AUR and behaves just likepacman
which is the best package manager tbh i3-gaps
or wm of choiceurxvt
or terminal emulator of choiceneofetch
prints system info and ASCII art of the distro’s logocompton
is a composite manager that lets you do transparancy. As a result, you can add two more degit to the hex code (eg#000000
->#88000000
), where88
is the hex code for the alpha channelfeh
manages your desktop backgroundfirefox
or browser of choicefont-awesome
for glyphs,terminus-font
if you hadn’t already, and fonts of choicesudo
then look up how to set up sudoers
9. Interface setup
- Reboot again
- Login as user
vim .bashrc
and add in whatever you see fit you find in my.bashrc
. Typebash
to test those settings out- To set up i3 (or alternative) with
startx
, add these lines to~/.xinitrc
:xrdb .Xresources
,xrandr --dpi 282
if HiDPI,exec i3
-
To run
startx
automatically on login, add these lines to~/.bash_profile
:if [ "$(tty)" = "/dev/tty1" ]; then startx && exit fi
- Reboot and spend the next week debugging and ricing your Linux :^)
This guide is tested on the Dell XPS 15 2017.
Courtesy of Alan