arch linux install
system install
download iso
1
2wget http://mirror.lzu.edu.cn/archlinux/iso/2016.10.01/archlinux-2016.10.01-dual.iso
md5sum archlinux-2016.10.01-dual.iso # make sure md5sum is true
install arch system
running in iso # get a shell
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
27loadkeys us # set key layout
ping -c 2 qq.com # make sure connect to internet
timedatectl set-ntp true # update system time
lsblk /dev/sda # view disk part
fdisk /dev/sda # part install disk
n \n p \n \n +512M \n \n
n \n p \n \n \n w
fdisk -l # tow part disk
mkfs.fat /dev/sda1 # fomat part to fat32(boot)
mkfs.ext4 /dev/sda2 # fomat part to ext4(root)
mount /dev/sda2 /mnt # / part
mkdir -p /mnt/boot # make boot dir
mount /dev/sda1 /mnt/boot # sda1 is boot part
sed -i '/Score/{/China/!{n;s/^/#/}}' /etc/pacman.d/mirrorlist # command other score url
pacstrap /mnt base base-devel net-tools # start install system to disk
genfstab -U /mnt >> /mnt/etc/fstab # add mount table
arch_chroot /mnt # change root directory to install disk
echo flytrap > /etc/hostname # set hostname
passwd # input the same password to stdin, set root password
pacman -S zsh # install zsh
chsh -s /bin/zsh # change default shell to zsh
systemctl enable dhcpcd # the boot is start dhcp
pacman -S grub # install grub
grub-install --boot-directory=/boot /dev/sda # install grub to disk
grub-mkconfig -o /boot/grub/grub.cfg # retouch grub config file
exit # exit cur shell
reboot1
echo $SHELL # /bin/zsh
install arch desktop
i3 install ok!!!
1
2
3
4
5
6
7pacman -S xorg-server xorg-xinit # install xorg server and xinit
pacman -S i3 # install i3 desktop system
pacman -S xf86-video-vesa # device open sorce
cd /etc/X11/xinit/ # change xinit setting
i3-wm &
exec i3
startx
install arch to usb
install arch to usb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24mount ~/soft/iso/archlinux-2016.10.01-dual.iso /mnt/iso/ # mount iso to disk
unsquashfs -d /tmp/arch ./x86_64/airootfs.sfs # system install env ready
fdisk /dev/sdc # part disk
fdisk /dev/sdc # part install disk
n \n p \n \n +256M \n \n
n \n p \n \n \n w
lsblk /dev/sdc # tow part disk
cd /tmp/arch # change pwd to arch env
cp /etc/resolv.conf etc/
mount --rbind /proc/ proc/
mount --rbind /sys/ sys/
mount --rbind /dev/ dev/
mount --rbind /run/ run/
chroot . # change path
mkfs.fat /dev/sdc1
mkfs.ext4 /dev/sdc2
mount /dev/sdc2 /mnt/usb/
mkdir -p /mnt/usb/boot/efi
mount /dev/sdc1 /mnt/usb/
mount /dev/sdc1 /mnt/usb/boot/efi/
mount --rbind /mnt mnt/
sed -i '/Score/{/China/!{n;s/^/#/}}' /etc/pacman.d/mirrorlist
pacstrap /mnt base base-devel net-tools
...