Partition Disk and Install 32bit Arch Linux
-
Create usb install key:
$ dd bs=4M if=warez/archlinux-2014.04.01-dual.iso of=/dev/sdb && sync
-
Startup laptop with usb key and select "Boot Arch Linux (i686)";
-
Connect wifi:
wpa_supplicant -B -i wlp5s0 -c <(wpa_passphrase TP-LINK_PocketAP_8344C2 py25)
dhcpcd wlp5s0
-
Partition disk:
sgdisk --zap-all /dev/sda
cgdisk /dev/sda // create 20G, 50G, 20G, 50G, 20G, 50G, 20G, 50G, 105G, totally 9 partitions
// This is a gpt partition, where can't install Windows, because Windows only support MBR partition
parted /dev/sda print // print the partition tables
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
lsblk -f // display the current partition layout
-
Mount partition:
mount /dev/sda1 /mnt
mkdir /mnt/home
mount /dev/sda2 /mnt/home
-
Select a mirror:
vi /etc/pacman.d/mirrorlist
-
Install the base system: (so cool~)
pacstrap -i /mnt base
-
Create fstab and chroot:
genfstab -U -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash
-
Set locale:
vi /etc/locale.gen // uncomment en_US.UTF-8 & zh_CN.UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
setfont Lat2-Terminus16 (optional)
-
Set time zone:
ln -s /usr/share/zoneinfo/Hongkong /etc/localtime // now
date
command will give corrent timehwclock --systohc --utc
-
Set hostname:
echo blackpad > /etc/hostname
vi /etc/hosts
-
Config wireless (modify the wireless name based on your machine):
pacman -S iw wpa_supplicant dialog wpa_actiond
systemctl enable netctl-auto@wlp5s0.service
-
Set root passwd:
passwd
-
Install and configure a bootloader:
pacman -S gptfdisk
pacman -S syslinux // install syslinux boot loader because we create gpt partition earlier. Install grub will produce an error.
syslinux-install_update -i -a -m
vi /boot/syslinux/syslinux.cfg // modify "APPEND root=/dev/sda1 rw" in "LABEL arch" section
-
Shutdown, unplugged usb key and restart laptop;
-
Start wifi connection:
wifi-menu wlp5s0 // get interface name with
iw dev
Choose a SSID, enter the key, press "OK", then you can see "Interface wlp5s0 is controlled by netctl-auto", use ip addr
or ping ...
to verify network.
-
Install SSH service:
pacman -Syu openssh
systemctl start sshd
systemctl enable sshd.service
Install the second System
-
Start laptop with YUMI usb key;
-
Startup a openSUSE 13.1 live dvd, install system on /dev/sda3 and /dev/sda4, reboot;
-
startup laptop, it prints: multiple active partitions, start failed;
-
Startup labtop with Arch USB key, delete openSUSE partitions, reboot, Arch is back;
-
Startup a CentOS live DVD, install system on /dev/sda3 and /dev/sda4, rebuild boot loader, reboot;
-
Startup laptop, only CentOS can start, it print "boot error" when choose "Arch Linux" to start;
-
Startup labtop with Arch USB key, delete CentOS partitions, reboot, only a GNU Grub command line;
This experiment failed.
Install i3
# useradd -m -s /usr/bin/bash chad
# pacman -S xorg-server xorg-server-utils xorg-xinit
# pacman -S dmenu i3
# pacman -S gnome // this big one (almost 1GB) is necessary, only gnome-shell can't work
# pacman -S xf86-video-intel xf86-input-synaptics
// video and touchpad driver, there will be a "could not open module intel" error without them
// they take effect after installation without reboot
# su - chad
$ echo "exec i3" > ~/.xinitrc
$ startx
Install Chinese IM
# pacman -S ibus-libpinyin
# su - chad
$ ibus-setup
Then select "Chinese - Intelligent Pinyin" under "Input Method" tab, and click "Preferences" to customize it. The package "ibus-sunpinyin" is OK, too. "ibus-pinyin" can't work properly. "ibus-rime" can only input traditional Chinese.