其实最让我开心的是用debootstrap安装,就像是arch版的Debian。在清爽之极的同时还拥有强大的包后援(arch也不少)和社区(ubuntu的就是Debian的,哈哈哈~)。
==============================不想装嫩,但没办法我就是很嫩,所以我要说:好多地方我都不明白什么意思的如果下面有误人的地方请指出来===============================
主要参考:
http://forum.ubuntu.org.cn/viewtopic.php?f=165&t=292390
http://forum.ubuntu.org.cn/viewtopic.php?f=77&t=338764
http://www.linuxsir.org/bbs/thread357685.html这个是安完后发现的,所以基本没有看
以及百度前十几页debootstrap的作者(google确实好用,但总抽)
=========================
我用的是Ubuntu11.10的光盘,很简单,放光盘,进ubuntu,选试用,把网连上,调好分辨率,打开终端,和一个新文档
给root设置密码及进入root模式:
代码: 全选
$ sudo passwd root
设好后,进入root权限
$ su -
代码: 全选
# cfdisk /dev/sda
分好后,格式化
# mkfs.ext4 /dev/sda5
# mkfs.ext4 /dev/sda6
代码: 全选
# mkdir -v /newdebian
# mount /dev/sda5 /newdebian
# mkdir -v /newdebian/home
# mount /dev/sda6 /newdebian/home
代码: 全选
安装derootstrap
# wget http://mirrors.163.com/debian/pool/main/d/debootstrap/debootstrap_1.0.26+squeeze1_all.deb -------------我这里安装的是蝶变squeeze版本
# dpkg -i debootstrap_1.0.26+squeeze1_all.deb
运行debootstrap 安装基本系统,架构i386,版本代号 squeeze
# debootstrap --arch i386 squeeze /newdebian http://mirrors.163.com/debian/ --------改成自己挂的目录,架构,版本,选中的镜像
代码: 全选
# mount -o bind /dev /newdebian/dev
# mount -o bind /sys /newdebian/sys
# mount -t proc proc /newdebian/proc
# chroot /newdebian
代码: 全选
这个文件在/etc目录下,这里我就是临时写一个能让系统启动的,具体其它(如sda2 , tmpfs等分区)的等新系统设置完了再写,现在写太麻烦,我这里是:
# cat > /etc/fstab << "EOF"
> proc /proc proc defaults 0 0
> /dev/sda5 / ext4 defaults 0 1
> /dev/sda6 /home ext4 defaults 0 0
> EOF
代码: 全选
# cat > /etc/apt/sources.list << EOF
#下面的“#”可不是上面在命令行的意思,而是把后面的注释掉,因为这里我只想用sohu的镜像
#deb http://mirrors.163.com/debian squeeze main contrib non-free
#deb http://security.debian.org/debian-security squeeze/updates main contrib non-free
#deb http://mirrors.163.com/debian squeeze-updates main contrib non-free
## deb http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free
#deb http://mirrors.163.com/debian-multimedia squeeze main non-free
#deb http://mirrors.163.com/debian-backports squeeze-backports main #contrib non-free
deb http://mirrors.sohu.com/debian squeeze main contrib non-free
deb http://security.debian.org/debian-security squeeze/updates main contrib non-free
deb http://mirrors.sohu.com/debian squeeze-updates main contrib non-free
# deb http://mirrors.sohu.com/debian squeeze-proposed-updates main contrib non-free
deb http://mirrors.sohu.com/debian-multimedia squeeze main non-free
deb http://mirrors.sohu.com/debian-backports squeeze-backports main contrib non-free
#deb http://ftp.tw.debian.org/debian squeeze main contrib non-free
#deb http://security.debian.org/debian-security squeeze/updates main contrib non-free
#deb http://ftp.tw.debian.org/debian squeeze-updates main contrib non-free
## deb http://ftp.tw.debian.org/debian squeeze-proposed-updates main contrib non-free
#deb http://ftp.tw.debian.org/debian-multimedia squeeze main non-free
#deb http://ftp.tw.debian.org/debian-backports squeeze-backports main contrib non-free
#deb http://ftp.cn.debian.org/debian squeeze main contrib non-free
#deb http://security.debian.org/debian-security squeeze/updates main contrib non-free
#deb http://ftp.cn.debian.org/debian squeeze-updates main contrib non-free
## deb http://ftp.cn.debian.org/debian squeeze-proposed-updates main contrib non-free
###deb http://ftp.cn.debian.org/debian-multimedia squeeze main non-free
#deb http://ftp.cn.debian.org/debian-backports squeeze-backports main contrib non-free
#deb http://ftp.debian.org/debian squeeze main contrib non-free
#deb http://security.debian.org/debian-security squeeze/updates main contrib non-free
#deb http://ftp.debian.org/debian squeeze-updates main contrib non-free
## deb http://ftp.debian.org/debian squeeze-proposed-updates main contrib non-free
#deb http://ftp.cn.debian.org/debian-multimedia squeeze main non-free
#deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
代码: 全选
# cd /tmp
# wget http://ftp.tw.debian.org/debian-multimedia/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2010.12.26_all.deb
# dpkg -i debian-multimedia-keyring_2010.12.26_all.deb
# rm debian-multimedia-keyring_2010.12.26_all.deb
# cd -
代码: 全选
# aptitude update
# aptitude full-upgrade
代码: 全选
上面执行aptitude full-upgrade后会提醒语言没设,咱就设一下(主要是不知在哪个贴子(百度上的)看到说要在设置locales前要设一下)
# export LC_ALL="zh_CN.UTF-8"
# export LANG="zh_CN.UTF-8" -------------这步用不用忘了 ,反正用命令“ # locale ”看一下,除了LANGUAGE,其它后面没带"zh_CN.UTF-8" 的全弄上
# export LANGUAGE=zh_CN:zh_SG:zh_TW:zh_HK:zh:en_US:en -----------好像不用这么多的,我不懂了,两个贴子上的全放上
# aptitude full-upgrade ------------也是我自做主张加上的
代码: 全选
# aptitude install -R locales
# dpkg-reconfigure locales
在弹出的对话框中选中:
en_US.UTF8
en_US.ISO-8859-1
带zh_CN……打文头的
为了和前面的LANGUAGE=zh_CN:zh_SG:zh_TW:zh_HK……对应上,把zh_TW , zh_HK , zh_BIG 也选上吧
上面选好回车后,又出现个让你选的,这回选 zh_CN.UTF-8
额,选择/取消 用空格键
代码: 全选
# aptitude install -R console-data kbd-compat
如果上面弹出框时选择设置有误,不用担心,可以再次配置
# dpkg-reconfigure console-data
代码: 全选
# cat > /etc/kernel-img.conf << EOF
# Kernel image management overrides 这行和下行的“ # ”是注释
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
EOF
代码: 全选
# aptitude install grub-pc -------------------如果没有其它系统,可以把“ -R ”带上 ,也就是可以不安 os-prober ,它是用来发现其它系统的
这样直接“ aptitude install grub-pc ”安完后,如果有其它系统(如win7)它就会自发现,并给你配置好
代码: 全选
首先看下都有什么內核
# apt-cache search linux-image
我是用amd的但內存也不超3G ,用32位的,就选686了 ,这里特别感谢nmsfan,当时安到这步才想起自己不知用哪个,nmsfan给力援助
# aptitude install -R linux-image-2.6.32-5-686
安完后grub2会提示找到了新的內核,并自动配置好启动文件
代码: 全选
# echo "powernow_k8" >> /etc/modules
17.收尾我的联网方式是asdl,即拨号方式,所以安装pppoeconf ,方便。
# aptitude install -R pppoeconf
# vi /etc/network/interfaces -----------在其中加入下面两行:
auto lo
iface lo inet loopback
如果是别的联网方式,要设置/etc/network/interfaces,我没用过,就不多说了
更改hostname, 用你想用的主机名
# echo ABC > /etc/hostname
# vi /etc/hosts ----------------------确认你这个文件里有下面这一行,注意,“ABC”位置你上面和下面的必须要一样
127.0.0.1 localhost ABC
设置ROOT密码,要是没设,你重启后就登陆不了系统了
# passwd root
退出chroot
# exit
代码: 全选
卸载
# umount /newdebian/{dev,sys,proc}
# umount /newdebian/home
# umount /newdebian
退出root权限
# exit
重启系统(我还要把我的ubuntu11.10的光盘从光驱中拿出来)
以下你可以看或不看,但建意看下

1.你若是不用nano的话
代码: 全选
#aptitude purge nano tasksel tasksel-data
如果你习惯用sudo,还要安sudo: # aptitude install -R sudo 设置上网搜一下吧,arch的wiki新手指南中也有
3.关于xorg,及开源驱动
代码: 全选
我安xorg的时候,自动全给安上了(我的是ati)------ 现明白驱动没有问题,是因为KMS,如果你的KMS给不了你想要(应得)的分辨率。我现在知道的唯一方法就是把它关掉,那么你就要再次面对驱动了,这设置在我这很简单。想看更具体的驱动內容,见文尾“Debian/Ubuntu关于显卡驱动和KMS的一些资料”链接
# aptitude install -R xorg
5.若用alsa声显的话,只安alsa-utils就可以了,因alsa在內核已集成
代码: 全选
# aptitude install -R alsa-utils
安完后用:
$ alsamixer 就可以设置声音了
设置完别忘保存设置,即ESC出来后,执行
# alsactl store
代码: 全选
# vi /etc/default/rcS
UTC=yes ------ (如果不想用UTC,就是 UTC=no )
接着设置时区:
# dpkg-reconfigure tzdata
我选的是 Asia/Chongqing (列表挨的近,要是选上海,要把列表拉到S……的位置,浪费电,浪费资源,肿么没有北京?)
设置好了,较准下时间:
# aptitutde install -R ntpdate
安完后,执行:
# ntpdate cn.pool.ntp.org
同步后,把时间写入硬件:
# hwclock -w
上面提到的一些设置,及可用软件可参考http://forum.ubuntu.org.cn/viewtopic.php?f=155&t=363101
Debian/Ubuntu关于显卡驱动和KMS的一些资料(主ati)http://forum.ubuntu.org.cn/viewtopic.php?f=165&t=366466