Skip to content

Instantly share code, notes, and snippets.

@blancNoir
Forked from brammitch/arch_install.sh
Last active February 7, 2019 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blancNoir/1d79bf5510d70f67b3dfb61dc715a8ec to your computer and use it in GitHub Desktop.
Save blancNoir/1d79bf5510d70f67b3dfb61dc715a8ec to your computer and use it in GitHub Desktop.
Install Arch Linux on Dell XPS 13 (9360)
# Resources
https://wiki.archlinux.org/index.php/installation_guide
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 512MiB EFI partition (ef00)
# Create 8GiB swap partition (8200)
# Create 100% LVM partition (8e00)
# Exit cgdisk
# Format boot partition
mkfs.fat -F32 /dev/nvme0n1p1
# 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 100%FREE 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_gv/lv_home /mnt/home
# Mount 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/xps_vg/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment