-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharch-linux-installation-instructions.txt
283 lines (200 loc) · 10.8 KB
/
arch-linux-installation-instructions.txt
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
Generic installation and post-installation instructions for Arch Linux
===========================================================================================================
=======================================
Installation
=======================================
+++SYSTEM
--- SET UP AND BOOT INSTALLATION MEDIA
-Download the Arch Linux ISO and copy it to a storage media like a flash drive. (See
https://wiki.archlinux.org/index.php/USB_flash_installation_media#In_Windows)
-Make sure the computer hardware clock is set to UTC time (this will eventually be needed when setting the local
time).
-Connect the computer to the internet via ethernet and boot Arch Linux using the storage media.
--- PREPARE STORAGE DEVICE
(Note: This is probably the hardest part in the installation guide and may require some extra research).
-Create the correct partitions using a partitioning tool if not already created (see the Arch Linux wiki for
partitioning tools; possibly the easiest one to use is fdisk). Print the current partitions on the drive with
'lsblk -f'. The partitions can be set up as follows for example:
[Label] [Mount Point] [FS Type] [Size]
arch-root / ext4 30 GB
arch-swap [none] linux-swap 8 GB
arch-usr-local /usr/local ext4 30 GB
arch-home /home ext4 50 GB
-Print the device name (e.g. sda1) of each partition on the drive:
> lsblk -f
-Set up and activate the swap partition:
> mkswap /dev/sdxY
> swapon /dev/sdxY
-Mount the root partition ("/") to the /mnt directory of the live system:
> mount /dev/sdxY /mnt
-Create directories for and mount remaining partitions (order does not matter). For example, run the following for
the "/home" partition:
> mkdir -p /mnt/home
> mount /dev/sdxY /mnt/home
--- INSTALL ARCH LINUX BASE PACKAGE
-Run the following (use -i option to ensure prompting before package installation):
> pacstrap /mnt base base-devel
-If an error occurs regarding keys, run the following and rerun the previous command:
> pacman -Sy archlinux-keyring
--- CONFIGURATION
1. FSTAB
-Generate fstab:
> genfstab -U /mnt > /mnt/etc/fstab
2. CHROOT
-Chroot to the new system:
> arch-chroot /mnt /bin/bash
3. VIM TEXT EDITOR (OPTIONAL; CAN BE USED OVER NANO IN THE NEXT STEPS)
> pacman -S vim
4. LOCALE
-Edit /etc/locale.gen and uncomment "en_US.UTF-8 UTF-8".
-Run the following:
> locale-gen
-Add "LANG=en_US.UTF-8" to /etc/locale.conf where LANG is the first column of an uncommented entry in
/etc/locale.gen:
> echo "LANG=en_US.UTF-8" > /etc/locale.conf
5. TIME
-Select a time zone:
> tzselect
-Create the symbolic link /etc/localtime, where Zone/Subzone is the TZ value from tzselect:
> ln -s /usr/share/zoneinfo/Zone/SubZone /etc/localtime
-Adjust the time skew and set the time standard to UTC:
> hwclock --systohc --utc
6. GRUB BOOT LOADER
(To use a specific boot loader for UEFI/GPT, continue to the next step).
-Install the grub package. To search for other operating systems, also install os-prober:
> pacman -S grub os-prober
-Install the bootloader to the drive Arch was installed to (if this does not work, follow the steps under GRUB
BOOT LOADER in the TROUBLESHOOTING section):
> grub-install --recheck /dev/sda
-Generate grub.cfg:
> grub-mkconfig -o /boot/grub/grub.cfg
7. ALTERNATE BOOT LOADER FOR UEFI/GPT
-Run the following:
> bootctl install
-Create a boot entry in /boot/loader/entries/arch.conf, replacing /dev/sda2 with the root partition:
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sda2 rw
-Modify /boot/loader/loader.conf to select the default entry (without .conf) suffix:
timeout 3
default arch
8. NETWORK
-Choose a hostname for the system and add it in /etc/hostname.
> echo '<hostname>' > /etc/hostname
-Append the same hostname to localhost entries in /etc/hosts (i.e. add it after the last "localhost" in each
line).
-Get interface device names:
> ls /sys/class/net
-Enable the dhcpcd service for the wired connection:
> systemctl enable dhcpcd@<interface>.service
9. FINISH AND REBOOT
-Set the root password:
> passwd
-Exit from the chroot environment:
> exit
-Reboot the computer:
> reboot
+++TROUBLESHOOTING
--- GRUB BOOT LOADER
-Install "efibootmgr" and create the "efi" directory under /boot:
> pacman -S efibootmgr && mkdir /boot/efi.
-Mount the EFI system boot partition on /boot/efi. This partition should be formatted as fat32 (vfat) or fat16.
-Install grub:
> grub-install --root-directory=/ --efi-directory=/boot/efi --recheck /dev/sda
-Unmount /boot/efi and delete it:
> umount /boot/efi && rm -Rf /boot/efi
=======================================
Post-installation
=======================================
+++PART 1: SYSTEM INITIALIZATION
--- SET UP
-Edit /etc/pacman.conf and uncomment the following lines:
#[multilib]
#Include = /etc/pacman.d/mirrorlist
-Download and refresh package databases from the server:
> pacman -Syy
-Change permissions for /etc/sudoers:
> chmod 660 /etc/sudoers
-Edit /etc/sudoers by finding and uncommenting the following lines to allow the 'sudo' command to work without a
password (optional):
# %wheel ALL=(ALL) ALL
... ... ...
# %wheel ALL=(ALL) NOPASSWD: ALL
-Disable the PC speaker from making loud beeps (optional; reboot is required):
> echo 'blacklist pcspkr' > /etc/modprobe.d/blacklist.conf
-Create the primary system user:
> useradd -m -G storage,power,wheel <username>
-Set the primary system user's password:
> passwd <user>
--- INITIAL APPLICATIONS AND DRIVERS
-Install the following basic applications (Estimated time: 4 minutes):
> pacman -S gedit xclip wget rfkill chromium
-Install the graphics driver needed using 'pacman -S':
-mesa (any graphics card but does not have the best performance)
-xf86-video-ati (AMD/ATI graphic cards)
-xf86-video-nouveau (NVIDIA graphics card; consider also the proprietary driver)
+++PART 2: GRAPHICAL USER INTERFACE
--- XORG AND XFCE4
-Install Xorg:
> pacman -S xorg-server xorg-xinit alsa-utils
(Note: At this point, 'startx' will start the generic Xorg desktop environment. These are additional Xorg components
that can be installed: xorg-twm xorg-xclock).
-Install the xterm terminal emulator:
> cd /tmp && wget ftp://invisible-island.net/xterm/xterm.tar.gz && tar xzf xterm.tar.gz && cd xterm-* && sudo cd $PWD && ./configure --prefix=/usr --enable-256-color --enable-88-color --enable-wide-chars --enable-sixel-graphics && sudo make -C $PWD install
-Install the xfce4 desktop environment:
> pacman -S xfce4 xfce4-goodies xfce4-notifyd
-Install some common system fonts:
> pacman -S terminus-font ttf-freefont ttf-anonymous-pro adobe-source-code-pro-fonts ttf-inconsolata ttf-hack ttf-fira-sans
-Reboot the computer.
-Sign in as regular user and run 'startxfce4'.
-Open a terminal emulator; this can be done from the applications menu or right clicking on the desktop.
--- DEVICE MOUNTING AND AUTOMOUNTING
-Install device mounting and automounting software:
> pacman -S --noconfirm udisks2 udiskie
+++PART 3: SYSTEM CONFIGURATION
--- RAISE KERNEL INOTIFY WATCH LIMIT (OPTIONAL)
-Log in as root (with 'sudo -i') and run the following:
> echo 524288 | tee /proc/sys/fs/inotify/max_user_watches
+++PART 4: SYSTEM SOFTWARE
--- BYPASS GRUB MENU ON BOOT (OPTIONAL; THIS ALLOWS GRUB TO INSTANTLY BOOT TO ARCH LINUX AND SKIP THE MENU)
-Run the following as a regular (non-root) user:
> cd /tmp && wget https://aur.archlinux.org/cgit/aur.git/snapshot/grub-holdshift.tar.gz && tar -xzf grub-holdshift.tar.gz && cd grub-holdshift && makepkg -s && sudo pacman -U --noconfirm $PWD/grub-holdshift-*-any.pkg.tar.xz && sudo grub-mkconfig -o /boot/grub/grub.cfg
--- YAOURT (Yet AnOther User Repository Tool)
-Install package-query first (run as regular user):
> cd /tmp && wget https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz && tar -xzf package-query.tar.gz && cd package-query/ && makepkg -s --noconfirm && sudo pacman -U --noconfirm $PWD/package-query-*-x86_64.pkg.tar.xz
-Install yaourt (run as regular user):
> cd /tmp && wget https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz && tar -xzf yaourt.tar.gz && cd yaourt/ && makepkg -s && sudo pacman -U --noconfirm $PWD/yaourt-*-any.pkg.tar.xz
--- JDK
-Install JDK 7:
> yaourt -S --noconfirm jdk7
-Install JDK 8:
> cd /tmp && wget https://aur.archlinux.org/cgit/aur.git/snapshot/jdk.tar.gz && tar -xf jdk.tar.gz && cd jdk && makepkg -s --noconfirm && sudo pacman -U --noconfirm $PWD/jdk-8*-x86_64.pkg.tar.xz
-Change default Java environment to JDK 7 (or JDK 8 if preferred):
> archlinux-java set java-7-jdk
--- PYTHON
-Install python pip package management system:
> pacman -S --noconfirm python-pip
--- NETWORKING
-Install basic network applications and utilities:
> pacman -S --noconfirm wpa_supplicant networkmanager network-manager-applet
-Enable Network Manager's service (run as root):
> systemctl enable NetworkManager.service && systemctl start NetworkManager.service
+++PART 5: DRIVER INSTALLATION (EXAMPLES ONLY)
--- TP-LINK AC1200 WI-FI ADAPTER
-Install the Realtek 8812au chipset driver:
> yaourt -S --noconfirm rtl8812au
--- INTEL® DUAL BAND WIRELESS-N 7265 CARD
-Run the following as root:
> cd /tmp && wget https://wireless.wiki.kernel.org/_media/en/users/drivers/iwlwifi-3160-ucode-25.17.12.0.tgz && tar -zxf iwlwifi-3160-ucode-25.17.12.0.tgz && cd iwlwifi-3160-ucode-25.17.12.0 && cp iwlwifi-*.ucode /lib/firmware
+++PART 6: TROUBLESHOOTING
--- LAPTOP TOUCHPAD (SYNAPTICS INTERFACE) NOT WORKING
-Run the following as root:
> pacman -S --noconfirm xf86-input-synaptics
-See the Arhc Linux synaptic wiki page on setting up the following file: /etc/X11/xorg.conf.d/50-synaptics.conf
--- SOUND NOT WORKING
-Create file "/etc/modprobe.d/alsa.conf" and add the following lines:
options snd_hda_intel enable=0,1
options snd slots=snd_hda_intel,thinkpad_acpi
options snd_hda_intel index=0
options thinkpad_acpi index=1