debian下的无盘linux系统安装要点
2007-12-09    刘世伟   
打印自: 安恒公司
地址: HTTP://dsp-lt.anheng.com.cn/news/article.php?articleid=1332
debian下的无盘linux系统安装要点
1.用debootstrap先做一个基本的系统,
mkdir /home/nfs/etch
debootstrap --arch=i386 etch /home/nfs/etch  http://debian.anheng.com.cn/debian
2.chroot进入基本系统,
mount -t proc none /home/nfs/etch/proc
chroot /home/nfs/etch
3.调整initrd,
  initrd是启动时的临时的内存文件系统,用来加载网络驱动,并挂载nfs做根,需要把网卡的驱动模块
  放进initrd.img,还要调整一些设置,让系统通过nfs启动,而不是local硬盘。
  chroot:/#echo 8139cp >>/etc/initramfs-tools/modules
  chroot:/#echo r8169 >>/etc/initramfs-tools/modules
  chroot:/#echo tg3 >>/etc/initramfs-tools/modules
  chroot:/#echo sis900 >>/etc/initramfs-tools/modules
  chroot:/#echo via-rhine >>/etc/initramfs-tools/modules
4.让initrd.img使用网络启动
  文件:/etc/initramfs-tools/initramfs.conf
   MODULES=netboot
   BOOT=nfs
   NFSROOT=auto
5.更新initrd.img
  chroot:/#update-initramfs -u -t -k all
6.将内核和initrd.img复制到tftpd的根目录。
7.安装和设置tftpf-hpa和dhcp3-server
8.修改nfs-kernel-server的设置,
9.无盘启动进命令行。进行后续的安装
10.建立/dev/input目录,否则udev下的鼠标不能工作。
11.在无盘系统的/etc/network/interfaces下的eth0不要设置为自动启用,
      也就是把auto eth0 或者 allow-hotplug eth0要注释掉。
12.debian会记录网卡的mac,然后用udev将新网卡依次命名为eth1,eth2,eth3
      所以在形成initrd.img之前,应该把历史网卡mac记录清掉。
      清空/etc/udev/rules.d/z25_persistent-net.rules即可
责任编辑: admin