免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1320 | 回复: 0
打印 上一主题 下一主题

PXE 从网卡启动安装debian [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-22 21:58 |只看该作者 |倒序浏览

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


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7665/showart_89389.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP