CentOS下Clonezilla通過網路自動備份還原系統

來源:互聯網
上載者:User

標籤:clonezilla

公司安裝Win7 或者Win7、ubuntu雙系統比較頻繁,而且經常都是相同型號的台式機或者筆記本。所以使用了CentOS搭建了Clonezilla,通過pxe自動大量安裝系統,簡單方便而且快捷。一個Win7系統安裝好的時間大概也就10分鐘不到。

今天趁著有空在公司用虛擬機器做了一個實驗正好記一下順便跟大家分享一下:

1.設定tftp

#rpm -qa tftp

#yum install tftp-server

#vim /etc/xinetd.d/tftp

disable設定改為no

#/etc/init.d/xinetd start

#chkconfig xinetd on

2安裝 syslinux 

#yum install syslinux

安裝完成之後會在 /usr/share/syslinux/產生一些引導用的檔案

#cp /usr/share/syslinux/pxelinux.0  /var/lib/tftpboot/

#mkdir /var/lib/tftpboot/pxelinux.cfg

#touch  /var/lib/tftpboot/pxelinux.cfg/default

default haha

prompt 0

timeout 30

MENU TITLE PXE Menu

LABEL haha

    MENU LABEL Clonezilla Install

    KERNEL vmlinuz

    APPEND initrd=initrd.img fetch=tftp://10.100.2.102/filesystem.squashfs 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      ##這裡面的格式可以參考clonezilla的官網(http://clonezilla.org/livepxe.php)

3設定clonezilla

#mkdir /mnt/isoimage

#mount -o loop clonezilla-live-20140331-saucy-amd64.iso  /mnt/isoimage/

#cp /mnt/isoimage/live/initrd.img  /var/lib/tftpboot/

#cp /mnt/isoimage/live/vmlinuz  /var/lib/tftpboot/

#cp /mnt/isoimage/live/filesystem.squashfs /var/lib/tftpboot/

4設定dhcp

#yum install dhcp

#vim /etc/dhcp/dhcpd.conf

subnet 10.100.2.0 netmask 255.255.255.0 {

        option routers                  10.100.2.1;

        option subnet-mask              255.255.255.0;

        option domain-name-servers       192.168.1.1;

        option time-offset              -18000;

        range 10.100.2.120 10.100.2.130;

        next-server 10.100.2.102;

        filename "pxelinux.0";

}

#/etc/init.d/dhcpd start

#chkconfig  dhcpd on

#setenforce 0

#/etc/init.d/iptables  stop

5用戶端設定

需要重裝系統或者備份系統的電腦插上網線,開機選擇從網卡啟動。這裡說一下如果是想備份已經設定好的Win7系統方便以後其他同型號的電腦使用,在向clonezilla伺服器上傳鏡像的時候別忘了先清一下系統的SSID。

清理SSID的步驟:

進入C:\Windows\System32\sysprep

運行sysprep,shutdown options選項選擇shutdown

清理完SSID關機之後然後再連上網線開機網卡啟動上傳已經備份好的系統鏡像。

上傳和還原鏡像的步驟就不在這一一說了,大家可以自己試一下~

有問題多多指教 O(∩_∩)O~

網易部落格地址:http://liubin0505star.blog.163.com/blog/#m=0


本文出自 “定格流年LB” 部落格,請務必保留此出處http://liubin0505star.blog.51cto.com/5550456/1554797

CentOS下Clonezilla通過網路自動備份還原系統

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.