admin 管理员组

文章数量: 887021


2024年1月17日发(作者:dig bick)

Setup Linux PXE server via IPv6

Author:Anlon Long

Date: 2013-3-22

Precondition:

一, Redhat 6.3 x 64 OS.

1, IPv6 DHCP server.

2, TFTP server

3, NFS, ftp or HTTP server.

二,one network card which is support on uEFI mode via IPv6 boot.

Setup

1,Install DHCPD6,TFTP,NFS server

2. config tftp server

vim /etc/xinetd.d/tftp

service tftp

{

protocol = udp

socket_type = dgram

wait = yes

flags = IPV6 IPv4

user = root

server = /usr/sbin/

server_args = -s /var/lib/tftpboot

disable = no

}

3. config DHCP6 server

option -servers 2000::1;

option le-url code 59 = string ;

subnet6 2000:0:0:0::/64 {

option le-url "tftp://[2000::1]/";

range6 2000:0:0:0::100 2000:0:0:0::2000;

range6 2000:0:0:0:: temporary;

prefix6 2000:0:0:0:: 2000:0:0:0:: /64;

}

4, assign the IPv6 2000::1 for eth0.

5. copy and to /var/lib/tftpboot and config

ISO IMG to /home/iso

the nfs config

Vi /etc/exports

/home/* (rw,sync)

/home/iso *(rw,sync)

8. service ip6tables stop

Service iptables stop

Service dhcpd6 restart

Service xinetd restart

Service nfs restart

9. SUT boot from uEFI mode ipv6 PXE.

注意: 架设IPV6 PXE 要配置如下文件(以suse11为例):

1 把ISO(要安装的ISO)复制到var/ftp/pub/suse11sp2x64(根据不同的系统做改变)下面。

2 取出suse11sp2x64 os 下面的efi文件到/home下面,作为loop文件挂载 /mount –o loop efi /mnt,到mnt下面取出

initrd linux四个文件 (rehat6.3的可以直接到os下的/imgae/pxeboot里面找到initrd linux这两个文件)。

3 把改名为 ,然后把和复制到/var/lib/tftpboot下面,把initrd 和linux改名为 和

suse11sp2,然后复制到/var/lib/tftpboot/suse11sp2x64下面。

4 config DHCP6 server (/etc/dhcp/)

subnet6 2000::/64 {

range6 2000::1000 2000::ffff;

option le-url “tftp://[2000::4]/”;

rang6 2000:: temporary;

}

4, assign the IPv6 2000::4 for eth0.

5, config tftp文件

{

Socket_type = dgram

Protocol =udp

Wait = yes

User =root

Server =/usr/sbin/

Server_args = -s /var/lib/tftpboot (这里的路径是可以改变的,我在此处保持默认的)

Disable =yes (将此处的yes改为no)

Per_source =11

Cps =100 2

Flags =IPv4 (将此处的IPv4改为IPv6)

6 config 文件(/etc/vsftpd/)

个人认为只要改下面三处就OK了

anonymous_enable=YES

listen_ipv6=YES

userlist_enable=no

7 config 文件(/var/lib/tftpboot/)

Image=suse11sp2x64/suse11sp2x64

label=suse11sp2x64

append=”install=ftp://[2000::4]/pub/suse11sp2x64 ipv6=1”

(一定要注意把ipv6=1这里,如果这里写成ipv6=dhcp的话,对于suse是安装不了的,会出错。但如果是其它的os的话就可以写成ipv6=dhcp)

description=”SLES 11 SP2 x86_64 GA”

initrd=suse11sp2x64/

8 配置好后,开启下面的服务

service ip6tables stop

service iptables stop

service dhcpd6 restart

service xinetd restart

service vsftpd restart


本文标签: 改变 文件 安装 不了