Polling 是電腦教室或網路管理員 曾經使用 Linux 經驗 桌面使用 伺服器使用 曾經使用過無碟系統 曾經安裝 使用 DRBL? 曾經使用過硬碟備份工具 曾經安裝使用 Clonezilla SE? Clonezilla Live? 2

Similar documents
DRBL/Clonezilla 進階課程 蕭志榥孫振凱 國家高速網路與計算中心 N

Free Software Lab, NCHC, Taiwan 2 Polling 是電腦教室或網路管理員? 曾經使用 Linux 經驗? 桌面使用? 伺服器使用? 曾經使用過無碟系統? 曾經安裝 使用 DRBL? 曾經使用過硬碟備份工具? 曾經安裝使用 Clonezilla SE? Clonezi

Free Software Lab, NCHC, Taiwan 2 Polling 是電腦教室或網路管理員? 曾經使用 Linux 經驗? 桌面使用? 伺服器使用? 曾經使用過無碟系統? 曾經安裝 使用 DRBL? 曾經使用過硬碟備份工具? 曾經安裝使用 Clonezilla SE? Clonezi

2 Polling 是電腦教室或網路管理員? 曾經使用 Linux 經驗? 桌面使用? 伺服器使用? 曾經使用過無碟系統? 曾經安裝 使用 DRBL? 曾經使用過硬碟備份工具? 曾經安裝使用 Clonezilla SE? Clonezilla Live?

自由軟體社群發展經驗與 Linux認證介紹

自由軟體教學平台

Outline (Day 1) Time: 09:30 ~ 16:30 Clonezilla 簡介 / 備份原理 Clonezilla 系統流程架構 / 映像檔介紹 Clonezilla unicast, multicast, broadcast clone 介紹與注意事項 Clonezilla O

ebook140-9

Red Flag Linux Desktop 4.0 Red Flag Linux Desktop 4.0 1

Clonezilla 研習課程 基隆市網中心 孫振凱 國家高速網路與計算中心 National Center f

Microsoft Word - PS2_linux_guide_cn.doc

Windows 2000 Server for T100

Outline (Day 1) Time: 09:30 ~ 16:30 Clonezilla 簡介 / 備份原理 Clonezilla 系統流程架構 / 映像檔介紹 Clonezilla unicast, multicast, broadcast clone 介紹與注意事項 Clonezilla O

讓資訊組變輕鬆的事 ( 一 ) 校園電腦備份還原 國網企鵝龍 / 再生龍 (DRBL-Live/Clonezilla-Live) 黃保太 樹林國小資訊組 updated: 隨堂調查資訊組 : 六期電腦 : 七期電腦 : 有用過 Linux: Agenda: 1. 製作 Clonez

Abstract arm linux tool-chain root NET-Start! 2

ebook140-8

K7VT2_QIG_v3

A9RF716.tmp

1.ai

Windows XP

Guide to Install SATA Hard Disks

Outline (Day 1) Time: 09:30 16:30 Clonezilla 簡介 / 備份原理 Clonezilla 系統流程架構 / 映像檔介紹 Clonezilla unicast, multicast, broadcast clone 介紹與 注意事項 實務探討 硬碟 / 磁區差

1 IT IT IT IT Virtual Machine, VM VM VM VM Operating Systems, OS IT

AL-M200 Series

彰化縣教育網路中心 Clonezilla 再生龍實務課程 孫振凱 國家高速網路與計算中心

软件测试(TA07)第一学期考试

TCA Linux 相容性認證測試流程步驟

Acronis True Image 2014

untitled

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

ATI-2019安裝手冊-v

快 速 入 门 (Linux) 概 述 文 档 目 的 本 文 档 介 绍 了 如 何 快 速 创 建 Linux 系 统 实 例 远 程 连 接 实 例 部 署 环 境 等 旨 在 引 导 您 一 站 式 完 成 实 例 的 创 建 登 录 和 快 速 环 境 部 署 云 服 务 器 ECS 实

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

IP505SM_manual_cn.doc

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

PowerPoint 演示文稿

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG

Microsoft Word - template.doc

IP TCP/IP PC OS µclinux MPEG4 Blackfin DSP MPEG4 IP UDP Winsock I/O DirectShow Filter DirectShow MPEG4 µclinux TCP/IP IP COM, DirectShow I

RTX3.2.0标准版 - 技术白皮书

untitled

05 01 X Window X Window Linux Linux X Window X Window Webmin Web Linux Linux X Window X Window Notebook PC X Window X Window module Linux Linux kernel

DRBL/Clonezilla 實務與應用 孫振凱 國家高速網路與計算中心 Nation

SA-DK2-U3Rユーザーズマニュアル

Panaboard Overlayer help

目 录 Linux Mint 简介... 3 Linux Mint 安装... 6 Linux Mint 桌面初识 软件管理...30 小技巧...40 总结...42

C10_ppt.PDF

Desktop Management Guide

投影片 1

1 SQL Server 2005 SQL Server Microsoft Windows Server 2003NTFS NTFS SQL Server 2000 Randy Dyess DBA SQL Server SQL Server DBA SQL Server SQL Se

Simulator By SunLingxi 2003

HOL-CHG-1695

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP

ansoft_setup21.doc

CANVIO_AEROCAST_CS_EN.indd

epub 61-2

Data Server_new_.doc

ch08.PDF


Basic System Administration

TX-NR3030_BAS_Cs_ indd

宁夏专业技术人员服务平台

68369 (ppp quickstart guide)

Acronis True Image 2015

LSI U320 SCSI卡用户手册.doc

作 業 系 統 簡 介 光 有 電 腦 硬 體, 會 不 容 易 使 用 必 須 要 有 適 當 的 程 式, 才 方 便 操 作 硬 體 衍 生 作 業 系 統 需 求 : 提 供 方 便 使 用 者 執 行 程 式 平 台 有 效 使 用 各 種 電 腦 硬 體 資 源 Jingo C. Lia

Microsoft PowerPoint - lect01.ppt

Norton Ghost 15.0 安裝操作指南

audiogram3 Owners Manual

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

Dell AppAssure 安装和升级指南

RAID RAID 0 RAID 1 RAID 5 RAID * ( -1)* ( /2)* No Yes Yes Yes A. B. BIOS SATA C. RAID BIOS RAID ( ) D. SATA RAID/AHCI ( ) SATA M.2 SSD ( )

ARM JTAG实时仿真器安装使用指南

專業式報告

專業式報告

網路安全:理論與實務 第二版

Sophos Central 快速安裝手冊

P4VM800_BIOS_CN.p65

Pchome

热设计网

DocHdl2OnPPMtmpTarget

untitled

Bus Hound 5

HP StorageWorks Automated Storage Manager 用户指南

2 : ; :

Chapter 2

Transcription:

DRBL/Clonezilla 進階課程 孫振凱 http://drbl.nchc.org.tw, http://drbl.sourceforge.net http://clonezilla.nchc.org.tw, http://clonezilla.org.tw 國家高速網路與計算中心 ational Center for High-Performance Computing (CHC) Q3, 2013

Polling 是電腦教室或網路管理員 曾經使用 Linux 經驗 桌面使用 伺服器使用 曾經使用過無碟系統 曾經安裝 使用 DRBL? 曾經使用過硬碟備份工具 曾經安裝使用 Clonezilla SE? Clonezilla Live? 2

Outline : Day 1 網路調校 DRBL/Clonezilla Server 系統安裝 DRBL 原理與架構介紹 進階使用 DRBL 在 VirtualBox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修改 開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 DRBL client 群組管理 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作 法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 3

Outline : Day 2 Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構介紹 進階使用 Clonezilla SE /Clonezilla Live Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構介紹 Clonezilla box mode 介紹 利用 Clonezilla live 作為 Clonezilla SE 用戶端的作業系統 Unicast, multicast, broadcast clone 介紹與注意事項 如何轉換印象檔中的硬碟代號 PXE 開啟 Clonezilla live 作法 有沒有可能把 Clonezilla Live 放到硬碟中來執行? 如何製作 clonezilla live 開機 usb 隨身碟或硬碟 客製化 Clonezilla live 製作 使用 Clonezilla live 的開機參數來預先植入相關指令與動作 4

線上文件 管理與使用 -> 四 進階使用 http://drbl.nchc.org.tw/advanced 5

