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

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

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

自由軟體社群發展經驗與 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

Windows 2000 Server for T100

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

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

Microsoft Word - PS2_linux_guide_cn.doc

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

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

K7VT2_QIG_v3

ebook140-8

Guide to Install SATA Hard Disks

A9RF716.tmp

1.ai

AL-M200 Series

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

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

Windows XP

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

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

untitled

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

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

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

Acronis True Image 2014

HOL-CHG-1695

IP505SM_manual_cn.doc

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

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

C10_ppt.PDF

CANVIO_AEROCAST_CS_EN.indd

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 ( )

Microsoft Word - template.doc

Á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

ATI-2019安裝手冊-v

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

LSI U320 SCSI卡用户手册.doc

68369 (ppp quickstart guide)

Panaboard Overlayer help

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

Basic System Administration

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

Microsoft PowerPoint - lect01.ppt

ansoft_setup21.doc

Simulator By SunLingxi 2003

Desktop Management Guide

Pchome

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

epub 61-2

untitled

Sophos Central 快速安裝手冊

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

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

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

Dell AppAssure 安装和升级指南

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

投影片 1

TX-NR3030_BAS_Cs_ indd

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

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


P4VM800_BIOS_CN.p65

Norton Ghost 15.0 安裝操作指南

Data Server_new_.doc

穨CAS1042中文手冊.doc

Acronis True Image 2015

Some experiences in working with Madagascar: installa7on & development Tengfei Wang, Peng Zou Tongji university

PowerPoint Presentation

V A. 1 Hyper-V R2 V C. A. Hyper-V B. Microsoft SCOM 20 V C. MAP D. Microsoft SCVMM 2008 V B. V D. 2. IT IT 2

PowerPoint 演示文稿

audiogram3 Owners Manual

untitled

DocHdl2OnPPMtmpTarget

Chapter 2

Serial ATA ( Nvidia nforce430)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 6 (4) S A T A... 9 (5) S A T A (6) Microsoft Win

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

DRBL/Clonezilla 研習課程 蕭志榥 孫振凱 國家高速網路與計算中心 Nat

P4V88+_BIOS_CN.p65

ch08.PDF

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

Cadence SPB 15.2 VOICE Cadence SPB 15.2 PC Cadence 3 (1) CD1 1of 2 (2) CD2 2of 2 (3) CD3 Concept HDL 1of 1

Transcription:

DRBL/Clonezilla 進階課程 孫振凱蔡育欽 http://drbl.nchc.org.tw, http://drbl.sourceforge.net http://clonezilla.nchc.org.tw, http://clonezilla.org.tw 國家高速網路與計算中心 National Center for High-Performance Computing (NCHC) Q2, 2012

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

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

4 Outline : Day 2 進階使用 : 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 開發與測試環境

線上文件 管理與使用 -> 四 進階使用 http://drbl.nchc.org.tw/advanced Free Software Lab, NCHC, Taiwan 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 Free Software Lab, NCHC, Taiwan 6

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

DRBL 安裝流程圖 Start Step 1 : 安裝支援之 Linux 作業系統與應用程式 Step 2 : 安裝 DRBL 主程式 Debian base: Debian, Ubuntu, B2D Redhat base: Redhat, Fedora, Centos, RHEL, Scientific Linux, SuSe, OpenSuSE Step 3 : 安裝 DRBL 所需服務 環境能否提供網路 Yes 使用 /opt/drbl/sbin/drblsrv No 使用 /opt/drbl/sbin/drblsrv-offline Step 4 : 佈署用戶端環境 Question: drblsrv 與 drblpush 差異與使用時機 drblsrv-offline 使用實機 Stop Free Software Lab, NCHC, Taiwan 8

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

DRBL 進階使用 10

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

DRBL 系統架構 ( 一 ) g int oob EXP Client site BIOS 1.DHCP request BIOS 3.Request for pxelinux.0 PXE Boot 5.Request for kernel, initrd kernel Boot 7.Run initrd then mount NFS for necessary user login 9. account verify Free Software Lab, NCHC, Taiwan Ethernet 1 2 3 4 5 6 7,8 9,10 Server site DHCP 2. Network info, nextserver, PXE files TFTP 4. return pxelinux.0 TFTP 6. return Kernel, initrd NFS 8. return NFS mount NIS 10. return authentication PXE 所必須的之服務 DHCP service tftp service 相關設定檔 : /etc/dhcp3/dhcpd.conf /etc/default/tftpd-hpa 12

Linux boot process overview 觀察 client 檔案系統 Server service DHCP service tftp service nfs service showmount -a nis service Free Software Lab, NCHC, Taiwan 13

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

