(function(a,e,f,g,b,c,d){a.GoogleAnalyticsObject=b;a[b]=a[b]||function(){(a[b].q=a[b].q||[]).push(arguments)};a[b].l=1*new Date;c=e.createElement(f);d=e.getElementsByTagName(f)[0];c.async=1;c.src=g;d.parentNode.insertBefore(c,d)})(window,document,"script","https://www.google-analytics.com/analytics.js","ga");ga("create","UA-732153-7","auto",{allowLinker:!0,siteSpeedSampleRate:10});ga("set","transport","beacon");ga("set","anonymizeIp",!0);ga("require","linker"); ga("linker:autoLink","askapache.com askapache.net htaccess.io htaccesselite.com askapache.info htaccess.guru".split(" "),!0);ga("send","pageview"); CLASS="ARTICLE" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

HOWTO Clone Disk Images on Linux Booted from a Network

Guilherme Tupynambá

gtupy (at) uol.com.br


Revision History
Revision 0.32002-09-24Revised by: gct
Review suggestions incorporated
Revision 0.22002-09-23Revised by: jyg
Minor revisions
Revision 0.12002-09-09Revised by: gct
First draft.

Table of Contents
1. Legal Notices
1.1. Disclaimer
1.2. Copyright
1.3. Feedback
2. Introduction
2.1. Why clone disk images
2.2. Why boot from a network
2.3. Network boot process overview
3. Setting up DHCP and TFTP servers
3.1. Setting up DHCP
3.2. Setting up TFTP
3.3. Using different servers
4. Preparing boot files
4.1. Kernel
4.2. Files on initrd
4.3. Packing initrd
5. Booting from Grub floppy disk
5.1. Grub menu file
5.2. Compiling Grub with network support
5.3. Making the boot floppy disk
6. Running the clone script
6.1. Saving and restoring disk images
6.2. Using fdisk
7. Extending the solution
7.1. Saving and restoring files instead of file systems
7.2. Setting up the master boot record
7.3. Loading necessary modules
7.4. Predefined operations on grub.conf
A. List of files on initrd
B. Clone script