4. 唯一正确的方法

我们以 debian 'potato' (2.2) 版本为例。无论您选择哪个发行版,只要它能在 2.0.35 kernel 上运行,此过程都应类似。

在您的服务器上创建 kernel 和 file system 的目录,挂载并从 Compaq CD 复制文件。解压 file system(这里我使用 debian 版本的预制 tar ball,此处不作进一步讨论)

mkdir /exports/T1500 
mkdir /exports/T1500/root 
mkdir /exports/T1500/tftpboot
mount /cdrom
cp /cdrom/product/vmlinux /exports/T1500/tftpboot
CD /exports/T1500/root
tar zxvf /tmp/base2_2.tgz 
tar zxvf /tmp/telnetd*.tgz

通过将如下部分添加到您的 /etc/dhcpd.conf 来配置 DHCP。将以太网地址更改为您的 T1500 的地址。

Group {
   #little black box
   host box {
   	 hardware ethernet 00:80:64:10:1d:1c;
     fixed-address box.house;
     option host-name "box";
     server-name "192.168.1.1";
     filename "/exports/T1500/tftpboot/vmlinux";
     option root-path "192.168.1.1:/exports/T1500/root";
     }
   }

在 DNS 中配置新主机

db.192.168.1.1:
   52 in ptr box.
db.house:
   box in a 192.168.1.52

通过添加以下内容导出 root file system

/exports/T1500/root box(rw,no_root_squash)

到 /etc/exports

通过添加/更改行到 /etc/inetd.conf 来配置 tftp

tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /exports/T1500/tftpboot

现在重启 inetd,dhcpd,nfs 和 named

通过将 root 密码设置为 'pass',暴露 telnetd 来配置 file system

/exports/T1500/root/etc/passwd,更改第一行:root:Z/U2u32VhNJoA:0:0:,,,:/root:/bin/bash

/exports/T1500/root/etc/inetd.conf,添加: telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd

将远程终端附加到 /etc/securetty 以允许远程 root 访问。

tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12
ttyp0
ttyp1
ttyp2
ttyp3

在 T1500 上选择网络启动并重启它。

一旦它启动,您应该能够 telnet 进入 T1500。此时,您应该配置 SSH,并关闭 inetd 中的 telnet 漏洞。