|
先做个大体记录:
1, install linux from a USB flash drive
Format the USB flash drive (assume it sdb).
# fdisk /dev/sdb /* Edit partition table. Get sdb1 . */
# mkfs.ext3 /dev/sdb1 /* Format sdb1 to ext3 */
Copy /boot from a linux with GRUB to /dev/sdb1 .
Copy /boot from a linux with GRUB to /dev/sda1 .
Install GRUB loader stage1,stage2 into first 1024 bytes of sdb :
grub> root (hd0,0) # boot from (hd0,0). BIOS only boot from hd0(sdb then).
grub> setup (hd1) # write the 'root ()' information to hd1(sdb now).
Copy 'vmlinuz' and 'initrd.gz' for hd-disk install to (sdb)/boot/newinstall/ .
('vmlinuz' and 'initrd.gz' download from
ftp://ftp.debian.org/debian/dist ... i386/current/images )
Copy the *.iso for installing to (sdb) .
Add the following lines to (sdb)/boot/grub/menu.lst
title New Install
kernel (hd0,0)/boot/newinstall/vmlinuz
initrd (hd0,0)/boot/newinstall/initrd.gz
and reboot.
2, base-config debian
1, install debian base system
Use debian-*-netinst.iso to install.
2, locale config
(See kernel version: $ uname -r )
# dpkg-reconfigure locales
choose: en_US.UTF-8 zh_CN.UTF-8 zh_CN.GB2312
choose default locale: en_US.UTF-8
3, network config (need reboot)
# vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.11
netmask 255.255.255.0
gateway 192.168.1.1
# vi /etc/resolv.conf
nameserver 192.168.1.1
4, apt config
# vi /etc/apt/sources.list
deb file:///disk debs/ # see 'harddisk apt source'
deb http://debian.ustc.edu.cn/debian stable main
# apt-get update
/* file share */
# apt-get install proftpd
Setup proftpd
# vi /etc/proftpd/proftpd.conf
# /etc/init.d/proftpd restart
用系统当前用户登录, 获得当前用户权限.
(unsafe configuration. shutdown the service when useless.)
3, xserver-xorg and alsa(sound)
# apt-get install xserver-xorg
# dpkg-reconfigure xserver-xorg
# apt-get install alsa-base alsa-utils /* sound driver */
# alsaconf
# alsactl store
4, desktop: lxde
# apt-get install lxde
# apt-get install vim-gtk dia gimp
# apt-get install gcc gdb make libgtk2.0-dev
# apt-get install postgresql libpq-dev
# apt-get install fcitx /* Input */
$ im-switch -s fcitx -z default
auto start
# vi /etc/rc2.d/S99rc.local
arp -s 202.194.201.254 00:d0:05:22:34:0a
harddisk apt source
# mkdir /disk/debs
# copy /var/cache/apt/archives/*.deb /disk/debs
# cd /disk
# dpkg-scanpackages debs /dev/null | gzip > debs/Packages.gz /* need dpkg-dev.deb */
for sources.list:
deb file:///disk debs/ #apt-get will get /disk/debs/Packages.gz
# 'disk' can be changed, but 'debs' not. |
|