本文重点讲述Slackware LInux 的详细的(硬盘)安装和配置过程
SLACKWARE是一款很优秀的GNU/Linux操作系统,其KISS(Keep It Simple, Stupid)原则使得她在众多Linux发行版中独树一帜,她由Patrick Volkerding定期发布,目前最新稳定版本是SlackWare10.1(2.4.29内核,testing中带有2.6.10内核),可以从一下站点得到:
其中第一个是从 上发现的(速度可以),其他是从得到的。
下面我重点说一下我的详细的(硬盘)安装和配置过程:
每一款GNU/Linux不外乎两种基本安装方式:
CD/DVD安装
硬盘安装
1,准备
准备一:硬盘分区
为SLACKWARE准备两个分区(可以是主分区,也可以是逻辑分区,但推荐都是主分区),一个是Linux Swap(容量大约为内存的两倍,但一般情况下300M~500M就可以了),格式为Linux Swap;
另一个为SlackWare分区(容量大约1,5G以上),格式为reiserfs。
另外在你的windows中最好准备一个Fat32盘(我没有试过NTFS盘可不可以,当然最好是Fat32盘)
准备二:下载必要的文件
slackware-10.1-install-d1.iso
slackware-10.1-install-d2.iso
grub020p(]Grub For Dos)
准备三:放置所需文件
所需文件
Dos Booting Floppy(如果你没有软驱,看这里]hiweed)
Grub for dos
bzImage from kernels\bare.i\ of slackware-10.1-install-d1.iso
initrd.img from isolinux\ of slackware-10.1-install-d1.iso
slackware-10.1-install-d1.iso
[slackware-10.1-install-d2.iso]
*[ ]表示可选
放置如下:
c:\grub020p\
c:\grub.exe (extract from grub020p\)
c:\slkboot\bzImage
c:\slkboot\initrd.img
c:\slack\here are the files extracted from slackware-10.1-install-d1.iso and slackware-10.1-install-d2.iso
其中也可以都放到其他的盘中比如D:\(前面说过这里最好是Fat32盘),也可以分开放置,比如
c:\grub020p\
c:\grub.exe(extract from grub020p\)
c:\slkboot\bzImage
c:\slkboot\initrd.img
d:\slack\here are the files extracted from slackware-10.1-install-d1.iso and slackware-10.1-install-d2.iso
2,安装
准备就绪后,就可以进行安装了,首先重启系统,设置Bios为软盘启动,把DOS启动盘放入软驱(如果没有软驱的参照hiweed ,而且必须是纯DOS环境),然后进行如下操作:
A:\C:
C:\grub.exe
......
grub>kernel (hd0,0)/slkboot/bzImage root=/dev/hda1
......
grub>initrd (hd0,0)/slkboot/initrd.img
......
grub>boot
......
~zzj666/docs/htm/document/slackware.html
安装过程中必须确认安装lilo安装到MBR以引导windows和linux双系统。
3,配置
安装过程相对简单,对新手来说,接下来的配置就比较头疼了。
首先重启以root登录后,新建一个组和一个普通用户:
#groupadd zhy
#cd /home
#mkdir zhyfly
#chmod 644 zhyfly
#useradd -G zhy -p ****** -s /bin/bash zhyfly
#visudo
zhyfly ALL=NOPASSWD:ALL
配置 /etc/ files:
/etc/fstab
/dev/hda4 swap swap defaults 0 0
/dev/hda3 / reiserfs defaults 1 1
/dev/hda1 /mnt/fatc vfat defaults,rw,users,dmask=000,fmask=0111,umask=000,codepage=936,iocharset=cp936 1 0
/dev/hda5 /mnt/fatd vfat defaults,rw,users,dmask=000,fmask=0111,umask=000,codepage=936,iocharset=cp936 1 0
/dev/hda6 /mnt/nte ntfs rw,users,umask=000,nls=cp936 1 0
/dev/hda7 /mnt/ntf ntfs rw,users,umask=000,nls=cp936 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
在 "export LANG=en_US"该句后添加下面两句
export LC_CTYPE=zh.CN
G_BROKEN_FILENAMES=1
配置 ~/.bashrc:
/root/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
#export PS1='\h:\w\$ '
export PS1="\[\033[0;31m\][\u]:\[\033[0;31m\][\w]\[\033[0m\] "
umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If running interactively, then:
if [ "$PS1" ]; then
# don't put duplicate lines in the history. See bash(1) for more options
# export HISTCONTROL=ignoredups
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
#shopt -s checkwinsize
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval `dircolors -b`
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
# set a fancy prompt
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# PS1="\[\033[1m\][\w]\[\033[0m\] "
#export PS1="\u: \w\\$ "
# If this is an xterm set the title to user@host:dir
case $TERM in
xterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc).
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi
fi
export PATH="/usr/bin:/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/X11R6/bin:/opt/java/jre/bin"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PS1="[\u@\h \\W]\\$"
export LANG=en_US
export LC_CTYPE="zh_CN"
export GTK_IM_MODULE=xim
export XMODIFIERS="@im=fcitx"
fcitx &>/dev/null
#alias ls="ls --color"
alias reboot="sudo reboot"
alias halt="sudo halt"
alias vim="sudo vim"
startx
配置xorg:[zhyfly@zhy2fly ~]$xorgconig
select the approtiate option according to your own Hardware of your PC.
(including keyboard, mouse, monitor, video card, etc.)
然后手动修改/etc/X11/xorg.conf以使得你的滚轮鼠标正常使用:
修改Option "Protocol" "PS/2"
为 Option "Protocol" "IMPS/2"
并添加下面一句Option "ZAxisMapping" "4 5"
安装字体见attachment.installpkg fontconfig-2.2.1-i486-1.Firefly.tgz
最后Ctrl+Alt+Backspace重启X,你就会看到英文界面,中文显示了^_^
当然到这里应该一切都正常了,但是我的fcitx就是用不了,可以出现fcitx的对话框,但是“拼音”显示为灰色,不可用,因为我想使用英文界面,中文输入,所以不想把LANG改成zh_CN,于是我本打算先升级内核,再解决fcitx的问题,这样我就到http://slackware.at/data/slackware-current/testing/packages/linux-2.6.11.11/
下载了slackware提供的最新内核:
README.initrd
kernel-generic-2.6.11.11-i486-1.tgz
kernel-modules-2.6.11.11-i486-1.tgz
kernel-source-2.6.11.11-noarch-1.tgz
alsa-driver-1.0.9b_2.6.11.11-i486-1.tgz
kernel-headers-2.6.11.11-i386-1.tgz
kernel-headers.WARNING
[zhyfly@zhy2fly linux2611]$sudo installpkg kernel-generic-2.6.11.11-i486-1.tgz
......
[zhyfly@zhy2fly linux2611]$sudo installpkg kernel-modules-2.6.11.11-i486-1.tgz
......
[zhyfly@zhy2fly linux2611]$cd /boot
[zhyfly@zhy2fly boot]$sudo mkinitrd -c -k 2.6.11.11 -m reiserfs
[zhyfly@zhy2fly boot]$
......
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-2.6.11.11
initrd = /boot/initrd.gz
root = /dev/hda3
label = SLK261111
read-only
image = /boot/vmlinuz
root = /dev/hda3
label = SLK2429
read-only
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/hda1
label = Windows
table = /dev/hda
# Windows bootable partition config ends
[zhyfly@zhy2fly etc]$sudo lilo
Added SLK261111 *
Added SLK2429
Added Windows
[zhyfly@zhy2fly etc]
而且装完后xmms等都可以正常显示中文,这还是我用linux以来第一次呢,并且我的X也是头一次感觉比windows的强多了……
附件下载: