通过网络pxe引导再生龙clonezilla live cd

上传人:mg****85 文档编号:34538535 上传时间:2018-02-25 格式:DOCX 页数:6 大小:29.05KB
返回 下载 相关 举报
通过网络pxe引导再生龙clonezilla live cd_第1页
第1页 / 共6页
通过网络pxe引导再生龙clonezilla live cd_第2页
第2页 / 共6页
通过网络pxe引导再生龙clonezilla live cd_第3页
第3页 / 共6页
通过网络pxe引导再生龙clonezilla live cd_第4页
第4页 / 共6页
通过网络pxe引导再生龙clonezilla live cd_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《通过网络pxe引导再生龙clonezilla live cd》由会员分享,可在线阅读,更多相关《通过网络pxe引导再生龙clonezilla live cd(6页珍藏版)》请在金锄头文库上搜索。

1、Clonezilla 是什么Clonezilla 是一个样似 Ghost 的分区或磁盘复制软件。它单单存储及还完硬盘上已使用的数据块。 Clonezilla 的特点 免费(GPL)软件。 支持的文件系统:GNULinux 的 ext2、ext3、reiserfs、xfs 、jfs,及微软 Windows 的 FAT、NTFS。因此你可以复制 GNULinux 或微软 Windows。至於其它文件系统,Clonezilla 利用 dd 来转储整个分区。 支持 GNULinux 下的 LVM2。 建基於 Partimage、ntfsclone 及 dd 来复制分区。然而 Clonezilla 除了

2、针对分区外,亦收录了其它程序来存储及还完整个硬盘。 假若文件系统获支持(ext2、ext3、reiserfs、xfs、jfs、fat、ntfs) ,只有硬盘上已使用的数据块才会被存储及还完。这提升了复制的效率。至於未被支持的文件系统,Clonezilla 会利用 dd 来复制每个扇区。 先决条件: 运作中的 DHCP、PXE、TFTP、及 NFS 服务器 Clonezilla LiveCD 本实验把 NFS/DHCP/TFTP 全部做在一台机器上,IP 是 1.1.1.1一定要关闭 firewall,否则 tftp 端口不能正常工作一、配置 DHCP 服务器1、 安装 DHCP 服务器包。2、

3、 编辑 DHCP 服务器配置文件 /etc/dhcp.conf 。以下是一个示例:=+=+=+=+=+=#/etc/dhcpd.confddns-update-style none;option domain-name localhost;option subnet-mask 255.255.255.0;allow bootp;allow booting;subnet 1.1.1.0 netmask 255.255.255.0 range dynamic-bootp 1.1.1.2 1.1.1.254;option routers 1.1.1.1;option subnet-mask 255.

4、255.255.0;default-lease-time 21600;max-lease-time 43200;filename pxelinux.0;next-server 1.1.1.1;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

5、 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 = /u

6、sr/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 目录中去

7、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

8、/isolinux.cfg):=+=+=+=+=+=cd /tftpboot mkdir pxelinux.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 t

9、hem.# 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 messageMENU COLOR UNSEL 7;32;41 #c0000090 #00000000MENU COLOR TIMEOUT_MSG 7;32;41 #c0000090

10、 #00000000MENU COLOR TIMEOUT 7;32;41 #c0000090 #00000000MENU 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 liveMENU DEF

11、AULT# MENU HIDE MENU LABEL Clonezilla live (Default settings, VGA 800x600)# MENU PASSWDkernel /live/vmlinuz1append initrd=/live/initrd1.img boot=live union=aufs vga=788 netboot=nfs nfsroot=1.1.1.1:/exports/clonezilla=+=+=+=+=+=示例用到了 vesamenu.c32 来显示菜单的背景图 ocswp.png,TIMEOUT 为 30 秒,30 秒后自动进入 DEFAULT 的

12、菜单即示例中标签为 Clonezilla live 的选项。-default configuration filedefault.txt三、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重启 nfs 的服务service nfs restart6下载 clonezilla-live-$最新版本 .iso 到 /tmp 7挂载 iso 映像并复制内容到输出目录。 mount -o loop /tmp/clonezilla-live-$LATESTVERSION.iso /mnt cp -a /mnt/. /exports/clonezillaumount /mnt

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号