I should say the new debian GNU/Linux LENNY is an excellent platform to meet various users' needs.

Before starting our installation, the new version of debootstrap and chroot should work on your machine.
Information about chroot can be found an "http://en.wikipedia.org/wiki/Chroot".
These two software should have been contained in the repository of most of the popular distributions such as redhat/debian/suse, etc. "yum install chroot debootstrap -y" should work on RHEL/Centos/Fedora, and "apt-get install chroot debootstrap -y" should work on Debian/Ubuntu.

The operations below need root priviledge. The following command line started with a '#' should be perform on you existing system, and the line start with two '#'s should be perform in the chrooted environment. Additional the line started with three '#'s should be perform after the new debian lenny was boot up.

Let's GO!

1 - PREPARE DISK SPACE
 1.1 - I just want to install my new Debian LENNY on /dev/sda3, you should replace this with own choice.
# mke2fs -j /dev/sda3
# mkswap /dev/sda8
# sync; sync; sync
# swapon /dev/sda8
 1.2 - mount the partition.
#mkdir /debian
#mount /dev/sda3 /debian

2 - INSTALL BASIC SYSTEM WITH DEBOOTSTRAP.
# debootstrap --arch i386 lenny /debian/ URL
 replace "URL" with the mirror you have chosen, eg:
# debootstrap --arch i386 lenny /debian/ ftp://ftp3.tsinghua.edu.cn/mirror/debian/debian

3 - CHROOT TO THE NEW SYSTEM.

#LANG=C chroot /debian/ /bin/bash

4 - NOW WE ARE IN THE CHROOTED SYSTEM, A BRAND NEW WORLD
mount the /proc filesystem
## mount -t proc proc /proc

perform some initial operation.
## MAKEDEV

5 - CONFIGURE LENNY.
configure the filesystem.
## editor /etc/fstab
## mount -a

configure the network.
## editor /etc/network/interfaces
## echo HOSTNAME >> /etc/hostname
## editor /etc/hosts

6 - OTHER CONFIGURATION AND PACKAGES TO INSTALL.
configure sourcelist of you mirror.
## editor /etc/apt/source.list
## aptitude update

configure system locales.
## aptitude install locales
## dpkg-reconfigure locales

------------- optional : after reboot  ---------------
### aptitude install console-data
### dpkg-reconfigure console-data
------------------------------------------------

7 - KERNEL AND BOOTLOADER.
find some kernel files to boot your machine.
## apt-cache search linux-image
## aptitude install linux-image-2.6.26-1.686
## editor /etc/kernel-img.conf

install the grub bootloader
## aptitude install grub
## grub-install /dev/sda3
## update-grub

8 - AUTOMATICALLY INSTALL SOME PACKAGE.
install basic system packages.
## tasksel install standard
## aptitude clean

install various packages for laptop and desktop application, OPTIONAL.
## tasksel install laptop
## tasksel install desktop

8 - REBOOT TO LENNY.
 iT works, HAVE FUN!
--
Liu Lantao
College of Information Science and Technology, Beijing Normal University
EMAIL: liulantao ( at ) gmail ( dot ) com ;
WEBSITE: http://www.liulantao.com/ .
------

公众号推荐

知识分享行动
每天 10:24
只聊技术细节
扫码立即参与
知识分享行动