pf's note (too old)
After booting from a USB stick, you'll get a zsh root shell
- ping google
# ping google.com
- the DHCP client daemon was started automatically
-
use
dhcpcd -k
orsystemctl stop dhcpcd.service
first to disable DHCP networking -
use
ip
command andresolv.conf
# ip link # interface, something like 'eth0' or 'enp2s0'
# ip link set <if> up
# ip addr add <ip address>/<subnetmask> dev <if>
# ip route add default via <gateway's ip address>
# vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
search foo.bar.com
- remember to install
netctl
afterchroot
, otherwise the network will be broken after rebooting
# iw dev
# wifi-menu
- check for old partitions first
# fdisk -l
- Destroy the whole world
# cfdisk /dev/sda
=================================
An example for creating partition tabel
/ 25G /dev/sda1
swap 1G /dev/sda2
/home else /dev/sda3
- format partitions (
ext4
)
# mkfs.ext4 /dev/sda1
# mkfs.ext4 /dev/sda3
- swap
# mkswap /dev/sda2 && swapon /dev/sda2
- check all things done well
# lsblk /dev/sda
# mount /dev/sda1 /mnt
# mkdir /mnt/home && mount /dev/sda3 /mnt/home
- choose nctu or tku in Taiwan
# vi /etc/pacman.d/mirrorlist
- base system
# pacstrap /mnt base base-devel
- if the keylist is out-of-date
# pacman -S archlinux-keyring
# pacman-key --init && pacman-key --populate archlinux
# genfstab -U -p /mnt >> /mnt/etc/fstab
# cat /mnt/etc/fstab
- edit
/mnt/etc/fstab
and adddiscard,noatime
if you're using SSD
# arch-chroot /mnt /bin/bash
# . /etc/profile
# PS1="(chroot) $PS1"
- remove comments for your locale
# vi /etc/locale.gen
en_US.UTF-8 UTF-8
en_US ISO-8859-1
zh_TW.UTF-8 UTF-8
# locale-gen
# locale
# echo "LANG=en_US.UTF-8" > /etc/locale.conf
# ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
# hwclock --systohc --utc
- note:
/etc/timezone
is no longer used now Arch wiki: Time
- set hostname
# echo hostname > /etc/hostname
- add your hostname in
/etc/hosts
# vi /etc/hosts
# systemctl enable dhcpcd@interface.service
# cd /etc/netctl
# cp examples/ethernet-static .
# vi ethernet-static
=> fill your {ADDR, GATEWAY, DNS}
=> remove the comment # of IP6=stateless
dns search domain
=> DNS SEARCH='foo.bar.com'
# netctl enable ethernet-static
- note:
dialog
is required by `wifi-menu
# pacman -S iw wpa_supplicant dialog
- you also can use
netctl
for your wireless networking
# cd /etc/netctl
# cp examples/wireless-wpa .`
# vi wireless-wpa
# netctl enable wireless-wpa
# mkinitcpio -p linux
- note: you might take a look of
/etc/mkinitcpio.conf
and add someHOOKS
probably
# passwd
# useradd -m xatier
# passwd xatier
# pacman -S grub os-prober
# grub-install --target=i386-pc --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
- add yaourt for pacman.conf
# vi /etc/pacman.conf
[archlinuxfr]
SigLevel = Optional
Server = http://repo.archlinux.fr/$arch
- update pacman
# pacman -Syu
## exit
# umount /mnt/{home,}
# reboot
# su -
# pacman -S openssh vim sudo screen tmux htop rsync git acpi
# visudo
$ complete -cf sudo
- Vbox needs some special settings, see Archlinux wiki Virtualbox
$ sudo pacman -S alsa-utils xorg-server xorg-xinit xorg-utils xorg-server-utils mesa [xf86-video-intel xf86-video-ati xf86-video-nouveau xf86-video-vmware] xf86-input-synaptics ttf-dejavu
$ sudo pacman -S awesome
$ vim ~/.xinitrc
exec awesome >> ~/.cache/awesome_stdout 2>> ~/.cache/awesome_stderr