通过网络PXE引导再生龙Clonezilla Live CD.docx_第1页
通过网络PXE引导再生龙Clonezilla Live CD.docx_第2页
通过网络PXE引导再生龙Clonezilla Live CD.docx_第3页
通过网络PXE引导再生龙Clonezilla Live CD.docx_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Clonezilla 是什么Clonezilla 是一个样似 Ghost 的分区或磁盘复制软件。它单单存储及还完硬盘上已使用的数据块。 Clonezilla 的特点 免费(GPL)软件。 支持的文件系统:GNULinux 的 ext2、ext3、reiserfs、xfs、jfs,及微软 Windows 的 FAT、NTFS。因此你可以复制 GNULinux 或微软 Windows。至於其它文件系统,Clonezilla 利用 dd 来转储整个分区。 支持 GNULinux 下的 LVM2。 建基於 Partimage、ntfsclone 及 dd 来复制分区。然而 Clonezilla 除了针对分区外,亦收录了其它程序来存储及还完整个硬盘。 假若文件系统获支持(ext2、ext3、reiserfs、xfs、jfs、fat、ntfs),只有硬盘上已使用的数据块才会被存储及还完。这提升了复制的效率。至於未被支持的文件系统,Clonezilla 会利用 dd 来复制每个扇区。 先决条件: 运作中的 DHCP、PXE、TFTP、及 NFS 服务器 Clonezilla LiveCD 本实验把NFS/DHCP/TFTP全部做在一台机器上,IP是一定要关闭firewall,否则tftp端口不能正常工作一、配置DHCP 服务器1、 安装DHCP服务器包。2、 编辑DHCP服务器配置文件 /etc/dhcp.conf。以下是一个示例:=+=+=+=+=+=#/etc/dhcpd.confddns-update-style none;option domain-name localhost;option subnet-mask ;allow bootp;allow booting;subnet netmask range dynamic-bootp 54; option routers ; option subnet-mask ; default-lease-time 21600; max-lease-time 43200; filename pxelinux.0; next-server ;3、启动DHCP服务service dhcpd restart二、TFTP服务器1、安装TFTP服务器包。2、 编辑TFTP 服务器的配置文件 /etc/xinetd.d/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 tftpsocket_type= dgramprotocol= udpwait= yesuser= rootserver= /usr/sbin/in.tftpdserver_args= -s /tftpbootdisable= noper_source= 11cps= 100 2flags= IPv4=+=+=+=+=+=这里选定了/tftpboot为TFTP 服务器的根目录位置。3、重启xinetd服务service xinetd restart4、创建/tftpboot目录。=+=+=+=+=+=mkdir/tftpboot=+=+=+=+=+=5、将启动镜像文件pxelinux.0复制到TFTP服务器根目录,把/isolinux中的文件都copy到/tftpboot 目录中去cp/usr/lib/syslinux/pxelinux.0/tftpboot 6、把Linux第一张安装光盘上/image/pxeboot/initr.img和vmlinux考到/tftpboot/live目录下对于每一个要被安装的Linux版本,都需要执行一次该操作。针对Clonezilla,可以直接把iso里面的live目录copy到/tftpboot下面7、编辑pxelinux.0的配置文件default ,把/isolinux下的文件copy到/tftpboot目录下(对应的行该如何写,可以参考它安装盘里的配置文件 /isolinux/isolinux.cfg):=+=+=+=+=+=cd/tftpboot mkdirpxelinux.cfgcd pxelinux.cfgvi default=+=+=+=+=+=以下是default配置文件的一个示例=+=+=+=+=+=#/tftpboot/pxelinux.cfg/default# Created by generate-pxe-menu! Do NOT edit unless you know what you are doing! # Keep those comment MENU DEFAULT and MENU HIDE! Do NOT remove them.# Note! If serial directive exists, it must be the first directivedefault vesamenu.c32timeout 300prompt 0noescape 1MENU MARGIN 5MENU BACKGROUND ocswp.png# Set the color for unselected menu item and timout message MENU COLOR UNSEL 7;32;41 #c0000090 #00000000 MENU COLOR TIMEOUT_MSG 7;32;41 #c0000090 #00000000 MENU COLOR TIMEOUT 7;32;41 #c0000090 #00000000 MENU COLOR HELP 7;32;41 #c0000090 #00000000# Allow client to edit the parametersALLOWOPTIONS 1# Since no network setting in the squashfs image, therefore if ip=frommedia, the network is disabled. Thats what we want.label Clonezilla live MENU DEFAULT # MENU HIDE MENU LABEL Clonezilla live (Default settings, VGA 800x600) # MENU PASSWD kernel /live/vmlinuz1 append initrd=/live/initrd1.img boot=live union=aufs vga=788 netboot=nfs nfsroot=:/exports/clonezilla=+=+=+=+=+=示例用到了vesamenu.c32来显示菜单的背景图ocswp.png,TIMEOUT为30秒,30秒后自动进入DEFAULT的菜单即示例中标签为Clonezilla live的选项。-default configuration file三、NFS服务器1安装nfs相应文件2建立两个目录:mkdir -p /exports/clonezilla 用作放启动镜像所含的文件mkdir -p /home/partimag 用作给其他机器挂在放镜像或者读镜像,这个可放在另外一台linux服务器中作为共享目录3修改文件:vi /etc/exportsi/exports/clonezilla *(ro)/home/partimag *(rw,no_root_squash,async)保存4执行exportfs a将设置的内容输出5重启n

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论