|
(含bootsplash及ATI驱动安装)
刚装完新系统,作为记录,供刚入门者参考
准备分区
$ mkfs.reiserfs /dev/hdb3 (注:将目标分区格式代为reiserfs分区)
swap分区用原来linux系统的swap分区
$mkdir /mnt/debinst
$mount /dev/hdb3 /mnt/debinst(注:挂载目标分区)
准备debootstrap安装工具
$apt-get install debootstrap
安装基本系统
$export LC_ALL=C;export LANG=C(注:为安装设置初始locales)
$ping www.163.com (注:检查网络)
$debootstrap --arch i386 sid \
/mnt/debinst/ http://debian.cn99.com/debian
(注:在目标分区上安装sid基本系统)
进入新系统配置
$chroot /mnt/deinst /bin/bash (注:进入新系统)
$cat > /etc/fstab << "EOF"(注:编辑启动加载分区)
> proc /proc proc defaults 0 0
> /dev/hdb3 / reiserfs defaults 0 1
> /dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
> /dev/hdd /media/cdrom1 udf,iso9660 ro,user,noauto 0 0
> /dev/hdb8 none swap defaults 0 0
>EOF
$cat > /etc/network/interfaces << "EOF"(注:配置网卡)
> # The loopback network interface
> auto lo
> iface lo inet loopback
> # The primary network interface
> auto eth0
> iface eth0 inet static
> address 192.168.0.5
> netmask 255.255.255.0
> network 192.168.0.0
> broadcast 192.168.0.255
>EOF
$echo wxsheng > /etc/hostname(注:设定主机名)
$echo cdbz > /etc/dnsdomainname(注:设定域名,编译内核时要检查)
$cat > /etc/hosts << "EOF"(注:设置IP,主机名,域名对应关系,进入gnome时要检查)
> 127.0.0.1 localhost.localdomain localhost
> 192.168.0.5 wxsheng.cdbz wxsheng
>EOF
$cat > /etc/apt/sources.list << "EOF"(注:编辑apt下载源)
>#main
>deb http://debian.cn99.com/debian sid main contrib non-free
>deb http://debian.cn99.com/debian-non-US sid/non-US main contrib non-free
>deb-src http://debian.cn99.com/debian sid main contrib non-free
>deb-src http://debian.cn99.com/debian-non-US sid/non-US main contrib non-free
>#bootsplash
>deb http://www.bootsplash.de/files/debian unstable main
>deb-src http://www.bootsplash.de/files/debian unstable main
>#video Divers
>deb http://www.stanchina.net/~flavio/debian/ ./
>deb-src http://www.stanchina.net/~flavio/debian/ ./
>EOF
$ base-config (注:设置时区,root密码和用户,apt已设置过了,跳过即可)
$apt-get update (注:更新下载源列表)
$apt-get install locales (注:安装配置locales,选zh_CN.GB2312即可)
$apt-get install bzip2 bin86 libc6-dev libncurses5-dev patch
$apt-get install gcc g++ make module-init-tools
(注:以上两步为编辑内核作准备)
从ftp.kernel.org上下载2.6.10内核源代码,不要用debian镜像上的,
从http://www.bootsplash.de/files/bootsplash-3.1.4-2.6.10.diff下载bootsplash
的内核补丁,两个都下载到/usr/src
$cd /usr/src
$tar jxvf linux-2.6.10.tar.bz2
$ln -s linux-2.6.10 linux
$cd linux
$patch -p1 < ../bootsplash-3.1.4-2.6.10.diff(注:为内核打上bootsplash的补丁)
$make defconfig (注:让系统按电脑配置自动生成.config,可从此基础上改动)
$make menuconfig
在配置内核选项时要注意,在File systems选项中必须要选上ext2(initrd需要)和reiserfs(目标分区格 式),其它按自已需要
在Device Drivers选项下,
Block devices必须选中Initial RAM disk (initrd) support(bootsplash需要);
在Character devices中必须选中/dev/agpgart,去掉Direct Rendering Manager (安装ATI驱动需要);
在Graphics support中选中Support for frame buffer devices,VESA VGA graphics
support;Console display driver support中选中video mode selection support,
Framebuffer Console support,Select compiled-in fonts,VGA 8*16 font;
去掉Bootup logo选项,选中Bootup splash screen;
(注:以上选中的意思是将其编译到内核中)
$make
$make modules_install
$apt-get install grub (先安装上,不然安装内核时要报错)
$make install
$apt-get install bootsplash bootsplash-theme-debian sysv-rc-bootsplash
(下载完后出现对话框,选中bootsplash-theme-debian,下一步选none,将自动生成initrd.splash; sysv-rc-bootsplash是支持动画用的)
安装bootsplash后,编辑grub的menu.lst,在kernel /boot/vmlinuz-2.6.10 root=/dev/hdb3 ro
后加上 splash=silent vga=791,下面是我的menu.lst中新debian系统的引导项:
title DEBIAN
root (hd0,0)
kernel /boot/vmlinuz-2.6.10 root=/dev/hdb3 ro splash=silent
vga=791(注:此行和上面一行是同一行)
initrd /boot/initrd.splash
savedefault
boot
$apt-get install reiserfsprogs (注:启动时要经过reiserfs检验,先安装上)
编辑/etc/profile及root和用户目录中的.bashrc,加上
export LC_ALL=zh_CN.GB2312
export LANG=zh_CN.GB2312
这两行
$umount /proc
$exit
$umount /mnt/debinst
$reboot
重新启动后就可以看到漂亮的启动画面了,在上面列出的apt源上有许多bootsplash的theme,可以选择自己喜 欢的下载安装 |
|