-
-
Save alexandergknoll/995ecdc34fa52be467339e46d7c04ce0 to your computer and use it in GitHub Desktop.
Install Arch Linux on XPS 13 9360
This file contains hidden or 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 13 (9360) | |
| # Please also consult official documentation: | |
| # https://wiki.archlinux.org/index.php/Installation_Guide | |
| # https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360) | |
| # Boot from the usb. | |
| # F12 to enter boot menu | |
| # 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 +100%FREE vg0 --name home | |
| 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 base-devel 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/America/Chicago /etc/localtime | |
| hwclock --systohc | |
| # Generate required locales | |
| nano /etc/locale.gen # Uncomment "en_US.UTF-8" | |
| locale-gen | |
| # Set locale | |
| echo 'LANG=en_US.UTF-8' > /etc/locale.conf | |
| # Set font for readability | |
| echo 'FONT=latarcyrheb-sun32' > /etc/vconsole.conf | |
| # Set the hostname | |
| echo '<hostname>' > /etc/hostname | |
| # Add to hosts | |
| echo '127.0.0.1 <hostname>.localdomain <hostname>' >> /etc/hosts | |
| # Set password for root | |
| passwd | |
| # Add real user | |
| useradd -m -g users -G wheel -s /bin/bash <username> | |
| passwd <username> | |
| echo '<username> ALL=(ALL) ALL' > /etc/sudoers.d/<username> | |
| # Add swap file | |
| fallocate -l 24G /swapfile | |
| chmod 600 /swapfile | |
| mkswap /swapfile | |
| swapon /swapfile | |
| nano /etc/fstab # Add entry for swapfile to fstab | |
| --- | |
| /swapfile none swap defaults 0 0 | |
| --- | |
| # Configure mkinitcpio with modules needed for the initrd image | |
| nano /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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment