主要是在 PXE Server 的功能表,使用 NFS 和 Clonezilla 做自動的備份及還原
修改 PXE Server 功能表,因為執行的時候會覆蓋原有的備份檔和把 Windows 系統磁碟還原,所以在選項上加上了密碼,避免誤觸
要注意的是 append initrd 到後面算是一行
# vim /var/lib/tftpboot/pxelinux.cfg/Backup_Restore
LABEL Clonezilla Livei nfs AutoBackup
MENU LABEL Clonezilla Live nfs ^AutoBackup
MENU PASSWD CloneZilla
kernel images/Clonezilla/live/vmlinuz
append initrd=images/Clonezilla/live/initrd.img boot=live config username=user quiet noswap edd=on nomodeset noeject locales=”zh_TW.UTF-8″ keyboard-layouts=”NONE” ocs_live_run=”/usr/sbin/ocs-sr -q2 -j2 -z1p -p true saveparts Win7Backup sda1″ ocs_live_extra_param=”” ocs_live_batch=”yes” ocs_prerun=”mount -t nfs4 192.168.1.6:/var/lib/tftpboot/Backup /home/partimag” vga=788 ip=frommedia nosplash netboot=nfs nfsroot=192.168.1.6:/var/lib/tftpboot/images/Clonezilla
LABEL Clonezilla Livei nfs AutoRestore
MENU LABEL Clonezilla Live nfs ^AutoRestore
MENU PASSWD CloneZilla
kernel images/Clonezilla/live/vmlinuz
append initrd=images/Clonezilla/live/initrd.img boot=live config username=user quiet noswap edd=on nomodeset noeject locales=”zh_TW.UTF-8″ keyboard-layouts=”NONE” ocs_live_run=”/usr/sbin/ocs-sr –batch -g auto -e1 auto -e2 -r -j2 -p reboot restoreparts Win7Backup sda1″ ocs_live_extra_param=”” ocs_live_batch=”yes” ocs_prerun=”mount -t nfs4 192.168.1.6:/var/lib/tftpboot/Backup /home/partimag” vga=788 ip=frommedia nosplash netboot=nfs nfsroot=192.168.1.6:/var/lib/tftpboot/images/Clonezilla