CentOS下Clonezilla通过网络自动备份还原系统
公司安裝Win7 或者Win7、ubuntu雙系統(tǒng)比較頻繁,而且經(jīng)常都是相同型號(hào)的臺(tái)式機(jī)或者筆記本。所以使用了CentOS搭建了Clonezilla,通過(guò)pxe自動(dòng)批量安裝系統(tǒng),簡(jiǎn)單方便而且快捷。一個(gè)Win7系統(tǒng)安裝好的時(shí)間大概也就10分鐘不到。
今天趁著有空在公司用虛擬機(jī)做了一個(gè)實(shí)驗(yàn)正好記一下順便跟大家分享一下:
1.設(shè)置tftp
#rpm -qa tftp
#yum install tftp-server
#vim /etc/xinetd.d/tftp
disable設(shè)置改為no
#/etc/init.d/xinetd start
#chkconfig xinetd on
2安裝 syslinux?
#yum install syslinux
安裝完成之后會(huì)在 /usr/share/syslinux/生成一些引導(dǎo)用的文件
#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的官網(wǎng)(http://clonezilla.org/livepxe.php)
3設(shè)置clonezilla
#mkdir /mnt/isop_w_picpath
#mount -o loop clonezilla-live-20140331-saucy-amd64.iso ?/mnt/isop_w_picpath/
#cp /mnt/isop_w_picpath/live/initrd.img ?/var/lib/tftpboot/
#cp /mnt/isop_w_picpath/live/vmlinuz ?/var/lib/tftpboot/
#cp /mnt/isop_w_picpath/live/filesystem.squashfs /var/lib/tftpboot/
4設(shè)置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客戶(hù)端設(shè)置
需要重裝系統(tǒng)或者備份系統(tǒng)的電腦插上網(wǎng)線,開(kāi)機(jī)選擇從網(wǎng)卡啟動(dòng)。這里說(shuō)一下如果是想備份已經(jīng)設(shè)置好的Win7系統(tǒng)方便以后其他同型號(hào)的電腦使用,在向clonezilla服務(wù)器上傳鏡像的時(shí)候別忘了先清一下系統(tǒng)的SSID。
清理SSID的步驟:
進(jìn)入C:\Windows\System32\sysprep
運(yùn)行sysprep,shutdown options選項(xiàng)選擇shutdown
清理完SSID關(guān)機(jī)之后然后再連上網(wǎng)線開(kāi)機(jī)網(wǎng)卡啟動(dòng)上傳已經(jīng)備份好的系統(tǒng)鏡像。
上傳和還原鏡像的步驟就不在這一一說(shuō)了,大家可以自己試一下~
有問(wèn)題多多指教 O(∩_∩)O~
網(wǎng)易博客地址:http://liubin0505star.blog.163.com/blog/#m=0
轉(zhuǎn)載于:https://blog.51cto.com/liubin0505star/1554797
總結(jié)
以上是生活随笔為你收集整理的CentOS下Clonezilla通过网络自动备份还原系统的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 【BZOJ】3390: [Usaco20
- 下一篇: uint8_t / uint16_t /