文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>PXE 从网卡启动安装debian

PXE 从网卡启动安装debian

时间:2006-03-22  来源:woodysu

PXE 从网卡启动安装debian

Wednesday, 22. March 2006, 13:51:46

有一个本本无光驱,也不能从USB启动,只能用PXE方式从网卡启动安装。
局域网内已经有一个DHCP服务器了 但是这个DHCP服务器无法提供PXE服务。因此要自己建一个DHCP服务器,并且要将这个服务器和局域网隔离。
首先要找个switch和一个台式机(做DHCP服务器),将台式机,switch和本本组成一个小局域网。
第一步,在台式机apt-get install dhcpd 装dhcp服务端,然后配置台式机的interface
##################################
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.3
dns-nameservers 192.168.1.3
#################################

第二步.配置台式机的DHCP服务/etc/dhcpd.conf

############################
option domain-name "example.com";

default-lease-time 600;
max-lease-time 7200;

allow booting;
allow bootp;

# The next paragraph needs to be modified to fit your case
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.253;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
# the gateway address which can be different
# (access to the internet for instance)
option routers 192.168.1.3;
# indicate the dns you want to use
option domain-name-servers 192.168.1.3;
}

group {
next-server 192.168.1.3;
host tftpclient {
# tftp client hardware address
hardware ethernet 00:XX:XX:XX:xx:CC; #====>#这个是本本的MAC地址
filename "/tftpboot/pxelinux.0";
}
}

########################

第三步:apt-get install tftpd装一个tftp服务器,并且设置etc/inetd.conf的tftp段 指定tftpboot为tftp目录
(可以编辑inetd.conf的tftp段成如下例子)
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /opt/tftpboot

然后将netboot.tar.gz (这个在debian镜像里可以找到) (e.g :http://debian.cn99.com/debian/dists/sid/main/installer-i386/current/images/netboot/)
解压到tftpboot下,并下mini.iso到/tftpboot/下
然后本本从PXE启动就可以了,进入安装后到了选择DEBIAN安装镜像那一步时候 由于台式机和本本组成的小局域网和外界隔离所以无法找到镜像,这个时候可以拔下本本的网线 然后直接插到可以可以连到外面的交换机上(就是大局域网上),运行一把dhcpclient 就可以(让本本在不重新启动的情况下在新网络里通过DHCP重新分配IP,如果你的台式机没有和外界隔离并且提供DNS和网关服务就不需要这样插拔网线啦)。这样就完成了安装。

参照 DEBIAN的网络安装手册
  本BLOG镜像http://my.opera.com/yapo
相关阅读 更多 +
排行榜 更多 +
坦克无尽战役安卓版

坦克无尽战役安卓版

飞行射击 下载
这一关太烧脑

这一关太烧脑

休闲益智 下载
解压整理屋最新版

解压整理屋最新版

休闲益智 下载