-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharch-install-xps9370
149 lines (116 loc) · 4.05 KB
/
arch-install-xps9370
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Arch Linux Installation on Dell XPS 13 9370
# Please also consult official documentation:
# https://wiki.archlinux.org/index.php/Installation_Guide
# https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)
# If you want to dual boot Windows install that first
# Enter BIOS with F2 and configure:
# - "System Configuration" > "SATA Operation": "AHCI"
# - "System Configuration" > "Thunderbolt Adapter Configuration" > "Enable Thunderbolt Adapter Boot Support": "Enabled"
# - "System Configuration" > "Thunderbolt Adapter Configuration" > "Enable Thunderbolt Adapter Pre-boot Modules": "Enabled"
# - "Secure Boot" > "Secure Boot Enable": "Disabled"
# Enter boot menu with F12 and boot an Arch Linux live install image
# Set desired keymap
loadkeys uk
# Set large font
setfont latarcyrheb-sun32
# Connect to internet
wifi-menu
# Sync clock
timedatectl set-ntp true
# Create two partitions:
# 1 512MB EFI boot partition # Hex code ef00
# 2 100% Linux primary partiton (to be encrypted) # Hex code 8300
cgdisk /dev/nvme0n1
# Format EFI partition with Fat32 (replace B with boot partition number)
mkfs.fat -F32 /dev/nvme0n1pB
# Setup the encryption of the system (replace P with primary partition number)
cryptsetup luksFormat /dev/nvme0n1pP
cryptsetup open /dev/nvme0n1pP luks
# Create LVM partitions for /root and /home, no /swap
# 150GB root, 80% remaining space for home,
pvcreate /dev/mapper/luks
vgcreate vg0 /dev/mapper/luks
lvcreate -L 150G vg0 --name root
lvcreate -l +80%FREE vg0 --name home # 80% leaves some space for snapshots
# Format root and home
mkfs.ext4 /dev/mapper/vg0-root
mkfs.ext4 /dev/mapper/vg0-home
# Mount the new filesystem on /mnt
mount /dev/mapper/vg0-root /mnt
mkdir /mnt/home
mount /dev/mapper/vg0-home /mnt/home
mkdir /mnt/boot
mount /dev/nvme0n1pB /mnt/boot
# Install the base system plus a few packages
pacstrap /mnt base zsh vim git sudo make 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 (improve SSD performance)
vim /mnt/etc/pacman.conf
# Enter the new system
arch-chroot /mnt
# Set time
rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
hwclock --systohc
# Uncomment desired locales, e.g. "en_GB.UTF-8", "en_US.UTF-8"
vim /etc/locale.gen
# Generate locales
locale-gen
# Set desired locale
echo 'LANG=en_GB.UTF-8' > /etc/locale.conf
# Set desired keymap and font
echo 'KEYMAP=uk' > /etc/vconsole.conf
echo 'FONT=latarcyrheb-sun32' >> /etc/vconsole.conf
# Set the hostname
echo '<hostname>' > /etc/hostname
# Add to hosts
echo '127.0.1.1 <hostname>.localdomain <hostname>' >> /etc/hosts
# Set password for root
passwd
# Add real user
useradd -m -g users -G wheel -s /bin/zsh <username>
passwd <username>
echo '<username> ALL=(ALL) ALL' > /etc/sudoers.d/<username>
# Enable additional pacman repositories
vim /etc/pacman.conf
# Uncomment multilib repository (Official repo, for 32-bit support):
# [multilib]
# Include = /etc/packan.d/mirrorlist
# Add archlinuxfr repository (Unoffical repo, for yaourt)
# [archlinuxfr]
# SigLevel = Never
# Server = http://repo.archlinux.fr/$arch
# enable automatic wifi connection (replace wlp2s0 with interface name)
systemctl enable [email protected]
# Configure mkinitcpio with modules needed for the initrd image
vim /etc/mkinitcpio.conf
# Add 'ext4 dm_snapshot' to MODULES
# Change: HOOKS=(base udev systemd autodetect modconf block keyboard sd-vconsole sd-encrypt sd-lvm2 filesystems usb usbinput)
# 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/nvme0n1pP`
---
/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