15 DRBL 模式比較 /etc, /var of client Files in /etc and /var of client after reboot Full DRBL DRBL SSI Full Clonezilla NFS-based Tmpfs-based NFS-based Clonezilla Box Tmpfs-based (tar ball) Clonezillalive Tmpfs-based (Squashfs) 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

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

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

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

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 上建置 SAN (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 上建置 SAN (AoE, iscsi) 開機環境

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

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 上建置 SAN (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 上建置 SAN (AoE, iscsi) 開機環境

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

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 上建置 SAN (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 上建置 SAN (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 上建置 SAN (AoE, iscsi) 開機環境

Clonezilla 進階使用 28

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 開發與測試環境

再生龍 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), ntfsclone 與 udpcast 1 ( http://udpcast.linux.lu/) 處理元件包含 : 實體資料 : 分割區資料 LVM2 開機載入 (MBR:446+64+2 EFI) 隱藏磁區 用於裸機 (bare material) 還原, 不同於 與以檔案為基礎的備份方式 : 差異備份 還原卡模式 兩種釋出版本 註 1: 使用在 Server edition Live edition : 合單機 個人使用, 作為備份 還原單一機器使用 Server edition (SE) : 適合大量批次還原, 集中式管理, 如 : 電腦教室管理 大量出機生產線... Free Software Lab, NCHC, Taiwan 30

31 Terminology 技術用詞 Raw copying* A possibility to perform sector-by-sector copying of a whole partition Smart copying* A possibility to distinguish which portions of the partition really contain data and to copy these only Live copying* 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 支援儲存與還原不同作業系統 GNU/Linux, MS Windows, Mac OS X, BSD, VMWare ESX(i) File system: ext2/3/4, reiserfs3/4, xfs, jfs, btrfs, ntfs, vfat,hfs+, UFS+, VMFS VMFS(v3,v5-dd) Supports LVM2 無法辨識之檔案系統 (ex: zfs..,) 使用 dd Block base 備份方式 只備份有使用之區塊, 提高備份還原效能 Smart copying, 支援 Grub 1/2 ( 恢復 重建 ) 支援 serial console 檔案式架構之印象檔 : 格式通透 公開 標準格式 ; 易於彈性調 整 支援 Multicast 1 : 適合大量佈署 能結合使用 Live edition 1 註 1: 使用在 Server edition

檔案系統支援比較表 Linux File System MAC MS Window BSD Vmware Esx(i) ext2/3 ext4 reiserfs reiser4 xfs jfs btrfs HFS+ FAT NTFS UFS+ VMFS Clonezilla 1.2.6-40 FOG 029 Fsarchiver 0.6.10 G4L 0.34 Mondo Rescue 2.2.9.4 Partimage 0.6.9 True Image 2011 Ghost 15.0 Free Software Lab, NCHC, Taiwan Y Y Y Y Y Y Y Y Y Y Y Y Y N Y N Y Y N N Y Y N N Y Y Y Y Y Y Y N N Y N N Y N Y N Y Y N N Y Y N N Y Y Y Y Y Y Y N Y N N N Y N Y N Y Y N N Y Y N N Y Y N N N N N N Y Y N Y Y N N N N N N N Y Y N N 33

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

Clonezilla 實務技術課程 Free Software Lab, NCHC, Taiwan 35 Execrise Task: 利用 Clonezilla SE 做 save disk Save disk/partition Now in server Later in client Select in client

36 Clonezilla 備份 / 還原流程 Start Parse partition table Start Read image Save MBR/GPT data Save partition table YES Find the file system of device Create partition table Create LV if LV image found in image dir Find the Device (partition/lv ) NO Save hardware info Decide device imaging engine Smart copyin g? YES partclone partimag e ntfsclone Save device image to stdout NO Use dd to save image to stdout Find the image of device NO Tune the file file system size to fit partition size YES Decide device imaging engine partclone partimage ntfsclone End Decide compressing engine Save stdin as file in the image dir gzip bzip2 lzma lzip xz Reinstall grub if assigned End 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 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 開發與測試環境

Clonezilla 實務技術課程 Free Software Lab, NCHC, Taiwan 39 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 /opt/drbl/sbin/cnvt ocs dev xp.vbox.4g hda sda dcs 切換 restore disk use multicast

40 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 開發與測試環境

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

42 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 開發與測試環境

Clonezilla 實務技術課程 Free Software Lab, NCHC, Taiwan 43 Execrise 切換至 Clonezilla Box 模式 dcs > more > Clonezilla mode > use box mode 切換至 use Clonezilla live as OS 模式 /opt/drbl/sbin/drbl ocs live prep i clonezilla liveversion.iso 用 dcs 指定 save / restore 觀察 pxe 開機參數 移除 /opt/drbl/sbin/drbl ocs live prep u 參數群 : ocs sr / Clonezilla live 自己的開機參數

44 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 開發與測試環境

Clonezilla 實務技術課程 Free Software Lab, NCHC, Taiwan 45 以 save disk 為例 Execrise Non 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="none" 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 usepartclone 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="none" 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-initramfsmanual.doc#00_live-initramfs-manual.doc

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

47 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: No double quotation mark ( ) or single quotation mark (') in your command. ocs_prerun* Clonezilla job ocs_postrun*

48 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

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

Clonezilla 實務技術課程 Free Software Lab, NCHC, Taiwan 50 Unattended recovery with a file server Scenario: You 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 NFS 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 squeeze updated 20110711 sda" ocs_live_extra_param="" ocs_live_keymap="none" ocs_live_batch="no" ocs_lang="zh_tw.utf 8" vga=788 ip=frommedia nosplash Here we preset (1) the keymap as default (NONE, i.e. US keymap),(2) the language as Chinese (zh_tw.utf-8), (3) configure the network, (4) mount the image repository on NFS server, and (5) run the restoring command

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