Archlinux install

Prepare for the installation

  • Prepare the ISO of archlinux, and brasero it into USB flash disk

  • Partiton: use cfdisk, use the UEFI install, the mkfs

1
2
3
4
/dev/sda1 to UEFI boot: ef00, 1G
/dev/sda2 to 119G
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
  • Select mirrorlist:
1
2
3
nano -w /etc/pacman.d/mirrorlist add
Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
Server = http://mirrors.163.com/archlinux/$repo/os/$arch
  • Wireless network link
1
2
3
4
5
6
iwconfig to find the name of your wireless moudule: like wlan0
then:
ip link set wlan0 up
wpa_supplicant -D nl80211,wext -i wlan0 -c <(wpa_passphrase "your_SSID" "your_key")
dhcpcd wlan0
now the wireless should be connected

Basic install

  • Mount the partition
1
2
3
muont /dev/sda2 /mnt
mkdir -p /mnt/boot/EFI
mount /dev/sda1 /mnt/boot/EFI
  • Bbasic system install
1
pacstrap /mnt base base-devel
  • Generate the fstab
1
genfstab -p /mnt >> /mnt/etc/fstab
  • Went into the new system and update the system
1
2
3
4
5
6
7
8
arch-chroot /mnt
nano /etc/loacle.gen  en.us & en.cn # remove#
locale-gen
nano /etc/locale.gen    # 反注释需要的 locale
locale-gen    # 生成 locale
echo LANG=<locale>  > /etc/locale.conf # 设置默认 locale
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc --utc
  • Add passwd and users
1
2
3
4
5
6
echo yourname > /etc/hostname
nano /etc/hosts
passwd 111111(2 times)
useradd -m -g users -s /bin/bash name
passwd name 111111(2 times)
nano -w /etc/sudos add line name ALL=(ALL) ALL
  • Grub installation
1
2
3
# pacman -S dosfstools grub efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=arch_grub --recheck
# grub-mkconfig -o /boot/grub/grub.cfg
  • Install X windows and gnome
1
2
3
4
5
6
7
8
9
pacman -S alsa-utils xorg-server xorg-xinit xorg-server-utils
pacman -S xf86-video-intel xf86-input-synaptics
pacman -S gnome gnome-extra
systemctl enable gdm.service
systemctl enable NetworkManager.service
exit
umount /mnt/boot/EFI
umount /mnt
reboot

Software install

  • Yaourt installation
1
2
3
4
5
6
7
8
sudo nano -w /etc/pacman.conf
remove # before mutilib
add
[archlinuxfr]
Server = http://repo.archlinux.fr/$arch
in the last line
then exit
sudo pacman -Syyuu
  • Software installation
1
2
3
sudo pacman -S yaourt emacs gnome-tweak-tool firefox libreoffice clementine vlc smplayer vim gimp shotwell blender impressive r osdlyrics stardict gnome-search-tool dropbox
yaourt wqy-microhei mendeleydesktop  wps acroread acroread-chinese-fonts texstudio
pacman codecs (nedded)
  • Install textlive as the peking BBS

Configuration

Fcitx

1
2
3
4
5
6
7
8
9
sudo pacman -S fcitx fcitx-im fcitx-configtool ibus
sudo cp /usr/bin/ibus-daemon /usr/bin/ibus-daemon.cp
sudo rm -rf /usr/bin/ibus-daemon
sudo gsettings set org.gnome.settings-daemon.plugins.keyboard active false
sudo nano -w .xprofile add
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
yaourt fcitx-googlepinyin fcitx-sogoupinyin

Web to hidden

1
2
3
4
yaourt lantern
Add new firefox autoproxy server
127.0.0.1 8787
sudo systemctl enable lantern.service

Startdict

1
2
3
4
sudo pacman -S startdict
cp dict /usr/share/stardict/dic
cp WyabdcRealPeopleTTS /usr/share/WyabdcRealPeopleTTS
cp startdict config /home

Samba

1
2
3
4
cp /etc/samba/smb.conf.default /etc/samba/smb.conf
sudo systemctl enable/start smbd.service nmbd.service
sudo systemctl start/enable cups
add printer

Bumblebee

1
2
3
sudo pacman -S bumblebee mesa nvidia nvidia-settings xf86-video-intel
sudo gpasswd -a user bumblebee
sudo systemctl enable bumblebeed.service

Firefox

1
2
3
cp config
rm .mozilla/Firefox/9999/.parentlock
(bookmaker add-ons: noscript autopager autoproxy stumbleupon deafaultzoom xnot instantfox flashlock videodownloadhelper greasemonkey allsidebar downloadstatbar zotero firegesture)

Dnsmasq: maybe out of data

1
2
3
4
5
6
7
8
9
sudo gedit /etc/NetworkManager/dispatcher.d/localhost-prepend
add
#!/bin/bash
# Prepend localhost to resolv.conf for dnsmasq

if [[ ! $(grep 127.0.0.1 /etc/resolv.conf) ]]; then
  sed -i '1s|^|nameserver 127.0.0.1\n|' /etc/resolv.conf
fi
sudo chmod +x /etc/NetworkManager/dispatcher.d/localhost-prepend

Questions

GNOME3.6 文件夹默认打开方式关联问题

1
2
3
4
5
Edit /usr/share/applications/audacious.desktop
and remove following line:
MimeType=inode/directory;
sudo nano /usr/share/applications/mimeinfo.cache
sudo gedit /usr/share/applications/mimeinfo.cache

Add module auto

1
2
3
sudo gedit /etc/modules-load.d/virtio-net.conf
#Load 'virtio-net.ko' at boot.
virtio-net

LIWORD start fonts problem

1
2
3
sudo gedit /etc/fonts/conf.d/65-nonlatin.conf
save
then open LIWORD is ok.

Emacs fcitx

1
2
3
4
sudo nano -w .bashrc add
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"