-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.txt
More file actions
131 lines (99 loc) · 3.18 KB
/
install.txt
File metadata and controls
131 lines (99 loc) · 3.18 KB
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
# Installation on Dell XPS
# Please also consult official documentation:
# https://wiki.archlinux.org/index.php/Installation_Guide
# https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360)
# https://wiki.archlinux.org/index.php/Dell_XPS_15_(9550)
# Enter BIOS with F2 and configure:
# - "System Configuration" > "SATA Operation": "AHCI"
# - "Secure Boot" > "Secure Boot Enable": "Disabled"
# Enter boot menu with F12, and boot the Arch USB medium
# 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 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 +80%FREE vg0 --name home # 80% leaves some space for snapshots
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 zsh vim git 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/Europe/Zurich /etc/localtime
hwclock --systohc
# Generate required locales
vi /etc/locale.gen # Uncomment desired locales, e.g. "en_US.UTF-8", "de_CH.UTF-8"
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>
# Configure mkinitcpio with modules needed for the initrd image
vi /etc/mkinitcpio.conf
# Add 'ext4 dm_snapshot' to MODULES
# Change: HOOKS="base systemd autodetect modconf block keyboard sd-vconsole sd-encrypt sd-lvm2 filesystems"
# 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