Last active
April 3, 2024 16:30
-
-
Save brammitch/281e9a2f3aca57ae4a333fc63732f602 to your computer and use it in GitHub Desktop.
Install Arch Linux on Dell XPS 13 (9360) / Dual Boot with Windows 10
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
# Resources | |
https://wiki.archlinux.org/index.php/installation_guide | |
http://www.bhartiya.io/always-updated-arch-linux-tutorial/30411 | |
https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360) | |
http://www.rodsbooks.com/gdisk/cgdisk-walkthrough.html | |
# TO-DO | |
# Set up periodic TRIM for SSD | |
# 1 Pre-installation | |
# 1.1 Set the keyboard layout | |
# Increase font size to improve readability on QHD screen | |
setfont latarcyrheb-sun32 | |
# 1.2 Verify the boot mode | |
ls /sys/firmware/efi/efivars | |
# 1.3 Connect to the Internet | |
wifi-menu -o | |
# Test connection | |
ping -c 3 archlinux.org | |
# 1.4 Update the system clock | |
timedatectl set-ntp true | |
# Check service status | |
timedatectl status | |
# 1.5 Partition the disks | |
# EFI partition will not be created since we are dual booting with Windows 10 | |
# Existing EFI partition will be mounted to /boot | |
# Identify disks | |
lsblk | |
cgdisk /dev/nvme0n1 | |
# Create 8GiB swap partition (8200) | |
# Create 100% LVM partition (8e00) | |
# Exit cgdisk | |
# List devices for LVM | |
lvmdiskscan | |
# Create physical volume | |
pvcreate /dev/256GB_Y6UB50N2KMBU-part7 | |
# Verify physical volumes | |
pvdisplay | |
# Create volume group | |
vgcreate xps_vg /dev/256GB_Y6UB50N2KMBU-part7 | |
# Verify volume groups | |
vgdisplay | |
# Create logical volumes | |
lvcreate -L 40G xps_vg -n lv_root | |
lvcreate -L 40G xps_vg -n lv_home | |
# Verify logical volumes | |
lvdisplay | |
# 1.6 Format the partitions | |
# Format /root and /home as ext4 | |
mkfs.ext4 /dev/xps_vg/lv_root | |
mkfs.ext4 /dev/xps_vg/lv_home | |
# Setup swap partition | |
mkswap /dev/nvme0n1p6 | |
# 1.7 Mount the file systems | |
# Enable swap | |
swapon /dev/nvme0n1p6 | |
# Mount /root | |
mount /dev/xps_vg/lv_root /mnt | |
# Mount /home | |
mkdir /mnt/home | |
mount /dev/xps_vg/lv_home /mnt/home | |
# Mount existing EFI partition | |
mkdir /mnt/boot | |
mount /dev/nvme0n1p1 /mnt/boot | |
# 2 Installation | |
# 2.1 Select mirrors | |
# Edit mirros list, put United States first | |
vi /etc/pacman.d/mirrorlist | |
# 2.2 Install the base packages | |
pacstrap /mnt base vim git efibootmgr wpa_supplicant iw zsh dialog sudo binutils make base-devel | |
# 3 Configure the system | |
# 3.1 Fstab | |
# Generate an fstab file | |
genfstab -L /mnt >> /mnt/etc/fstab | |
# Verify and adjust /mnt/etc/fstab | |
# 3.2 Chroot | |
# Change root into the new system | |
arch-chroot /mnt | |
# 3.3 Time zone | |
# Set the time zone | |
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime | |
# Generate /etc/adjtime | |
hwclock --systohc | |
# 3.4 Locale | |
# Uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen and generate them with | |
locale-gen | |
# Set the LANG variable in /etc/locale.conf | |
echo 'LANG=en_US.UTF-8' > /etc/locale.conf | |
# Set keyboard font | |
echo 'FONT=latarcyrheb-sun32' > /etc/vconsole.conf | |
# 3.5 Hostname | |
echo 'arch-xps' > /etc/hostname | |
vi /etc/hosts | |
127.0.1.1 xps.localdomain xps | |
# 3.6 Network configuration | |
# 3.7 Initramfs | |
# Get rid of errors for psmouse | |
echo 'blacklist psmouse' >> /etc/modprobe.d/modprobe.conf | |
# Configure mkinitcpio | |
vi /etc/mkinitcpio.conf | |
# Update HOOKS="..." to add: systemd keymap sd-lvm2 | |
# Update FILES="/etc/modprobe.d/modprobe.conf" | |
# Generate initrd image | |
mkinitcpio -p linux | |
# 3.8 Root password | |
passwd | |
# Add user | |
useradd -m -g users -G wheel -s /bin/zsh <username> | |
# Set password | |
passwd <username> | |
# Add to sudoers | |
echo '<username> ALL=(ALL) ALL' > /etc/sudoers.d/<username> | |
# 3.9 Boot loader | |
# Setup systemd-boot | |
bootctl --path=/boot install | |
# Enable Intel microcode updates | |
pacman -S intel-ucode | |
# Create bootloader entry | |
vi /boot/loader/entries/arch.conf | |
title Arch Linux | |
linux /vmlinuz-linux | |
initrd /intel-ucode.img | |
initrd /initramfs-linux.img | |
options root=/dev/xp_svg/lv_root rw | |
# Set default bootloader entry | |
vi /boot/loader/loader.conf | |
timeout 8 | |
default arch | |
editor 0 | |
# 4 Reboot | |
exit | |
umount -R /mnt | |
reboot | |
# 5 Post-installation | |
# Login as root | |
# Connect to wifi | |
wifi-menu -o | |
# Name profile | |
netctl enable <profile> | |
# Install Intel graphic drivers | |
pacman -S xf86-video-intel | |
# Install pacaur | |
su - <username> | |
mkdir aur | |
cd aur | |
git clone https://aur.archlinux.org/cower.git | |
cd cower | |
makepkg -si --skipinteg | |
cd .. | |
git clone https://aur.archlinux.org/pacaur.git | |
cd pacaur | |
makepkg -si | |
# Adjust xrandr scaling with Gnome set at 200% | |
xrandr --output eDP1 --scale 1.25x1.25 --panning 4000x2250+0+0 |
Thanks @matteobucci! I'm still running off this same install after nearly 3 years, so I'm not sure if this gist is relevant or helpful these days, but at least the typos are fixed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On my xps Xorg is crashing. If you have the same problem install bumblebee.