|
我的LAPTOP,我的ARCH──打造精简实用LAPTOP LINUX
为什么安装ARCH LINUX:
还是最爱LINUX^^,上网/电影/听歌/聊天/写论文/编程/...
计划在笔记本上使用最多1G硬盘空间,安装精简实用的LINUX,
不断摸索过程中,最终看中ARCH.
本文内容:
安装笔记,遗留问题.....
最后更新:2005.11.20
0.my laptop
ASUS Notebook M3N (PM1.4/512MB/40G/WIFI2100)
xp home only
3 partitions: recovery, c, and d
1.intall base system
1.1 preparing
under XP:
download arch 0.7 base iso
install grub for dos into boot.ini
install vmware workstation
pqmagic resize d, free 1 Gb at the end of hd, for linux
the partition table now:
hda1 primary recovery
hda2 primary c
hda3 extend
hda5 logical d
hda4 primary free
1.2 setup base system
load iso to vmware cd, boot it.
run setup
format the hda4 as reiserfs, mount as /, NO swap
install all base packages
configuration
NOT install boot loader now! (for its under vmware!)
shutdown the vmware pc
reboot real pc.
from boot menu, choose grub for dos:
pressed "c" into command line:
grub>root (hd0,3)
grub>kernel (hd0,3)/boot/vmlinuz26 root=/dev/hda4
grub>boot
now config lilo.conf and install lilo
then mount c to /mnt/c, and
#dd if=/dev/hda4 of=/mnt/c/arch.lnx bs=512 count=1
#vi /mnt/c/boot.ini
add line
c:\arch.lnx="Arch Linux"
now the /mnt/c/boot.ini
- [boot loader]
- timeout=5
- default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
- [operating systems]
- multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn /bootlogo
- c:\arch.lnx=Arch Linux
- c:\bootsect.dos=MS-DOS 7.10
- C:\GRLDR=Grub for DOS
复制代码
the /etc/fstab:
- #
- # /etc/fstab: static file system information
- #
- # <file system> <dir> <type> <options> <dump> <pass>
- none /dev/pts devpts defaults 0 0
- none /dev/shm tmpfs defaults 0 0
- /dev/cdrom /mnt/cd iso9660 ro,user,noauto,unhide 0 0
- /dev/cdrom /mnt/dvd udf ro,user,noauto,unhide 0 0
- /dev/hda4 / reiserfs defaults 0 0
- /dev/hda2 /mnt/c auto rw,iocharset=utf8 0 0
- /dev/hda5 /mnt/d auto rw,iocharset=utf8 0 0
复制代码
now upgrade the system:
setup the /etc/pacman.conf first
- #
- # /etc/pacman.conf
- #
- # NOTE: If you find a mirror that is geographically close to you, please
- # move it to the top of the server list, so pacman will choose it
- # first.
- #
- # To re-sort your mirror lists by ping/traceroute results, use the
- # /usr/bin/sortmirrors script. It requires the "netselect" package.
- #
- # See the pacman manpage for option directives
- #
- # GENERAL OPTIONS
- #
- [options]
- LogFile = /var/log/pacman.log
- NoUpgrade = etc/passwd etc/group etc/shadow etc/sudoers
- NoUpgrade = etc/fstab etc/raidtab etc/ld.so.conf
- NoUpgrade = etc/rc.conf etc/rc.local
- NoUpgrade = etc/modprobe.conf etc/modules.conf
- NoUpgrade = etc/lilo.conf boot/grub/menu.lst
- HoldPkg = pacman glibc
- XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
- #
- # REPOSITORIES
- # - can be defined here or included from another file
- # - pacman will search repositories in the order defined here.
- # - local/custom mirrors can be added here or in separate files
- #
- [current]
- Server = http://debian.okey.net/archlinux/current/os/i686/
- [extra]
- Server = http://debian.okey.net/archlinux/extra/os/i686/
- [testing]
- Server = http://debian.okey.net/archlinux/testing/os/i686/
- [unstable]
- Server = http://debian.okey.net/archlinux/unstable/os/i686/
- [archcn]
- Server=http://www.mysunday.net/mirror/archcn/
- Server=http://www.mysunday.net/mirror/alcle/
- [fouiny_repo]
- Server=http://elusseau.free.fr/arch/fouiny_repo/
- #[testing]
- #Server = ftp://ftp.archlinux.org/testing/os/i686
- #[current]
- # Add your preferred servers here, they will be used first
- #Include = /etc/pacman.d/current
- #[extra]
- # Add your preferred servers here, they will be used first
- #Include = /etc/pacman.d/extra
- #[unstable]
- # Add your preferred servers here, they will be used first
- #Include = /etc/pacman.d/unstable
- #[community]
- # Add your preferred servers here, they will be used first
- #Include = /etc/pacman.d/community
- # An example of a custom package repository. See the pacman manpage for
- # tips on creating your own repositories.
- #[custom]
- #Server = file:///home/custompkgs
复制代码
- #pacman -Sy
- #pacman -S pacman
- #pacman -Su
复制代码
1.3 install X package
不用其他xwin,就用twm, (取消#pacman -S enlightenment)
以下是.twmrc, cp自 system.twmrc修改而成:
不选用firefox,改用opera, (取消#pacman -S mozilla-firefox)
1.4 setup wireless lan card, sound card, etc
install wlan pkg:
sound card pkg:
- #pacman -Sy alsa-lib alsa-utils
- #alsaconf
- #amixer set Master 100 unmute
- #amixer set PCM 100 unmute
- #alsctl store
复制代码
(#pacman -S alsa-oss)不装oss了
(发现alsctl restore有问题!!!)
config:
edit /etc/conf.d/wireless
- #
- # Settings for wireless cards
- #
- # For each wireless interface declared in INTERFACES (in rc.conf), declare
- # a wlan_${IF} variable that contains the arguments to be passed to
- # iwconfig(8). Then list the original interface name in the
- # WLAN_INTERFACES array.
- #
- #wlan_eth0="eth0 mode managed essid wireless"
- wlan_eth0="eth0 mode Ad-Hoc essid wireless channel 6 rate auto txpower on"
- WLAN_INTERFACES=(eth0)
复制代码
edit /etc/rc.conf
- #
- # /etc/rc.conf - Main Configuration for Arch Linux
- #
- #
- # Localization
- #
- # LOCALE: available languages can be listed with the 'locale -a' command
- # HARDWARECLOCK: set to "UTC" or "localtime"
- # TIMEZONE: timezones are found in /usr/share/zoneinfo
- # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
- # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
- # CONSOLEMAP: found in /usr/share/kbd/unimaps
- # USECOLOR: use ANSI color sequences in startup messages
- #
- LOCALE=en_US.utf8
- HARDWARECLOCK="localtime"
- TIMEZONE=Asia/Hong_Kong
- KEYMAP=us
- CONSOLEFONT=
- CONSOLEMAP=
- USEcolor="yes"
- # Scan for LVM volume groups at startup, required if you use LVM
- USELVM="no"
- #
- # Networking
- #
- HOSTNAME="zgf"
- #
- # Module to load at boot-up (in this order)
- # (prefix a module with a ! to disable it)
- #
- #MODULES=(i810 parport_pc rtc intelfb tpm_atmel yenta_socket ipw2100 e100 ohci1394 eth1394 ohci_hcd ehci_hcd uhci_hcd usbhid snd_pcm_oss snd_intel8x0 pcspkr joydev evdev tsdev)
- #MODULES=(i810 tpm_atmel ipw2100 e100 ohci_hcd ehci_hcd uhci_hcd usbhid snd_pcm snd_intel8x0 pcspkr)
- MODULES=()
-
- #
- # Interfaces to start at boot-up (in this order)
- # Declare each interface then list in INTERFACES
- # - prefix an entry in INTERFACES with a ! to disable it
- #
- # Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
- #
- lo="lo 127.0.0.1"
- eth0=dhcp #"eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
- eth1=dhcp #"eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
- #eth2=dhcp #"eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
- INTERFACES=(lo eth0 eth1 eth2)
- #
- # Routes to start at boot-up (in this order)
- # Declare each route then list in ROUTES
- # - prefix an entry in ROUTES with a ! to disable it
- #
- gateway="default gw 192.168.0.1"
- ROUTES=(!gateway)
- #
- # Enable these network profiles at boot-up. These are only useful
- # if you happen to need multiple network configurations (ie, laptop users)
- # - set to 'menu' to present a menu during boot-up
- # - prefix an entry with a ! to disable it
- #
- # Network profiles are found in /etc/network-profiles
- #
- NET_PROFILES=(menu)
- #
- # Daemons to start at boot-up (in this order)
- # - prefix a daemon with a ! to disable it
- # - prefix a daemon with a @ to start it up in the background
- #
- DAEMONS=(syslog-ng hotplug !pcmcia !alsa @network !netfs !crond)
- # End of file
复制代码
1.5 Install Chinese fonts & input method
use XP's fonts:
- #cp /mnt/c/windows/Fonts/{simsun.ttf,tahoma.ttf,tahomabd.ttf} /usr/share/fonts/ttf/
- #cd /usr/share/fonts/truetype
- #fc-cache -fv
- #mkfontscale && mkfontdir
复制代码
edit ~/.font.conf.
安装输入法:
set locale to utf8.
~/.bash_profile:
- . $HOME/.bashrc
- LANG="en_US.utf8"
- LC_CTYPE="en_US.utf8"
- LC_NUMERIC="en_US.utf8"
- LC_TIME="en_US.utf8"
- LC_COLLATE=C
- LC_MONETARY="en_US.utf8"
- LC_MESSAGES="en_US.utf8"
- LC_PAPER="en_US.utf8"
- LC_NAME="en_US.utf8"
- LC_ADDRESS="en_US.utf8"
- LC_TELEPHONE="en_US.utf8"
- LC_MEASUREMENT="en_US.utf8"
- LC_IDENTIFICATION="en_US.utf8"
- LC_ALL=
复制代码
.gtkrc:
- style "gtk-default" {
- fontset="-*-Tahoma-medium-r-normal-*-12-*-*-*-*-*-iso8859-*,\
- -*-*-medium-r-normal-*-16-*-*-*-*-*-iso8859-*,*-r-*"
- }
- class "GtkWidget" style "gtk-default"
复制代码
edit .xinitrc
- #!/bin/sh
- # $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
- userresources=$HOME/.Xresources
- usermodmap=$HOME/.Xmodmap
- sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
- sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
- # merge in defaults and keymaps
- if [ -f $sysresources ]; then
- xrdb -merge $sysresources
- fi
- if [ -f $sysmodmap ]; then
- xmodmap $sysmodmap
- fi
- if [ -f $userresources ]; then
- xrdb -merge $userresources
- fi
- if [ -f $usermodmap ]; then
- xmodmap $usermodmap
- fi
- # start some nice programs
- export XMODIFIERS=@im=fcitx
- export XIM=fcitx
- export XIM_PROGRAM=fcitx
- export QT_IM_MODULE=fcitx
- env LC_CTYPE=zh_CN.utf8 fcitx &
- twm &
- xclock -geometry 50x50+1-1 &
- #xterm -geometry 80x50+494+51 &
- #xterm -geometry 80x20+494-0 &
- exec urxvt -geometry 80x24+0+0 -name X
复制代码
my .Xdefaults
- Xft.dpi:96
- URxvt.background:black
- URxvt.foreground:white
- URxvt.scrollBar_right:True
- URxvt.saveLines:3000
- URxvt.font:xft:SimSun
- URxvt.inputMethod:fcitx
- Rxvt.inputMethod:fcitx
- Rxvt.background:black
- Rxvt.foreground:white
- Rxvt.scrollBar_right:True
- Rxvt.saveLines:3000
复制代码
1.6 install entertainment software
(#pacmen -S bmp)改用XMMS
xmms 字体main window与playlist均设成:
.xmms/config
- ......
- playlist_font=-microsoft-tahoma-medium-r-normal-*-12-*-*-*-*-*-iso8859-*,-misc-simsun-medium-r-normal-*-14-*-*-*-*-*-iso10646-1
- use_fontsets=TRUE
- mainwin_use_xfont=TRUE
- mainwin_font=-microsoft-tahoma-medium-r-normal-*-12-*-*-*-*-*-iso8859-*,-misc-simsun-medium-r-normal-*-14-*-*-*-*-*-iso10646-1
- ......
复制代码
1.7 已安装的其他软件
图片浏览:gqview
文本编辑:vim, gvim(因未熟vim的粘贴,装了gvim)
词典:stardict(及stardict-xdict-ce-gb,stardict-xdict-ec-gb)
IM: gaim+openq
BBS Client: qterm
openq 的PKGBUILD:
- pkgname=openq
- srcname=OpenQ
- pkgver=0.3.1
- pkgrel=2
- pkgdesc="OpenQ is a QQ-liked protocol plugin for gaim"
- url="http://openq.sf.net"
- license="GPL"
- depends=('glibc' 'gtk2>=2.4' 'gaim>=1.0')
- makedepends=('gtk2>=2.4' 'gaim>=1.0')
- conflicts=()
- replaces=()
- backup=()
- install=
- source=(http://openq.linuxsir.cn/download/$srcname-$pkgver.tar.bz2)
- md5sums=(80415138f7a59e0d6920e481f5dbecc8)
- build() {
- cd $startdir/src/$srcname
- ./configure --prefix=/usr
- make || return 1
- make DESTDIR=$startdir/pkg install
- }
复制代码
qterm的PKGBUILD:
- pkgname=qterm
- srcname=qterm
- pkgver=0.4.0pre3
- pkgrel=1
- pkgdesc="QTerm is a BBS client in Linux, written in Qt"
- url="http://qterm.sourceforge.net/"
- license="GPL"
- depends=('qt' 'xorg')
- conflicts=()
- replaces=()
- backup=()
- install=
- source=(http://optusnet.dl.sourceforge.net/sourceforge/qterm/$srcname-$pkgver.tar.gz)
- md5sums=(982dcf9ec56cc4caa6c44f07510caf3a)
- build() {
- cd $startdir/src/$srcname-$pkgver
- ./configure --prefix=/usr
- make || return 1
- make DESTDIR=$startdir/pkg install
- }
复制代码
2. Todo (含遗留问题,寻求解决方法)
2.1 系统精简问题, 这是我的LAPTOP上安装LINUX的最根本要求: 目前pacman -Scc后空间占用达800MB左右.
2.2 (未解决)sound问题: 不知哪里搞错,刚安装好后声音还好,但重启后声音就没了.(暂时在/etc/rc.local用amixer打开音量)
2.3 (已解决)firefox标题中文显示乱码问题: (确认是E16的问题,装E17或在TWM下标题显示正常)
2.4 (已解决)bmp中文显示问题(改用xmms,问题解决!)
2.5 (已解决)telnet 中文BBS的解决问题: urxvt可以显示与输入中文,但telnet 上bbs不能正常显示中文。准备用qterm。成功安装qterm
2.6 (已解决)qq 问题. LumaQQ可以, 但太大了(100MB).准备用gaim-qq.现安装了gaim+openq
2.7 安装xv,及LaTeX等软件包 |
|