-
-
Save joebew42/85e8e29acc5918dacad1bbe596d6aaa2 to your computer and use it in GitHub Desktop.
Install Arch Linux on XPS 13 9360
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
# Installation on Dell XPS | |
# Please also consult official docu: | |
# https://wiki.archlinux.org/index.php/Installation_Guide | |
# https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360) | |
# https://wiki.archlinux.org/index.php/Dell_XPS_15_(9550) | |
# Disable the secure boot | |
# F2 to enter to UEFI setup, check `disable secure boot` under the `secure boot` section | |
# Save settings and exit | |
# Boot from the usb. | |
# F12 to enter boot menu | |
# Set Swiss German keymap | |
loadkeys de_CH-latin1 | |
# Set large font | |
setfont latarcyrheb-sun32 | |
# Connect to Internet | |
wifi-menu | |
# Sync clock | |
timedatectl set-ntp true | |
# Create two partitions: | |
# 1 512MB EFI partition # Hex code ef00 | |
# 2 100% Linux partiton (to be encrypted) # Hex code 8300 | |
cgdisk /dev/nvme0n1 | |
mkfs.fat -F32 /dev/nvme0n1p1 | |
# Setup the encryption of the system | |
cryptsetup luksFormat /dev/nvme0n1p2 | |
cryptsetup open /dev/nvme0n1p2 luks | |
# Create LVM partitions | |
# This creates partitions for root and /home, no /swap. | |
pvcreate /dev/mapper/luks | |
vgcreate vg0 /dev/mapper/luks | |
lvcreate -L 100G vg0 --name root | |
lvcreate -l +80%FREE vg0 --name home # 80% leaves some space for snapshots | |
mkfs.ext4 /dev/mapper/vg0-root | |
mkfs.ext4 /dev/mapper/vg0-home | |
# Mount the new system | |
# /mnt is the system to be installed | |
mount /dev/mapper/vg0-root /mnt | |
mkdir /mnt/home | |
mount /dev/mapper/vg0-home /mnt/home | |
mkdir /mnt/boot | |
mount /dev/nvme0n1p1 /mnt/boot | |
# Install the base system plus a few packages | |
pacstrap /mnt base fish vim git sudo efibootmgr wpa_supplicant dialog iw | |
# Generate fstab | |
genfstab -L /mnt >> /mnt/etc/fstab | |
# Verify and adjust /mnt/etc/fstab | |
# Change relatime on all non-boot partitions to noatime (reduces wear if using an SSD) | |
# Enter the new system | |
arch-chroot /mnt | |
# Setup time | |
ln -s /usr/share/zoneinfo/Europe/Zurich /etc/localtime | |
hwclock --systohc | |
# Generate required locales | |
vi /etc/locale.gen # Comment out "en_US.UTF-8", "de_CH.UTF-8" | |
locale-gen | |
# Set locale | |
echo 'LANG=en_US.UTF-8' > /etc/locale.conf | |
# Set keyboard layout and font | |
echo 'KEYMAP=de_CH-latin1' > /etc/vconsole.conf | |
echo 'FONT=latarcyrheb-sun32' >> /etc/vconsole.conf | |
# Set the hostname | |
echo '<hostname>' > /etc/hostname | |
# Add to hosts | |
echo '127.0.1.1 <hostname>.localdomain <hostname>' >> /etc/hosts | |
# Set password for root | |
passwd | |
# Add real user | |
useradd -m -g users -G wheel -s /bin/zsh <username> | |
passwd <username> | |
echo '<username> ALL=(ALL) ALL' > /etc/sudoers.d/<username> | |
# Configure mkinitcpio with modules needed for the initrd image | |
vi /etc/mkinitcpio.conf | |
# Add 'ext4 dm_snapshot' to MODULES | |
# Change: HOOKS="systemd autodetect modconf block keymap sd-encrypt sd-lvm2 filesystems keyboard" | |
# Regenerate initrd image | |
mkinitcpio -p linux | |
# Setup systemd-boot | |
bootctl --path=/boot install | |
# Enable Intel microcode updates | |
pacman -S intel-ucode | |
# Create bootloader entry | |
# Get luks-uuid with: `cryptsetup luksUUID /dev/nvme0n1p2` | |
--- | |
/boot/loader/entries/arch.conf | |
--- | |
title Arch Linux | |
linux /vmlinuz-linux | |
initrd /intel-ucode.img | |
initrd /initramfs-linux.img | |
options luks.uuid=<uuid> luks.name=<uuid>=luks root=/dev/mapper/vg0-root rw | |
--- | |
# Set default bootloader entry | |
--- | |
/boot/loader/loader.conf | |
--- | |
default arch | |
--- | |
# Exit and reboot | |
exit | |
reboot |
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
# Disable the Nvidia GPU on the XPS 15 | |
# Install intel graphics driver | |
sudo pacman -S xf86-video-intel | |
# Blacklist nvidia/nouveau drivers | |
--- | |
/etc/modprobe.d/nvidia.conf | |
--- | |
blacklist nvidia | |
blacklist nouveau | |
--- | |
# Follow the docu to "power down discrete GPU": | |
# https://wiki.archlinux.org/index.php/hybrid_graphics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment