|
我用 ubuntu-8.04-livecd 启动虚拟机参照 http://www.debian.org/releases/stable/amd64/apds03.html.zh_CN (通过 Unix/Linux 系统来安装 Debian GNU/Linux)安装,竟发现有些错误之处。现贴出整理后并实际通过安装的步骤。
- // 分区、创建文件系统、挂载于 /mnt/debian
- // 下载、安装 debootstrap
- wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.11_all.deb
- dpkg -i debootstrap_1.0.11_all.deb
- // 运行 debootstrap 安装基本系统
- debootstrap --arch amd64 lenny /mnt/debian http://ftp.debian.org/debian/
- // 挂载/proc和/dev
- mount -t proc proc /mnt/debian/proc
- mount -o bind /dev /mnt/debian/dev
- // 换根
- LANG=C chroot /mnt/debian /bin/bash
- export PS1='[chroot]\W\$ '
- alias ls='ls -AF'
- //------------------------------------------------------------
- // 文件系统列表
- vi /etc/fstab {
- /dev/sda2 / ext3 defaults 0 1
- /dev/sda1 none swap sw 0 0
- proc /proc proc defaults 0 0
- }
- // 网络
- vi /etc/network/interfaces {
- auto lo
- iface lo inet loopback
- auto eth0
- iface eth0 inet dhcp
- }
- vi /etc/hostname {
- debian
- }
- vi /etc/resolv.conf {
- } //实际上 debootstrap 程序已经从宿主系统复制了一份,此处列出只为完整性
- // 软件源
- // 我用的就只是 http://ftp.debian.org/debian ,所以这一步并未更改什么
- vi /etc/apt/sources.list {
- }
- aptitude update
- // 时区
- vi /etc/default/rcS {
- UTC=no
- } // 如果你的硬件时钟不是 UTC 的话
- dpkg-reconfigure tzdata
- // 本地化和键盘
- aptitude install locales
- dpkg-reconfigure locales
- aptitude install console-data
- //----------------------------------------------------------------
- // 先于内核安装 grub,后于内核则会出错
- aptitude install grub
- grub-install /dev/sda
- update-grub
- vi /boot/grub/menu.lst {
- }
- //----------------------------------------------------------------
- // 内核映象配置文件
- vi /etc/kernel-img.conf {
- # 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
- postinst_hook = update-grub
- postrm_hook = update-grub
- }
- // 查找安装内核
- aptitude search ^linux-image
- aptitude install linux-image-2.6-amd64
- //----------------------------------------------------------------
- // 密码
- passwd
- //---------------------------------------------------------------
- // 安装软件,请根据需要自行斟酌
- export LANG=zh_CN.UTF-8
- tasksel
复制代码 |
|