首页 > 其他 > 详细

通过clonezilla+dhcp+tftp+samba组合,实现网络安装系统

时间:2014-02-18 20:02:53      阅读:494      评论:0      收藏:0      [点我收藏+]

通过clonezilla+dhcp+tftp+syslinux+samba组合,实现网络安装操作系统

工作环境:

  系统:CentOS6.4(iptables stop,selinux disable)

  硬件:普通PC机

 软件环境:

  clonezilla(再生龙) stable releases - 2.2.1-25 \i486\zip  (详细介绍和下载:www.clonezilla.org

  dhcp

  tftp

  syslinux

  samba

 操作步骤:

  软件安装:yum install dhcp

       yum install tftp-server

       yum install syslinux   (详细介绍:http://www.syslinux.org 最新版本可以在这里下载:https://www.kernel.org/pub/linux/utils/boot/syslinux/)

       yum install samba

  软件配置:dhcp服务器配置(vi /etc/dhcp/dhcpd.conf)

bubuko.com,布布扣
default-lease-time      259200;
max-lease-time          518400;
subnet 10.45.16.0 netmask 255.255.255.0 {
       # range dynamic-bootp  10.45.16.50 10.45.16.99;
        range   10.45.16.50 10.45.16.99;
        option broadcast-address  10.45.16.255;
        option routers 10.45.16.254;
        next-server     10.45.16.247;
        filename        "gpxelinux.0";
}
bubuko.com,布布扣

      tftp服务器配置(vi /etc/xinetd.d/tftp)

bubuko.com,布布扣
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot         #设定共享目录
        disable                 = no           #默认为yes,修改为no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
bubuko.com,布布扣

      samba服务器配置(vi /etc/samba/smb.conf)(将镜像文件拷贝到/home/samba)

bubuko.com,布布扣
[global]
#设定工作组
workgroup = WORKGROUP server string = Samba Server Version %v

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#设置为不用密码访问
        security = share
;       passdb backend = tdbsam

#============================ Share Definitions ==============================

# A publicly accessible directory, but read only, except for people in
# the "staff" group
#设定path共享目录
        [public]
        comment = Public Stuff
        path = /home/samba
        public = yes
        writable = yes
;       printable = no
;       write list = +staff



bubuko.com,布布扣

       设置tftp共享目录

bubuko.com,布布扣
cd /
mkdir tftpboot
cd tftpboot
cp /usr/share/syslinux/gpxelinux.0 /tftpboot
cp /usr/share/syslinux/vesamenu.c32 /tftpboot
mkdir clonezilla
#在clonezilla官网下载PXE版,解压将里面live文件夹拷贝到这个文件夹下
mkdir pxelinux.cfg
cd pxelinux.cfg     #  客户端通过PXE启动,会自动在该文件夹搜寻启动菜单
vi default #  添加启动菜单
UI vesamenu.c32
TIMEOUT 300
MENU TITLE Welcome to MY PXE Server System
LABEL Clonezilla-live
MENU LABEL Clonezilla Live (Ramdisk)
KERNEL ./clonezilla/live/vmlinuz
APPEND initrd=./clonezilla/live/initrd.img boot=live config noswap nolocales edd=on nomodeset ocs_live_run="ocs-live-general" ocs_live_extra_param="" keyboard-layouts="" ocs_live_batch="no" locales="" vga=788 nosplash noprompt fetch=tftp://10.45.16.247/clonezilla/live/filesystem.squashfs


bubuko.com,布布扣

       重启服务

bubuko.com,布布扣
service dhcpd restart
service xinetd restart
service smb restart
bubuko.com,布布扣

 

      客户端测试

通过clonezilla+dhcp+tftp+samba组合,实现网络安装系统

原文:http://www.cnblogs.com/nearsun/p/3552989.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!