centos7搭建clonezilla PXE启动(不需要配置dhcp服务器)
2017-06-14 16:12
435 查看
这几天在研究clonezilla的PXE网络启动,因为公司的DHCP服务器无法改动,所以就想了个其他法子来搭建
1.安装pxe-pdhcp
使用pxe-pdhcp来做转发,这个工具很好用,支持跨网段的PXE启动
https://github.com/frsyuki/pxe-pdhcp 这个是链接
先下载安装包
pxe-pdhcp-master.zip
解压上传到linux服务器
编译完成,然后启动
其中-d是debug模式,也就是会有很多输出信息,-t 后面加tftp服务器,命令可能会提示“address already in use”,检查端口占用情况“netstat -apn”,kill掉占用的程序
这些是替代DHCP配置的内容,很方便
2.配置clonezilla PXE启动文件
可以参考http://blog.csdn.net/wmj2004/article/details/53215906
我做了以下改动,把NFS移到windows服务器上去了,因为我所有的镜像都在windows服务器上面存放,
另外修改了default文件
++++++++++++++++++++++++++++++++++++++++
DEFAULT vesamenu.c32
MENU TITLE === PXE Boot Server ===
menu color title 1;36;44 #ffffffff #00000000 std
LABEL fog.local
localboot 0
MENU DEFAULT
MENU LABEL Boot from hard disk
TEXT HELP
Boot from the local hard drive.
If you are unsure, select this option.
ENDTEXT
LABEL fog.clonezilla
kernel /clonezilla/vmlinuz
append initrd=/clonezilla/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt
netboot=nfs nfsroot=serverIP:/clonezilla
MENU LABEL Run Clonezilla
TEXT HELP
This mode will allow you run Clonezilla to Backup/Restore OS!
ENDTEXT
PROMPT 0
TIMEOUT 300
+++++++++++++++++++++++++++++++++++++++++
注意这里的union一定要用overlay,否则会出现aufs的报错
具体可以参考这篇文章,https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/0f8505b0/?limit=25
3.tftp服务器搭建
编辑TFTP服务器的配置文件/etc/xinetd.d/tftp
+++++++++++++++++++++++++
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
+++++++++++++++++++++++++++++++
把路径改为了/tftpboot,重启xinetd服务,我的server不知道怎么搞的,xinetd启动一直失败,必须手动启动一下,systemctl start xinetd.services
并且需要关闭firewall,iptables,selinux
4.nfs服务器的搭建
windows创建nfs可以参考这篇文章,https://wenku.baidu.com/view/355c8160647d27284a735125.html
参考的文章:http://blog.csdn.net/wmj2004/article/details/53215906
https://wenku.baidu.com/view/aafb143910661ed9ad51f3e0.html
https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/0f8505b0/?limit=25
https://wenku.baidu.com/view/355c8160647d27284a735125.html
1.安装pxe-pdhcp
使用pxe-pdhcp来做转发,这个工具很好用,支持跨网段的PXE启动
https://github.com/frsyuki/pxe-pdhcp 这个是链接
先下载安装包
pxe-pdhcp-master.zip
解压上传到linux服务器
cd pxe-pdhcp-master make
编译完成,然后启动
pxe-pdhcp-master/pxe-pdhcp -l 0.0.0.0 -b 255.255.255.0 -t 192.168.1.2 -d pxelinux.0
其中-d是debug模式,也就是会有很多输出信息,-t 后面加tftp服务器,命令可能会提示“address already in use”,检查端口占用情况“netstat -apn”,kill掉占用的程序
usage: pxe-pdhcp [-d] [-i interface] [-l listen address] [-t tftp address] [-b broadcast address] <nbp name>
这些是替代DHCP配置的内容,很方便
2.配置clonezilla PXE启动文件
可以参考http://blog.csdn.net/wmj2004/article/details/53215906
我做了以下改动,把NFS移到windows服务器上去了,因为我所有的镜像都在windows服务器上面存放,
另外修改了default文件
++++++++++++++++++++++++++++++++++++++++
DEFAULT vesamenu.c32
MENU TITLE === PXE Boot Server ===
menu color title 1;36;44 #ffffffff #00000000 std
LABEL fog.local
localboot 0
MENU DEFAULT
MENU LABEL Boot from hard disk
TEXT HELP
Boot from the local hard drive.
If you are unsure, select this option.
ENDTEXT
LABEL fog.clonezilla
kernel /clonezilla/vmlinuz
append initrd=/clonezilla/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt
netboot=nfs nfsroot=serverIP:/clonezilla
MENU LABEL Run Clonezilla
TEXT HELP
This mode will allow you run Clonezilla to Backup/Restore OS!
ENDTEXT
PROMPT 0
TIMEOUT 300
+++++++++++++++++++++++++++++++++++++++++
注意这里的union一定要用overlay,否则会出现aufs的报错
具体可以参考这篇文章,https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/0f8505b0/?limit=25
3.tftp服务器搭建
编辑TFTP服务器的配置文件/etc/xinetd.d/tftp
+++++++++++++++++++++++++
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
+++++++++++++++++++++++++++++++
把路径改为了/tftpboot,重启xinetd服务,我的server不知道怎么搞的,xinetd启动一直失败,必须手动启动一下,systemctl start xinetd.services
并且需要关闭firewall,iptables,selinux
4.nfs服务器的搭建
windows创建nfs可以参考这篇文章,https://wenku.baidu.com/view/355c8160647d27284a735125.html
参考的文章:http://blog.csdn.net/wmj2004/article/details/53215906
https://wenku.baidu.com/view/aafb143910661ed9ad51f3e0.html
https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/0f8505b0/?limit=25
https://wenku.baidu.com/view/355c8160647d27284a735125.html
相关文章推荐
- Fedora搭建服务器,DHCP+TFTP+FTP+PXE启动安装CentOS
- 搭建PXE网络启动服务器安装CentOS7系统
- Fedora搭建服务器,DHCP+TFTP+FTP+PXE启动安装CentOS
- linux下网路启动服务器安装和配置方法(pxe+tftp+dhcpd)
- 宇宙沸腾SCCM 2012 R2系列(9)OSD操作系统部署(一)-启用PXE,启动映像,配置DHCP
- RHEL/CentOS 7 中配置 PXE 网络启动服务器
- CentOS 6.5下dhcp服务器搭建与配置
- Windows 网络服务架构系列课程详解(一) ----DHCP服务器的搭建与配置
- 如何在RHEL5.7下搭建和配置DHCP服务器
- CentOs 7 搭建DHCP服务器 启动报错
- 三层交换机的配置和DHCP服务器的搭建
- linux下网路启动服务器安装和配置方法(pxe+tftp+dhcpd)
- Windows 网络服务架构系列课程详解(一) ----DHCP服务器的搭建与配置
- 配置Linux DHCP+TFTP+NFS(FTP|HTTP)通过PXE启动安装Cent OS操作系统
- Ubuntu10.04+mini2440下ARM-linux开发环境搭建(2)----NFS服务器的配置及通过NFS启动linux
- DHCP服务器的搭建与配置
- windows php nginx服务器搭建 配置 创建启动 停止 重启脚本