My latest laptop, a Dell XPS 15 9550, is a charm. For nearly one year I’m using it now, it never failed. Its screen is gorgeous, its autonomy allows me to write software while commuting in the morning and in the evening and yet there is still plenty of juice to go on for a 2-3 hour duty during the night.
I had a previous setup with Windows 10 and WSL that was quite flexible. But even then, it never felt like the real thing. So I tried to install Ubuntu some months ago but I got disappointed. Taming the 4K display was a challenge that I was unprepared for so I switched back to Windows 10 for 6 months.
Recently, I thought it was worth giving it a new try. But this time, I wanted to test another Linux distrib I had heard of: Arch Linux. When I looked at the install manual, it reminded me of the old time when I was working with Gentoo. When every change you wanted to implement on a machine was going to take you a fair amount of time. But nevertheless, I gave it a try. And now, I’m very pleased with the achieved result. Which is why I’ll share with you how I set up my XPS 15 with dual boot windows 10 and Arch Linux.
First thing first, to create yourself a USB key with Arch Linux installer. I followed the instruction on this page. It just worked without surprise.
Second, you need to get your BIOS settings right in order. The instructions are available from Arch Linux WIKI page devoted to the Dell XPS 15 in the Pre-installation system settings:
Prior to installation, access the system UEFI firmware by pressing F2 during boot.
Turn off legacy ROM
System -> SATA: change to AHCI
Secure Boot: disable
POST Behavior: Fastboot: Thorough
Once this is done and you’re sure you can still boot your Windows install, you boot into Windows 10, start the Disk Management utility, and shrink the Windows partition (the latest one, DO NOT TOUCH the rescue or UEFI partitions) to make some room for Arch Linux.
You can now reboot with you USB key plugged in. After the Arch Linux installer booted, it started to complain because it could not find my USB key (I still think this is kind of schizophrenic behaviour, given the system complaining was started … from the USB key). I had it already when trying to install Ubuntu. The simplest way I found to fix this is to unplug the USB key as soon as the complaint starts and to plug it back after 2-3 seconds. This might be just a quirk on my machine, I never got a chance to test it on another one.
Once the console starts, equip yourself with a pair of good eyes. You’re gonna need them for some time as the console font looks very tiny on my 4K display.
# The keyboard is now configured as US qwerty. If this is not what you've got, you first need to change it.
# Replace the be-latin1 with whatever you need.
# Next I setup my WiFi. As I replaced my WiFi card with an Intel one, your own device might have a different name.
ip link set wlp2s0 up
# Replace YOUR_SSID and YOUR_PASSPHRASE in the following command with your own values.
wpa_supplicant -B -i wlp2s0 -c <(wpa-passphrase “YOUR_SSID” “YOUR_PASSWORD”)
Once you’ve got a usable keyboard mapping and you’re connected on the Internet, the next step is to create partitions. I wanted to start with a very simple structure but feel free to be as creative as you want. Just remember that if you don’t use the same structure as mine, you’ll have to change the partition numbers in the following commands.
# There I created a swap partition with the following key sequence: n .. 5 .. .. +16G .. 8200
# and a main partition with: n .. .. .. ..
# Let's not forget to write the partition table (w) and then exit gdisk.
mount /dev/nvme0n1p6 /mnt
# The next partition I'm gonna mount is the UEFI one so that I can use systemd-boot to dual boot.
# I was a bit worried that it would ruin my Windows bootloader, but it went perfectly fine.
mount /dev/nvme0n1p2 /mnt/boot
pacstrap /mnt base base-devel zsh vim git wpa_supplicant iw intel-ucode dialog xf86-video-intel nvidia libinput
genfstab -L /mnt >> /mnt/etc/fstab
From now on, we’re in a chrooted environment. It looks like our target system, but we’re still running within the Linux kernel of the installer. What we’re going to do now is to customize everything according to our location, keymap and so on. I’m living in Belgium with an azerty keyboard and I like my Linux in English. If you have different preferences, adapt what follows.
ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime
# Uncomment the wanted locales. My own choice was en_US.UTF-8 and fr_BE.UTF-8
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=be-latin1" > /etc/vconsole.conf
echo "YOUR_HOSTNAME" > /etc/hostname
# Add a line with your hostname.
# e.g. 127.0.1.1 YOUR_HOSTNAME.YOUR_DOMAIN YOUR_HOSTNAME
# Connect to your WiFi, following the wizard instructions.
# Setup your root password
cat << 'EOF' > /etc/pacman.d/hooks/systemd-boot.hook
# Write down the output of the following command as you'll need it just afterwards but won't be able to see it anymore.
blkid -s PARTUUID -o value /dev/nvme0n1p6
cat << 'EOF' > /boot/loader/entries/arch.conf
title Arch Linux
options root=PARTUUID=OUTPUT_FROM_PREVIOUS_CMD rw i915.edp_vswing=2 acpi_backlight=none acpi_rev_override=1
echo "blacklist nouveau" > /etc/modprobe.d/nvidia.conf
echo "blacklist synaptics" > /etc/modprobe.d/touchpad.conf
cat << 'EOF' > /etc/X11/xorg.conf.d/30-touchpad.conf
Option "Tapping" "on"
Option "Natural Scrolling" "on"
That should be it. You can:
* cross your fingers and hope it will boot again
* listen to this: Bob Marley – Everything’s gonna be alright
(I’m not sure of the sequence of these steps but, usually, I find it easier to type with my fingers not crossed.)
I will write later on how to get a GUI environment as there are some tricks here and there because of the screen.