環境準備 至 GDM 使用一般使用者登入 Password: ilovedrbl 如果要新增帳號 加入 admin 群組 export LC_ALL=C adduser [your account] adduser [your account] admin 變更 root 密碼 設定對內網路卡 auto eth? iface eth? inet static address 192.168.101.254 netmask 255.255.255.0 6

實驗平台環境 DRBL Server Gateway-> Internet eth0 dhcp eth1 192.168.25.254 DRBL client etwork link eth0 192.168.101.x eth1 7

實驗環境 (Host+ 虛擬網卡裝置 ) DRBL Server eth0 192.168.62.x eth1 192.168.101.254 vboxnet0 192.168.56.254 Gateway-> Internet DRBL client etwork link DRBL client (VM) eth0 192.168.101.x eth1 eth0 192.168.56.x 8

DRBL 安裝流程圖 Start Debian base: Debian, Ubuntu, B2D Step 1 : 安裝支援之 Linux 作業 系統與應用程式 Redhat base: Fedora, CentOS, RHEL, Scientific Linux, SuSe, OpenSuSE Step 2 : 安裝 DRBL 主程式 Step 3 : 安裝 DRBL 所需服務 環境能否 提供網路 Question: o es 使用 drblsrv -i 使用 drblsrv-offline Step 4 : 佈署用戶端環境 drblpush -i drblsrv 與 drblpush 差異與使用時機 drblsrv-offline 使用時 機 Stop 9

Exercise Task 請完成安裝 Full DRBL mode/full Clonezilla mode Scenario Full DRBL mode/ Full Clonezilla mode 使用 server 核心 注意 pae 支援 不鎖網卡 Client : 實體機器 Check point 確認 client 能以 DRBL Clonezilla 實務技術課程 client 模式開啟 10

DRBL 進階使用 11

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 進階使用 DRBL 在 VirtualBox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修改 開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 DRBL client 群組管理 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的 作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 12

DRBL 系統架構 ( 一 ) Server site Client site PXE Booting BIOS 1.DHCP request BIOS 3.Request for pxelinux.0 PXE Boot 5.Request for kernel, initrd kernel Boot 7.Run initrd then mount FS for necessary user login 9. account verify Ethernet 1 2 3 4 5 6 7,8 DHCP 2. etwork info, nextserver, PXE files TFTP PXE 所必須的之 服務 DHCP service tftp service 相關設定檔 /etc/dhcp/dhcpd.conf /etc/default/tftpd-hpa 4. return pxelinux.0 TFTP 6. return Kernel, initrd FS 8. return FS mount 9,10 IS 10. return authentication 13

Linux boot process overview 觀察 client 檔案系統 Server service DHCP service tftp service nfs service showmount -a nis service 14

Exercise Task DRBL 環境額外空間 (server/client) 掛載 Reference: http://drbl.nchc.org.tw/one4all/desktop/ Scenario Server 上分享 /work1 ext3 /etc/drbl/drbl.conf Client 預設掛載 /localwork ext3 /etc/drbl/client-append-fstab Default to startup apache2 service [4 安裝 ]-[ 步驟三 ] /etc/drbl/client-extra-service Check point 確認 client 能自動掛載 server 與 local space Clonezilla 實務技術課程 15

DRBL 模式比較 Full DRBL DRBL SSI Full Clonezilla ClonezillaClonezilla Box live /etc, /var of client FS-based Tmpfs-based FS-based Files in /etc and /var of client after reboot Kept Gone Kept Gone Gone Extra space in server/client ~ 50-100 MB* 0 ~ 50-100 MB* 0 0 Max client #/ethernet card in server 253 253 253 253 253 Tmpfs-based Tmpfs-based (tar ball) (Squashfs) * Depends on the packages installed in the server 16

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 進階使用 DRBL 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修改 開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 DRBL client 群組管理 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的 作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 17

VM 實驗環境 (Host+guest machine) Gateway-> Internet DRBL Server 虛擬機器中的網路卡模 式與注意事項 AT eth0 DHCP Bridge Internal network eth1 192.168.101.254 Host-only network Virtual Machine client eth0 192.168.101.x DRBL client etwork link client eth0 192.168.101.x eth0 192.168.101.x 18

Exercise Task I: 切換 Full DRBL/SSI mode Task II : Install Virtualbox ose 新增兩個 guest machine 串接到 host machine 的 eth1 將新增的兩台 guest machine 以鎖 mac address 方式重新佈署 Clonezilla 實務技術課程 19

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作 法 修改開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 DRBL client 群組管理 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 20

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修 改開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 DRBL client 群組管理 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 21

Exercise pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修改開機選單 抽換背景圖 手動修改開機選單 變更背景圖片 在 DRBL 環境下設置網路安裝檔案 加入 Debian, Ubuntu, Centos 網路安裝檔案 變更開機選單 Clonezilla 實務技術課程 22

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修 改開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 DRBL client 群組管理 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 23

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修 改開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 DRBL client 群組管理 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 24

Exercise 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 以 ASUS Eee PC 900 軔體更新為例 DRBL client 群組管理 根據 ip 來將 client 分群 Clonezilla 實務技術課程 25

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修 改開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 DRBL client 群組管理 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 26

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修 改開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 DRBL client 群組管理 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 27

Outline 網路調校 DRBL/Clonezilla 系統安裝 DRBL 原理與架構介紹 在 virtualbox 上建置 drbl 開發與測試環境 pxelinux 的設定 包含指定 IP address 或 MAC address 作法 修 改開機選單 抽換背景圖片 在 DRBL 環境下設置網路安裝檔案 將 BIOS 更新程式放進 freedos 以便透過 PXE 開機更新 BISO 的作法 DRBL client 群組管理 DRBL SSI mode 的使用與修改 兩個 DHCP server 並存作法 在 DRBL server 上製作 Linux 套件網路安裝隨身碟 如何在 DRBL 上建置 SA (AoE, iscsi) 開機環境 28

Clonezilla 進階使用 29

Outline 進階使用 Clonezilla SE /Clonezilla Live Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構 介紹 Clonezilla box mode 介紹 Unicast, multicast, broadcast clone 介紹與注意事項 如何轉換印象檔中的硬碟代號 PXE 開啟 Clonezilla live 作法 如何製作 clonezilla live 開機 usb 隨身碟或硬碟 我要怎麼自己從無到有做一個 Clonezilla live? 客製化 Clonezilla live 製作 有沒有可能把 Clonezilla Live 放到硬碟中來執行? 利用 virtualbox 來做 Clonezilla 開發與測試環境 30

