Skip to content

Instantly share code, notes, and snippets.

@byronmansfield
Last active March 8, 2019 19:50
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 byronmansfield/9e0797c89866c520f4a6b7b9c0f26421 to your computer and use it in GitHub Desktop.
Save byronmansfield/9e0797c89866c520f4a6b7b9c0f26421 to your computer and use it in GitHub Desktop.
Dell XPS 9370 Arch Install
#
#
# Dell XPS 9370 Arch Install
#
#
# Arch Official Wiki - https://wiki.archlinux.org/index.php/Installation_guide
#
# Most of it follows the official guide and a few others
#
# heavily follows this guide for file system setup - https://pastebin.com/5gGCTchX
#
# Starting from USB Boot
# Set large font
> setfont latarcyrheb-sun32
# Connect to Internet
# If you don't have access to a direct connection via ether cable you can use wifi
> wifi-menu
OR
# Get internet from your Android by plugging in your cable and turning on tethering
> ip link
> dhcpcd enp...
# Partition the disk
> lsblk
# get the name of the partition. It should look something like /dev/nvme0n1
> cgdisk /dev/nvme0n1
# delete anything you don't want. Don't worry about the free space at the bottom or the free space at the top
# all creations will use default first sector
# Create 1 for the EFI boot - code is ef00 - size is 512M, or 750M, or 1024MB
# Create a second one for root and will take up the rest of the free space, use default code
# Then you [Write], type "yes", and then [Quit]
# Make the file system for EFI boot partition
> mkfs.fat -F32 /dev/nvme0n1p1
# Encrypt the root partition
> cryptsetup luksFormat /dev/nvme0n1p2
YES
( Type a passphrase and hit enter. Enter it a second time to verify )
> cryptsetup open --type luks /dev/nvme0n1p2 archlv
( Enter your passphrase )
> ls /dev/mapper/archlv
# Create the volumes
> pvcreate /dev/mapper/archlv
> vgcreate archvg /dev/mapper/archlv
> lvcreate -L2G archvg -n swap
> lvcreate -L10G archvg -n root
> lvcreate -l 100%FREE archvg -n home
> mkfs.ext4 /dev/mapper/archvg-root
> mkfs.ext4 /dev/mapper/archvg-home
> mkswap /dev/mapper/archvg-swap
> mount /dev/mapper/archvg-root /mnt
> mkdir /mnt/home
> mount /dev/mapper/archvg-home /mnt/home
> mkdir /mnt/boot
> mount /dev/sda1 /mnt/boot
> swapon /dev/mapper/archvg-swap
# Install the base arch system
## Setup the base packages
### This part I did not follow the arch wiki, I prefered this better
> pacman -S reflector
> reflector -c "United States" -f 12 -l 12 --verbose --save /etc/pacman.d/mirrorlist
> pacstrap /mnt base base-devel sudo vim
> ls /mnt
## Configure the filesystem table
> genfstab -p /mnt >> /mnt/etc/fstab
## Chroot
> arch-chroot /mnt
## Set the timezone
> ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
> hwclock --systohc --utc
# Generate required locales
> vim /etc/locale.gen # Uncomment desired locales, e.g. "en_US.UTF-8 UTF-8"
> locale-gen
> locale > /etc/locale.conf
## Set desired keymap and font
> echo 'KEYMAP=us' > /etc/vconsole.conf
> echo 'FONT=latarcyrheb-sun32' >> /etc/vconsole.conf
## Set the hostname
> echo '<hostname>' > /etc/hostname
> vim /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 <hostname>.localdomain <hostname>
## Set root password
> passwd
## Configure mkinitcpio
> vim /etc/mkinitcpio.conf
HOOKS=(base udev autodetect modconf block filesystems keyboard encrypt lvm2 fsck)
> mkinitcpio -p linux
# Configure systemd bootloader
> bootctl --path=/boot/ install
> vim /boot/loader/loader.conf
clear
default arch
timeout 5
editor 0
> vim /boot/loader/entries/arch.conf
title Arch Linux ENCRYPTED
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=:archlv root=/dev/mapper/archvg-root quiet rw
# vim magic: :read ! blkid /dev/nvme0n1p2
# enter UUID above
# Reboot
> exit
> umount -R /mnt
> reboot
# Congratulations you now have Arch installed.
# Now go continue to https://wiki.archlinux.org/index.php/Installation_guide#Post-installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment