Arch

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

# vim /etc/pacman.d/mirrorlist
## 163 mirror
Server = http://mirrors.163.com/archlinux/$repo/os/$arch
## aliyun mirror
Server = http://mirrors.aliyun.com/archlinux/$repo/os/$arch


# timedatectl set-ntp true

# fdisk -l

# mkfs.ext2 /dev/sda1

# mkswap /dev/sda2

# swapon /dev/sda2

//try mkfs.xfs, but failed to boot after installation
# mkfs.ext4 /dev/mapper/vg_root-lv_root

# mkdir /mnt/boot

# mount /dev/mapper/vg_root-lv_root /mnt

# mount /dev/sda1 /mnt/boot

# pacstrap /mnt base linux linux-firmware

# genfstab -U /mnt >> /mnt/etc/fstab

# arch-chroot /mnt

# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# hwclock --systohc

# vim /etc/locale.conf
LANG=en_US.UTF-8

# locale-gen

# vim /etc/hostname
arch-tmux


# 修改mkinitcpio.conf的动作仅需在启用LVM的时候操作,如果根目录ext4,则无需
- [虚拟机中archlinux尝试LVM分区](https://www.cnblogs.com/Z-X-L/archive/2013/01/26/2878091.html)

# vim /etc/mkinitcpio.conf
mkinitcpio 的 lvm 设定
HOOKS=“...”那一行中加入 lvm2
注意这个 HOOKS 里边模块的顺序就是加载顺序
lvm2 必须在filesystems 前边
MODULES=(dm_mod)
HOOKS=(base udev ... lvm2 filesystems)


# mkinitcpio -P

# pacman -S grub

# vim /etc/default/grub
GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm"

# grub-install --target=i386-pc /dev/sda

# grub-mkconfig -o /boot/grub/grub.cfg

# passwd

# exit

# reboot

Reference

xorg

1
2
3
4
5
6
7
pacman -S xorg

/usr/bin/Xorg -configure

X -config ./xorg.conf.new

X -config ./xorg.conf.new -retro