Skip to content

Instantly share code, notes, and snippets.

@kvnxiao
Last active April 24, 2020 18:32
Show Gist options
  • Save kvnxiao/bf31b8ad2f866e84ae3f1b68d4509e8d to your computer and use it in GitHub Desktop.
Save kvnxiao/bf31b8ad2f866e84ae3f1b68d4509e8d to your computer and use it in GitHub Desktop.
arch-linux-install-xps-15-9550.md

Arch Linux wiki for Dell XPS 15 9550

https://wiki.archlinux.org/index.php/Dell_XPS_15_(9550)

Introduction


1. Download to USB

  1. Download the official Arch Linux ISO from https://www.archlinux.org/download/
  2. Copy to a USB drive

2. BIOS Settings

  1. Disable secure boot on XPS 15
  2. Ensure that the NVMe SSD is set to AHCI mode instead of RAID
  3. Boot from the USB

3. Pre-installation

  1. Set keyboard layout if necessary. Defaults to US keyboard layout.
    • ls /usr/share/kbd/keymaps/**/*.map.gz list available keyboard layouts
    • loadkeys $LAYOUT loads keyboard layout -- replace $LAYOUT with layout
  2. Connect to WiFi
    • wifi-menu (verify internet connection by pinging wiki.archlinux.org or google.com)
  3. Update system clock
    • timedatectl set-ntp true
  4. Disk Partitioning
    • fdisk -l Find the main disk drive for partitioning
    • cgdisk $MAIN_DISK_DRIVE e.g. cgdisk /dev/nvme0n1
      example partitioning for dual-boot setup on a 512GB SSD
      • swap - about 8GB - hex code 8200 (for Linux swap)
      • root - about 64 GB - hex code 8304 (for Linux x86-64 root(/))
      • home - about 100 GB - hex code 8302 (for Linux /home)
      • rest of drive already taken up by Windows install
  5. Format and initialize partitions
    • mkfs.ext4 $ROOT_PARTITION e.g. /dev/nvme0n1p1
    • mkfs.ext4 $HOME_PARTITION e.g. /dev/nvme0n1p2
    • mkswap $SWAP_PARTITION e.g. /dev/nvme0n1p3
    • swapon $SWAP_PARTITION
  6. Mount the file systems
    • mount $ROOT_PARTITION /mnt
    • mount $HOME_PARTITION /mnt/home
    • mkdir -p /mnt/boot/efi
    • mount $EFI_PARTITION /mnt/boot/efi Mount the boot EFI partition. This is the drive partition that shows up with EFI label from fdisk -l

4. Installation

  1. Install to mounted partitions
    • pacstrap /mnt base base-devel linux linux-firmware git vim zsh efibootmgr refind-efi dialog wpa_supplicant
  2. Generate fstab
    • genfstab -U /mnt >> /mnt/etc/fstab
    • Ensure that the fstab contains declarations in /mnt/etc/fstab
  3. Enter the new system with chroot
    • arch-chroot /mnt /bin/bash use bash in chroot
  4. Setup system clock and timezone
    • ln -sf /usr/share/zoneinfo/REGION/CITY /etc/localtime set time zone, where REGION and CITY are dependent on your location
      • e.g. ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
    • hwclock --systohc generates /etc/adjtime for UTC
  5. Localization
    • uncomment en_US.UTF-8 UTF-8 and other locales in /etc/locale.gen, then run:
      • locale-gen
      • echo LANG=en_US.UTF-8 >> /etc/locale.conf
      • echo LC_ALL=C >> /etc/locale.conf
  6. Hostname
    • echo $HOSTNAME > /etc/hostname where $HOSTNAME is what you want as your host name
  7. Recreate initramfs (if necessary)
    • mkinitcpio -p linux
  8. Set root password
    • passwd
  9. Add a real user (use /bin/zsh for shell)
    • useradd -m -g users -G wheel -s /bin/zsh $USER_NAME
    • passwd $USER_NAME set user password

5. rEFInd Setup

NOTICE: When refind-install is run in chroot, /boot/refind_linux.conf is populated with kernel options from the live USB, not the one on which it is installed.

The below steps are to install rEFInd and fix the boot parameters since step 4.1 installs rEFInd from chroot

  1. Run refind-install script
    • refind-install
  2. Edit refind_linux.conf in /boot/ folder
    • Ensure that /boot/refind_linux.conf has the correct entries
      • e.g. "Boot using default options" "root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw add_efi_memmap"
  3. Exit chroot
    • exit
  4. Unmount and reboot to new system (remember to unplug the USB)
    • umount -R /mnt
    • swapoff -a
    • reboot

6. New system post-install setup

TODO

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