热门关键字:  ubuntu  分区  Fedora  linux系统进程  函数

当前位置 :| 主页>Linux教程>linux安装>

linux 远程安装

来源: 作者: 时间:2008-07-03 Tag: 点击:
PXE(Pre-boot Execution Environment)是由Intel设计的协议,它可以使计算机通过网络启动。协议分为client和server两端,PXE client在网卡的ROM中,当计算机引导时,BIOS把PXE client调入内存执行,并显示出命令菜单,经用户选择后,PXE client将放置在远端的操作系统通过网络下载到本地运行。
  PXE协议的成功运行需要解决以下两个问题:
既然是通过网络传输,那么计算机在启动时,它的IP地址由谁来配置;
通过什么协议下载Linux内核和根文件系统
  对于第一个问题,可以通过DHCP Server解决,由DHCP server来给PXE client分配一个IP地址,DHCP Server是用来给DHCP Client动态分配IP地址的协议,不过由于这里是给PXE Client分配IP地址,所以在配置DHCP Server时,需要增加相应的PXE特有配置。
  至于第二个问题,在PXE client所在的ROM中,已经存在了TFTP Client。PXE Client使用TFTP Client,通过TFTP协议到TFTP Server上下载所需的文件。
  这样,PXE协议运行的条件就具备了,下面我们就来看看PXE协议的工作过程。

有了前面的背景知识,接下来就可以正式操作了,下面按照顺序给出了操作步骤:
  1) 配置DHCP Server
  选用ISC dhcp-3.0,DHCP Server的配置文件是/etc/dhcpd.conf,配置文件的内容如下:

option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
# At least one of the vendor-specific PXE options must be set in
# order for the client boot ROMs to realize that we are a PXE-compliant
# server. We set the MCAST IP address to 0.0.0.0 to tell the boot ROM
# that we can't provide multicast TFTP (address 0.0.0.0 means no
# address).
option PXE.mtftp-ip 0.0.0.0;
# This is the name of the file the boot ROMs should download.
filename "pxelinux.0";
# This is the name of the server they should get it from.
next-server 192.168.0.1;
}
ddns-update-style interim;
ignore client-updates;
default-lease-time 1200;
max-lease-time 9200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.254;
option domain-name-servers 192.168.0.1,192.168.0.2;
option domain-name "mydomain.org";
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.10 192.168.0.100;
}
host q10 {
hardware ethernet 00:00:F0:6B:38:5B;
fixed-address 192.168.0.22;
}


  dhcpd.conf配置文件中几个关键部分说明如下:host q10{…}定义了笔记本Q10网卡的MAC地址与IP地址的对应关系,表明DHCP Server为Q10分配一个固定的IP:192.168.0.22;filename ""指定bootstrap的文件名;netx-server指定TFTP Server的地址。其它的配置请读者参考DHCP Server的手册。
  2) 配置TFTP server
  选用tftp-hpa,TFTP Server的配置文件是/etc/xinetd.d/tftp,配置文件的内容如下:

service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -u nobody -s /tftpboot
disable = no
per_source = 11
cps = 100 2
}


  这里制定了/tftpboot为TFTP Server的根目录位置。


相关文章:
Linux 系统安装
给您的U盘安装linux
其实是可以用虚拟光驱在虚拟机上装linux的
CentOS 4.7 for i386安装
利用虚拟机在移动硬盘中安装Puppy Linux
X86上4系统的安装
通过chroot 构建Linux操作系统概要
FreeBSD安装小记
freebsd7 硬盘安装
制作initrd镜像 -- 续前
RHEL5安装序列号
rhel5硬盘安装常见问题
linux 远程安装
在VirtualBox中安装Solaris的一点说明
USB Damn Small Linux install
硬盘安装Damn Small Linux
damn small linux 安装方法
安装centos
Solaris 11 安装图解(1)
Solaris 11 安装图解(2)
Solaris 11 安装图解(3)
Solaris 11 安装图解(4)
Solaris 11 安装图解(5)
Solaris 11 安装图解(6)
Solaris 11 安装图解(7)
Solaris 11 安装图解(8)
portable linux 安装成功
如何在Vista系统下使用虚拟机安装Linux
包括Wingrub的GRUB命令模式安装Linux
如何从硬盘分区上安装solaris10