-
Notifications
You must be signed in to change notification settings - Fork 1
/
linux_arch_xfce_install.txt
199 lines (139 loc) · 4.27 KB
/
linux_arch_xfce_install.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
https://wiki.archlinux.org/index.php/beginners%27_guide#Installation
1. ping -c3 www.google.com
2. Make the install process friendlier :) {{{1
loadkeys uk # /usr/share/kbd/keymaps/
systemctl start gpm
3. Partitioning of a 500GB hard drive {{{1
disk=sda
fdisk/gdisk /dev/"$disk"
(d)elete all partitions
* boot: /dev/sd_1: (n)ew, (p)rimary, +1G, (t)ype ef00, (a) bootable
* swap: /dev/sd_2: (n)ew, (p)rimary, +6G, (t)ype 8200
* root: /dev/sd_3: (n)ew, (p)rimary, +20G
* LVM: /dev/sd_4: (n)ew, (p)rimary, (t)ype 8e00
(p)rint, (w)rite
Note: (p)rimary and (a) are not relevant with gdisk
}}}1
4. reboot # or the new partitions are not seen!
5. Creating Filesystems {{{1
* mkfs.fat -F32 /dev/"$disk"1 # boot (UEFI system)
OR
mkfs.ext2 /dev/"$disk"1 # boot (BIOS system)
* mkswap /dev/"$disk"2
swapon /dev/"$disk"2
* mkfs.ext4 /dev/"$disk"3 # root
* pvcreate /dev/"$disk"4
vgcreate vdisk /dev/"$disk"4
vol() { lvcreate -L"$1"G -n"$2" vdisk && mkfs.ext4 /dev/vdisk/"$2"; }
vol 210 home
vol 11 var
vol 3 opt
Checks: fdisk -l, lsblk
pvdisplay, pvscan...
6. Mount the partitions {{{1
mount /dev/"$disk"3 /mnt # root
for i in boot home var opt
do
mkdir -p /mnt/"$i"
done
mount /dev/"$disk"1 /mnt/boot
for i in home var opt
do
mount /dev/vdisk/"$i" /mnt/"$i"
done
7. Mirror list {{{1
vi /etc/pacman.d/mirrorlist
# :g/united\s\+kingdom\n.\+\c/,+m0
# then reverse from 2 to 1
# 1 2
# Note: vi don't recognise \n and \c, so /United Kingdom, dj, {, P...
}}}1
8. pacstrap -i /mnt base # exclude these: ^22,^31-32,^36,^40,^52
9. fstab {{{1
genfstab -U -p /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab # to check
}}}1
10. arch-chroot /mnt
11. Local settings {{{1
pacman -S ed gvim ttf-dejavu ctags # + repeat step 2.
# \\1 - \\ needed so $'' doesn't parse it
ed -s /etc/locale.gen <<< $'H\n%s/#\(bg_BG\|fr_FR\|es_ES\|en_GB\|ru_RU\).UTF-8/\\1.UTF-8/\nwq'
locale-gen
echo LANG=en_GB.UTF-8 >> /etc/locale.conf
export LANG=en_GB.UTF-8
loadkeys uk
echo KEYMAP=uk >> /etc/vconsole.conf
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
hwclock --systohc --utc
12. Networking {{{1
echo myhostname > /etc/hostname
systemctl enable dhcpcd.service # systemctl enable dhcpcd@interface_name.service
# Or: systemctl stop dhcpcd.service && systemctl disable dhcpcd.service
# systemctl enable dhclient.service && systemctl start dhclient.service
13. GRUB {{{1
pacman -S grub efibootmgr dosfstools # only grub is needed for a BIOS system
# UEFI system
efivar -l # test if booted into UEFI mode
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub --recheck # --debug
OR
grub-install /dev/"$disk" # BIOS system
# pacman -S os-prober # for a dual boot setup (doesn't detect Windows)
grub-mkconfig -o /boot/grub/grub.cfg
14. Finish {{{1
passwd
exit
umount -R /mnt
reboot
Post install {{{1
============
useradd -m mitko
passwd mitko
# gvfs for automounting
# User switching: (deprecated)
# ln -s /usr/lib/lightdm/lightdm/gdmflexiserver /usr/bin/gdmflexiserver
pacman -S \
xorg-server xorg-server-utils xorg-xinit xscreensaver \
xfce4 xfce4-notifyd gvfs orage ristretto ffmpegthumbnailer \
lightdm lightdm-gtk-greeter accountsservice numlockx \
clipit xclip wgetpaste \
firefox flashplugin \
sudo keychain x11-ssh-askpass \
git openssh bash-completion mlocate ntp tree bc
lspci | grep VGA # -> XXX
pacman -Ss xf86-video | grep -i -C1 --color=auto XXX
pacman -S xf86-video-XXX
pacman -S alsa-utils # for alsamixer
# optional
pacman -S cups vlc
# Distro / Desktop Environment specific
pacman -S --needed base-devel
# Work
pacman -S \
dnsutils rsync clusterssh openldap virtualbox thunderbird tcpdump terminator \
xterm cifs-utils
# Services
systemctl enable ntpd lightdm
Settings
--------
# AUR: /etc/makepkg.conf
CFLAGS and CXXFLAGS: -march=native
MAKEFLAGS: -jn (with n being the output of nproc)
BUILDDIR=/tmp
# pacman: /etc/pacman.conf
color
VerbosePkgLists
# Terminal colors
Palette:
tango
Modifications:
cursor: #666666, rgb(102, 102, 102)
text: #bebebe, rgb(190, 190, 190)
bg: #262626 (html color grey15), rgb(38, 38, 38)
# Orage
Line 1: %a %d %b
Tooltip: %A %d %B %Y
# gVim shortcut
gvim -u /home/"$USER"/.vimrc -U /home/"$USER"/.gvimrc -f %F
# Git
"$REPOS_BASE"/config/git.bash # run config script