再生龍 Clonezilla Clonezilla [OCS (Opensource Clone System)] Clonezilla 是一完整的硬碟資料複製的工具 類似 Ghost (Symantec) 或是 Rembo(Acquired by IBM Tivoli software)/ Acronis (True Image) 整合 partclone(http://partclone.org/),partimage (http://www.partimage.org), http://udpcast.linux.lu/) 處理元件包含 實體資料 : 分割區資料 LVM2 開機載入 (MBR:446+64+2 EFI) 隱藏磁區 用於裸機 (bare material) 還原 不同於 ntfsclone 與 udpcast1 ( 註 1: 使用在 Server edition 與以檔案為基礎的備份方式 差異備份 還原卡模式 兩種釋出版本 Live edition 合單機 個人使用 作為備份 還原單一機器使用 Server 線... edition (SE) 適合大量批次還原 集中式管理 如 電腦教室管理 大量出機生產 31

Terminology 技術用詞 Raw copying* Smart copying* A possibility to distinguish which portions of the partition really contain data and to copy these only Live copying* A possibility to perform sector-by-sector copying of a whole partition A drive or volume can be copied/imaged while it is in use, avoiding the need for booting into a separate operating system or Live CD. Smart copy full disk A possibility to distinguish which portions of the disk really contain data and to copy these only Possible to skip swap, pagefile... 註 * The descriptions are from http://en.wikipedia.org/wiki/comparison_of_disk_cloning_software 32

再生龍 Clonezilla GPL 支援儲存與還原不同作業系統 GU/Linux, MS Windows, Mac OS X, BSD, VMWare ESX(i), Minix File system: ext2/3/4, reiserfs3/4, xfs, jfs, btrfs, ntfs, vfat,hfs+, UFS+, VMFS VMFS(v3,v5-dd), Minix Supports LVM2 無法辨識之檔案系統 (ex: zfs..,) 使用 dd Block base 備份方式 只備份有使用之區塊 提高備份還原效能 Smart copying, 支援 Grub 1/2 ( 恢復 重建 ) 支援 serial console 檔案式架構之印象檔 格式通透 公開 標準格式 易於彈性調整 支援 Multicast1: 適合大量佈署 能結合使用 Live edition1 註 1: 使用在 Server edition 33

檔案系統支援比較表 BSD Vmware Esx(i) ext2/3 ext4 reiserfs reiser4 xfs jfs btrfs HFS+ FAT TFS UFS+ VMFS Linux File System Clonezilla MAC MS Window Fsarchiver G4L Mondo Rescue Partimage True Image Ghost 3.3.18 FOG 032(2011,7) 0.6.17(2013,2) 0.44(2013,3) 3.0.3(2013,3) 0.6.9 2013 15.0 34

再生龍 Clonezilla-- 限制 目的硬碟 ( 分割區 ) 大小至少需等於 ( 或大於 ) 來源硬 碟 ( 分割區 ) 不支援差異 (Differential1) 備份 / 增異 (Incremental1) 備份 不支援線上 (Online) 備份 / 回覆 不完全支援 Software RAID/Firmware(Fake) RAID2 需額外手動步驟調整 印象檔無法支援分片回存 需先將分片檔案集合在同一儲藏空間 註 1: http://en.wikipedia.org/wiki/incremental_backup 註 2:http://en.wikipedia.org/wiki/RAID 35

Execrise Task: 利用 Clonezilla SE 做 save disk Save disk/partition ow in server Later in client Select in client Clonezilla 實務技術課程 36

Clonezilla 備份 / 還原流程 Start Start Parse partition table Read image Save MBR/GPT data Save partition table Find the Device (partition/lv ) O Save hardware info Create partition table ES Find the file system of device Smart copyin g? O ES Decide device imaging engine partclone partimag e ntfsclone Save device image to stdout Decide compressing engine End Create LV if LV image found in image dir gzip bzip2 lzma lzip xz Save stdin as file in the image dir Use dd to save image to stdout Find the image of device O Tune the file file system size to fit partition size Reinstall grub if assigned End ES Decide device imaging engine partclone partimage ntfsclone Restore the image of device to device 37

Outline 進階使用 Clonezilla SE /Clonezilla Live Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構介紹 Unicast, multicast, broadcast clone 介紹與注意事項 如何轉換印象檔中的硬碟代號 Clonezilla box mode 介紹 PXE 開啟 Clonezilla live 作法 如何製作 clonezilla live 開機 usb 隨身碟或硬碟 我要怎麼自己從無到有做一個 Clonezilla live? 客製化 Clonezilla live 製作 有沒有可能把 Clonezilla Live 放到硬碟中來執行? 利用 virtualbox 來做 Clonezilla 開發與測試環境 38

Udpcast 相關設定 設定檔 /etc/drbl/drbl-ocs.conf ULTICAST_ALL_ADDR="224.0.0.1" MULTICAST_PORT="2232" TIME_TO_LIVE_OPT="--ttl 1" /usr/share/drbl/sbin/ocs-functions udpcast_send_cmd="udp-sender $udp_sender_extra_opt $udpcast_hold_opt1 $udpcast_hold_opt2 $udpcast_hold_opt3 --interface $eth_for_multicast --nokbd --mcast-all-addr $MULTICAST_ALL_ADDR --portbase $port $TIME_TO_LIVE_OPT" udpcast_rec_cmd="udp-receiver $udp_receiver_extra_opt_default --nokbd --mcast-all-addr $MULTICAST_ALL_ADDR --portbase $port $TIME_TO_LIVE_OPT" 範例 Server : ~$ ps aux grep udp udp-sender --full-duplex --min-clients 3 --max-wait 300 --interface eth1 --nokbd --mcast-all-addr 224.0.0.1 --portbase 2232 --ttl 1 Client: ~$ ps aux grep udp udp-receiver --nokbd --mcast-all-addr 224.0.0.1 --portbase 2232 --ttl 1 http://users.soe.ucsc.edu/~kent/test/udpcast.html 39

Outline 進階使用 Clonezilla SE /Clonezilla Live Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構介紹 Unicast, multicast, broadcast clone 介紹與注意事項 如何轉換印象檔中的硬碟代號 Clonezilla box mode 介紹 PXE 開啟 Clonezilla live 作法 如何製作 clonezilla live 開機 usb 隨身碟或硬碟 我要怎麼自己從無到有做一個 Clonezilla live? 客製化 Clonezilla live 製作 有沒有可能把 Clonezilla Live 放到硬碟中來執行? 利用 virtualbox 來做 Clonezilla 開發與測試環境 40

Execrise 利用 Clonezilla SE 採 multicast 機制來 restore guest machine wget http://drbl.nchc.org.tw/course.arch/thin lenny.tar sudo tar thin lenny.tar C /home/partimag dcs 切換 restore disk use multicast 問題 如何解決 利用 cnvt ocs dev 轉換磁碟代號 sudo cnvt ocs dev xp.vbox.4g sda sdb dcs 切換 restore disk use multicast Clonezilla 實務技術課程 41

Outline 進階使用 Clonezilla SE /Clonezilla Live Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構介紹 Unicast, multicast, broadcast clone 介紹與注意事項 Clonezilla Full/Box/use Live mode 介紹 如何轉換印象檔中的硬碟代號 PXE 開啟 Clonezilla live 作法 如何製作 clonezilla live 開機 usb 隨身碟或硬碟 我要怎麼自己從無到有做一個 Clonezilla live? 客製化 Clonezilla live 製作 有沒有可能把 Clonezilla Live 放到硬碟中來執行? 利用 virtualbox 來做 Clonezilla 開發與測試環境 42

Clonezilla SE 各類模式比較 Full DRBL Full DRBL SSI Clonezilla Clonezilla Box Clonezillalive /etc, /var of client FSbased Tmpfsbased FS-based Tmpfs-based (tar ball) Tmpfs-based (Squashfs) Files in /etc and /var of client after reboot Kept Gone Kept Gone Gone Extra space in server/client ~ 50-100 MB* 0 ~ 50-100 MB* 0 0 Max client #/ethernet card in server 253 253 253 253 253 * Depends on the packages installed in the server 43

Outline 進階使用 Clonezilla SE /Clonezilla Live Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構介紹 Unicast, multicast, broadcast clone 介紹與注意事項 Clonezilla Full/Box/use Live mode 介紹 如何轉換印象檔中的硬碟代號 PXE 開啟 Clonezilla live 作法 如何製作 clonezilla live 開機 usb 隨身碟或硬碟 我要怎麼自己從無到有做一個 Clonezilla live? 客製化 Clonezilla live 製作 有沒有可能把 Clonezilla Live 放到硬碟中來執行? 利用 virtualbox 來做 Clonezilla 開發與測試環境 44

Execrise 切換至 Clonezilla Box 模式 dcs > more > Clonezilla mode > use box mode 切換至 use Clonezilla live as OS 模式 sudo drbl ocs live prep i clonezilla live version.iso 用 dcs 指定 save / restore 觀察 pxe 開機參數 移除 drbl ocs live prep u 參數群 ocs sr / Clonezilla live 自己的開機參數 Clonezilla 實務技術課程 45

Execrise 以 save disk 為例 on live mode (Full/Box) : ocs_opt=" l en_us.utf 8 use partclone clone hidden data p reboot z1p i 1000000 savedisk 2011 05 10 23 img sda" 真正執行 ocs sr $ocs_opt Live mode : ocs_live_extra_param="" ocs_live_keymap="oe" ocs_live_batch="no" ocs_lang="en_us.utf 8" nosplash noprompt netboot=nfs nfsroot=192.168.11.254:/tftpboot/node_root/clonezilla live/ ocs_server="192.168.11.254" ocs_daemonon="ssh" ocs_prerun="mount t nfs 192.168.0.29:/home/partimag /home/partimag/" ocs_live_run="ocs sr l en_us.utf 8 use partclone clone hidden data p reboot z1p i 1000000 savedisk 2011 05 10 23 img sda" 以 restore disk 為例 Live mode : ocs_live_extra_param="" ocs_live_keymap="oe" ocs_live_batch="no" ocs_lang="en_us.utf 8" nosplash noprompt netboot=nfs nfsroot=192.168.11.254:/tftpboot/node_root/clonezilla live/ ocs_server="192.168.11.254" ocs_daemonon="ssh" ocs_prerun="mount t nfs 192.168.0.29:/home/partimag /home/partimag/" ocs_live_run="ocs sr l en_us.utf 8 g auto e1 auto e2 r clone hidden data p reboot max time to wait 300 mcast port 2232 multicast_restoredisk 2011 01 24 thin.maverick sda" http://clonezilla.nchc.org.tw/clonezilla-live/doc/fine-print.php?path=./99_misc/00_live-initramfs-manual.doc Clonezilla 實務技術課程 46

Outline 進階使用 Clonezilla SE /Clonezilla Live Clonezilla live 與 Clonezilla SE (Server Edition) 原理與架構介紹 Clonezilla box mode 介紹 Unicast, multicast, broadcast clone 介紹與注意事項 如何轉換印象檔中的硬碟代號 PXE 開啟 Clonezilla live 作法 如何製作 clonezilla live 開機 usb 隨身碟或硬碟 我要怎麼自己從無到有做一個 Clonezilla live? 客製化 Clonezilla live 製作 有沒有可能把 Clonezilla Live 放到硬碟中來執行? 利用 virtualbox 來做 Clonezilla 開發與測試環境 47

Clonezilla Live 版本差異 穩定版 / 測試版 差異 替代版 OS baesd Debian-based Ubuntu-based iso/zip 檔案大小 大約小 10 MB 大約大 10 MB 是否包含不自由的 軟體 ( 例如 firmware) 否 是 對 486 CPU 的支援 486 版的 iso/zip 有支援 (COFIG_M486=y) 不支援 (COFIG_M586=y and COFIG_X86_GEERIC=y) 686 版有支援, 486 版不支援 有 多核心 / 多處理器 的支援 48

Pre-process 與 post-process Boot parameters provide a mechanism to preset some options Set in the config file of isolinux, syslinux, pexelinux or grub. Besides the boot parameters from Debian live, Clonezilla also provides ocs_prerun* and ocs_postrun* parameters ocs_prerun* is for pre-process, right before Clonezilla job is run and ocs_postrun* is for post-process, right after the Clonezilla job is done. Limitation: o double quotation mark ( ) or single quotation mark (') in your command. ocs_prerun* Clonezilla job ocs_postrun* 49

Pre-process & post-process(cont') 執行順序 ocs_prerun1, ocs_prerun2, ocs_prerun3... ocs_postrun1, ocs_postrun2, ocs_postrun3... 範例 To do a file system check for 1st partition, use: ocs_prerun1= fsck /dev/sda1 To lease an IP address from a DHCP server: ocs_prerun1= dhclient -v eth0 To mount a file system and modify a file after restoring: ocs_postrun1= mount /dev/sda1 /mnt ocs_postrun2= sed -i -e s/old/new/ /etc/hostname ocs_postrun3= umount /mnt http://clonezilla.nchc.org.tw/clonezilla-live/doc/fine-print.php?path=./99_misc/00_live-initramfsmanual.doc#00_live-initramfs-manual.doc 50

Execrise Clonezilla live 使用 save/restore One the fly Insert Clonezilla live into hard drive with existent OS Clonezilla live 客制化 Clonezilla 實務技術課程 Include image Include image + customized script Use ocs_prerun* to do unattended recovery with a file server 51

Unattended recovery with a file server Scenario: ou have a file server and want to use a CD of Clonezilla (no image included) to restore different machines How Have an image ready on the file server first Use boot parameters to make that, e.g. for FS server: append initrd=/live/initrd.img boot=live config noswap nolocales edd=on nomodeset noprompt ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t nfs 192.168.120.254:/home/partimag /home/partimag" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -b -r -j2 -p reboot restoredisk squeezeupdated-20110711 sda" ocs_live_extra_param="" ocs_live_keymap="oe" ocs_live_batch="no" ocs_lang="zh_tw.utf-8" vga=788 ip=frommedia nosplash Here we preset (1) the keymap as default (OE, i.e. US keymap),(2) the language as Chinese (zh_tw.utf-8), (3) configure the network, (4) mount the image repository on FS server, and (5) run the restoring command 52