Skip to content

Instantly share code, notes, and snippets.

@p7cq
Last active April 26, 2020 19:13
Show Gist options
  • Select an option

  • Save p7cq/c585ec0b6ee8fd5690bdee9f4b2bf336 to your computer and use it in GitHub Desktop.

Select an option

Save p7cq/c585ec0b6ee8fd5690bdee9f4b2bf336 to your computer and use it in GitHub Desktop.
Install Arch Linux on Dell XPS 9570

Install Arch Linux on Dell XPS 9570

This is my first attempt to install Arch Linux - either on bare metal or in a virtual environment. I spent a couple of hours trying to boot the image and get to the system for the actual installation. - Pressing enter on the boot entry Arch Linux archiso x86_64 UEFI CD always resulted in a black screen. After trying several boot parameters I decided to rewrite the USB key. After that I was able to boot, with no startup parameters needed.

Run all commands as the root user.

  • As the default Linux console font is very small on HiDPI displays I will use the largest font present in kbd package:
setfont latarcyrheb-sun32
  • To connect to the internet configure wpa_supplicant:
wpa_passphrase ESSID PASSPHRASE > /etc/wpa_supplicant/wpa_supplicant.conf

Replace ESSID and PASSPHRASE as appropriate.

Note that I swapped the original Killer 1535 Wi-Fi card with an Intel Wireless-AC 9260; I had no issues so far, and excellent stability.

  • Start wpa_supplicant and get an IP address:
wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
dhclient wlan0

Replace wlan0 with the actual network interface name (e.g., from output of ip a).

  • Setup timezone and NTP:
timedatectl set-timezone Region/City
timedatectl set-ntp true

Replace Region and City as appropriate.

  • Create boot, root, and swap partitions. The following lines will destroy all the data on the disk:
sgdisk --zap-all /dev/disk/by-id/nvme0n1
sgdisk -n1:0:+512M -t1:ef00 /dev/disk/by-id/nvme0n1
sgdisk -n2:0:+450G -t2:8300 /dev/disk/by-id/nvme0n1
sgdisk -n3:0:+8G -t3:8200 /dev/disk/by-id/nvme0n1
  • Format partition and initialize swap:
mkfs.vfat /dev/disk/by-id/nvme0n1-part1
mkfs.ext4 /dev/disk/by-id/nvme0n1-part2
mkswap /dev/disk/by-id/nvme0n1-part3
swapon /dev/disk/by-id/nvme0n1-part3
  • Mount partitions:
mount /dev/disk/by-id/nvme0n1-part2 /mnt
mkdir /mnt/boot
mount /dev/disk/by-id/nvme0n1-part1 /mnt/boot
  • Edit the mirror list in /etc/pacman.d/mirrorlist and install the base system:
pacstrap /mnt base base-devel linux linux-firmware vim-minimal
  • Generate fstab:
genfstab -U /mnt >> /mnt/etc/fstab
  • Change root into the new system:
arch-chroot /mnt
  • Configure timezone:
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
  • Uncomment a line in locale.gen, e.g. en_US.UTF-8 UTF-8 and generate the locale:
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
  • Configure console:
echo -e "KEYMAP=us\nFONT=latarcyrheb-sun32" > /etc/vconsole.conf
  • Set hostname:
echo al > /etc/hostname

Replace al as appropriate.

  • Set hosts:
echo -e "127.0.0.1 localhost\n::1 localhost" >> /etc/hosts
  • Set root password
  • Install processor's microcode and some other software:
pacman -S intel-ucode wpa_supplicant networkmanager firewalld ebtables ipset sudo vim-minimal openssh
  • Install bootloader:
bootctl --path=/boot install
  • Add an update hook for the boot manager to be executed every time systemd is upgraded, in /etc/pacman.d/hooks/100-systemd-boot.hook:
[Trigger]
Type = Package
Operation = Upgrade
Target = systemd

[Action]
Description = Updating systemd-boot
When = PostTransaction
Exec = /usr/bin/bootctl update
  • Replace content of /boot/loader/loader.conf with:
default arch
timeout 3

A bigger font in the boot menu can be triggered by adding console-mode 1 in loader.conf.

  • Create /boot/loader/entries/arch.conf and add the boot entry:
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=e78ff23d-602b-442d-8bf1-c22f2ab2b0c7 rw

Insert PARTUUID directly into vim using:

 :r! blkid
  • Exit chroot and unmount:
exit
umount -R /mnt
  • Reboot
  • Enable, start and configure network:
systemctl enable wpa_supplicant
systemctl enable NetworkManager
systemctl start wpa_supplicant
systemctl start NetworkManager
nmcli device wifi connect ESSID password PASSPHRASE

A minimal Arch Linux system should now be configured.


References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment