close

Arch Linux Official Website : https://www.archlinux.org/
Arch Linux Taiwan Community : http://archlinux.tw/
Arch Linux 中文社區 : http://archlinux.alone.tw/bbs/

安裝影音教學
midfingr, 20130507, "Arch Linux VirtualBox Install (May 2013)"
midfingr, 20130508, "Arch Linux VirtualBox Install Part 2 (May 2013)"
midfingr, 20130508, "Arch Linux VirtualBox Install Part 3 (May 2013)"


安裝教學:
wiki.archlinux.org, Installation Guide (正體中文)
wiki.archlinux.org, Beginners' Guide (正體中文)
Swapnil Bhartiya, 2013/11/26, How to install Arch Linux – easy way
OGC Gains Comfort, 2008/10/09, "ArchLinux + LXDE 安裝筆記"


相關的說明:
鳥哥, 2004/03/16, "Linux 磁碟與硬體管理"
Tetralet, 2005/05/06, "使用 debootstrap 來建立 CHROOT 環境"
wiki.archlinux.org, "VirtualBox"


安裝步驟備忘 :
(1) 確認是否有網路 : ping -c 3 168.95.1.1

(2) 查看目前磁碟配置 : lsblk

(3) 建立新的磁碟配置 : cfdisk (or cgdisk)
/dev/sda1 / 10240 M
/dev/sda3 /home * M
/dev/sda2 swap 2048 M

(4) 建立各分割區的檔案系統
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda3
mkswap /dev/sda2

(5) 掛載 swap : swapon /dev/sda2

(6) 掛載 / : mount /dev/sda1 /mnt

(7) 掛載 /home :
mkdir /mnt/home
mount /dev/sda3 /mnt/home

(8) 修改 pacman's mirrorlist , 選擇台灣的鏡象站
nano /etc/pacman.d/mirrorlist

Server = http://archlinux.cs.nctu.edu.tw/$repo/os/$arch
Server = http://ftp.tku.edu.tw/Linux/ArchLinux/$repo/os/$arch

(9) 安裝基本套件到 /mnt :
pacstrap /mnt base base-devel

(10) 保存目前的磁碟配置
genfstab /mnt >> /mnt/etc/fstab

(11) 檢查磁碟配置
nano /mnt/etc/fstab

(12) change root directory :
arch-chroot /mnt

(13) 修改 root 的密碼
passwd

(14) 修改語系
nano /etc/locale.gen

en_US.UTF-8 UTF-8
en_US ISO-8859-1
zh_TW.UTF-8 UTF-8
zh_TW BIG5

locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8

(15) 修改時區
ls /usr/share/zoneinfo/
ln -s /usr/share/zoneinfo// /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime

hwclock --systohc --utc

hwclock -w; hwclock -r; date

(16) hostname
echo Archlinux > /etc/hostname

(17) 增加 multilib 到 pacman's mirrorlist
nano /etc/pacman.conf
[multilib] Include = /etc/pacman.d/mirrorlist

pacman -Sy

(18) 安裝 bootloader : syslinux
pacman -S syslinux
由於安裝 grub 在我的電腦會發生以下兩種錯誤,所以暫時改用 syslinux 當 bootloader
(a) grub 1:2.00.1282.g5ae5c54-1 will not generate grub.cfg file syntax errors
(b) Arch GRUB asking for /run/lvm/lvmetad.socket on a non lvm disk

syslinux-install_update -i -a -m
(-i : Install over the current bootsector, -a : Mark partition as active, -m : Install an MBR )

nano /boot/syslinux/syslinux.cfg

LABEL arch
...
APPEND root=/dev/sda1 rw
...
LABEL archfallback
...
APPEND root=/dev/sda1 rw
...


PS. SYSLINUX searches for the SYSLINUX.CFG file in the following order: /boot/syslinux/syslinux.cfg, /syslinux/syslinux.cfg, /syslinux.cfg

(19) 增加使用者
useradd -m -g users -G wheel,storage,power -s /bin/bash username
passwd username

(20) 安裝 sudo
pacman -S sudo
pacman -Ss sudo

EDITOR=nano visudo
%wheel ALL=(ALL) ALL

(21) 安裝 bash
pacman -S bash-completion

(22) 切回原先的 root dir
exit

(23) (遞迴) 卸載磁區
umount -R /mnt

(24) 重開電腦
sync;sync;sync;reboot

(25) 啟用 DHCP
systemctl enable dhcpcd.service
systemctl start dhcpcd.service

(26) 安裝 SSH
pacman -S openssh
systemctl enable sshd.service
systemctl start sshd.service

(27) 安裝 net-tools , 不裝這個,會連 ifconfig, netstat 都沒得用
pacman -S net-tools


(28)
pacman -S mlocate
updatedb

(29) pacman -S alsa-utils alsa-oss acpid
alsamixer

(30) 安裝 X
pacman -S xorg-server xorg-server-utils xorg-xinit xorg-utils
pacman -S mesa
pacman -S nvidia lib32-nvidia-utils
pacman -S xf86-input-synaptics
pacman -S xorg-twm xorg-xclock xterm

startx


(31) 安裝 virtualbox guest
pacman -S virtualbox-guest-utils
pacman -S virtualbox-guest-modules
modprobe -a vboxguest vboxsf vboxvideo

nano /etc/modules-load.d/virtualbox.config
vboxguest
vboxsf
vboxvideo

VBoxClient --clipboard
(VBoxClient --clipboard --draganddrop --seamless --display --checkhostversion)

usermod -G vboxsf -a username

(32) pacman -S libstdc++5
pacman -S screen
pacman -S tmux
pacman -S ntfs-3g
pacman -S dbus
pacman -S lrzsz
pacman -S gdb
pacman -S vim
pacman -S bc

(33) 安裝桌面系統 ... 待續 ...













arrow
arrow
    全站熱搜
    創作者介紹
    創作者 胖胖飄 的頭像
    胖胖飄

    danji's Blog

    胖胖飄 發表在 痞客邦 留言(0) 人氣()