Forked from marc-fez/dell-XPS-15-arch-linux-install
Last active
November 6, 2022 12:05
-
-
Save basriciftci/bc5ded81d081af1e841d51f9ef434ef0 to your computer and use it in GitHub Desktop.
Instructions for installing arch linux on a Dell XPS 15 9570
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
# Arch wiki page on XPS 15 | |
# https://wiki.archlinux.org/index.php/Dell_XPS_15_9570 | |
# Install ARCH Linux with UEFI on Dell XPS 15, I didn't prefer encrypted file system. you may find several examples of it | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Use balenaetcher to create a bootable installation stick. | |
# Download it from https://www.balena.io/etcher/ | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Check network cards and be sure that you have wifi-card | |
ip link | |
# wifi-menu is deprecated, iwctl is used instead. check this out https://wiki.archlinux.org/index.php/Iwd#iwctl | |
iwctl | |
[iwd]# -> device list # list devices, note the device name. e.g. wlan0 | |
[iwd]# -> station {device} scan # scan the networks, e.g {device} is wlan0 | |
[iwd]# -> station {device} get-networks | |
[iwd]# -> station device connect SSID # asks for passphrase if needed. | |
exit # done here | |
# Test network | |
ping google.com | |
# Increase font size | |
pacman -S nano terminus-font | |
pacman -Ql terminus-font | |
setfont ter-v32n | |
# Find the main HD | |
fdisk -l | |
# Create partitions | |
cgdisk /dev/nvme0n1 | |
1 250MB EFI partition # Hex code ef00 | |
2 500MB Boot partition # Hex code 8300 | |
3 30GB Swap partition # Hex code 8200 | |
3 100% size partiton # Hex code 8300 | |
# Format disks | |
mkfs.vfat -F32 /dev/nvme0n1p1 | |
mkfs.ext2 /dev/nvme0n1p2 | |
mkswap /dev/nvme0n1p3 | |
mkfs.ext4 /dev/nvme0n1p4 | |
# Mount the new system | |
mount /dev/nvme0n1p4 /mnt | |
mkdir /mnt/boot | |
mount /dev/nvme0n1p2 /mnt/boot | |
mkdir /mnt/boot/efi | |
mount /dev/nvme0n1p1 /mnt/boot/efi | |
# Install the system also includes stuff needed for starting wifi when first booting into the newly installed system | |
# Unless vim and zsh are desired these can be removed from the command | |
pacstrap /mnt base base-devel grub-efi-x86_64 zsh nano git efibootmgr dialog wpa_supplicant mkinitcpio | |
# Do not forget install linux and linux-firmware, otherwise you may have some driver problems | |
pacstrap /mnt linux linux-firmware | |
# 'install' fstab | |
genfstab -pU /mnt >> /mnt/etc/fstab | |
# Make /tmp a ramdisk (add the following line to /mnt/etc/fstab) | |
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |
# Change relatime on all non-boot partitions to noatime (reduces wear if using an SSD) | |
# Enter the new system | |
arch-chroot /mnt /bin/bash | |
# Setup system clock | |
ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/localtime | |
hwclock --systohc --utc | |
# Set the hostname | |
echo MYHOSTNAME > /etc/hostname | |
# Update locale | |
echo LANG=en_GB.UTF-8 >> /etc/locale.conf | |
echo LANGUAGE=en_US >> /etc/locale.conf | |
echo LC_ALL=C >> /etc/locale.conf | |
# Set password for root | |
passwd | |
# Add real user remove -s flag if you don't whish to use zsh | |
useradd -m -g users -G wheel,storage,power -s /bin/bash MYUSERNAME | |
passwd MYUSERNAME | |
# Configure mkinitcpio with modules needed for the initrd image | |
vim /etc/mkinitcpio.conf | |
# Add 'ext4' to MODULES | |
# Regenerate initrd image | |
mkinitcpio -p linux | |
# Setup grub | |
grub-install | |
# In /etc/default/grub edit the line GRUB_CMDLINE_LINUX_DEFAULT | |
# Tried a bunch of different acpi parameters, acpi_osi=Linux, acpi_osi=! acpi_osi="Windows 2009", acpi_osi="!Windows 2015" | |
# Finally settled on acpi acpi_rev_override=5 but to be perfectly honest, no idea what it's actually doing. | |
# edit the line GRUB_CMDLINE_LINUX_DEFAULT and add acpi and nouvea blacklist command | |
acpi_rev_override=5 nouveau.modeset=0 | |
# then run: | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# Exit new system and go into the cd shell | |
exit | |
# Unmount all partitions | |
umount -R /mnt | |
swapoff -a | |
# Reboot into the new system, don't forget to remove the cd/usb | |
reboot | |
# Log in | |
# Escalate to root | |
su | |
# Add user to sudoers file | |
visudo | |
# Uncommment line %wheel ALL=(ALL) ALL | |
# return to regular user | |
exit | |
# connect to wifi | |
sudo iwctl | |
# Update | |
sudo pacman -Fy | |
sudo pacman -Syu | |
# if the kernel updates, reboot | |
sudo reboot | |
# Install linux headers to install from AUR | |
sudo pacman -S linux-headers | |
# Download and build uau for AUR installations run this section as normal user (NOT sudo) | |
git clone https://aur.archlinux.org/yay.git | |
cd aurman | |
makepkg -si | |
# Install xorg | |
sudo pacman -S xorg xorg-server xorg-xrandr | |
# Install nvidia driver | |
# May be prompted to select the Repository extra, only one that worked for me was libglvnd | |
sudo pacman -S nvidia | |
# Install cuda and cudnn drivers for deep learning frameworks | |
# May be prompted to select the Repository extra, only one that worked for me was libglvnd | |
sudo pacman -S cuda cudnn | |
# I'm going to install gnome desktop, install whatever you want here | |
sudo pacman -S gnome | |
# enable lightdm service | |
sudo systemctl enable gdm.service | |
# start lightdm service | |
sudo systemctl start gdm.service | |
# install bumblebee and enable the service | |
# https://wiki.archlinux.org/index.php/Bumblebee#Installation | |
# adding xf86-video-intel to hopefully enable external hdmi monitor | |
sudo pacman -S bumblebee mesa xf86-video-intel | |
# add user to bumblebee group | |
sudo gpasswd -a <user name> bumblebee | |
# enable bumblebee service | |
sudo systemctl enable bumblebeed.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment