Skip to Content
Linux Desktop Hacks
book

Linux Desktop Hacks

by Nicholas Petreley, Jono Bacon
March 2005
Beginner to intermediate
342 pages
15h 55m
English
O'Reilly Media, Inc.
Content preview from Linux Desktop Hacks
228
|
Chapter 9, Administration and Automation
#74 Clone Your Linux Install
HACK
HACK
#74
Clone Your Linux Install Hack #74
Deploy a single installation of Linux across many computers.
Cloning is simply a method by which some data is copied exactly, from one
medium to another. This can be a physical CD being copied into a CD
image (such as an ISO image) or, in the case of this hack, copying a hard-
disk partition into a file that can be stored for archival purposes or deployed
to several machines. The use of cloning is very widespread on the Internet,
with CDs and floppies being distributed as images that are just a bit-for-bit
copy of the original medium. Cloning can also be used to move your Linux
system to a larger hard drive.
Create an Image
Linux systems generally have a utility installed called dd (data dump) that
can accept an input from a device and pipe the output as an exact copy of
the original to another device or a file. This is the tool you should use when
creating a cloned image of an installation.
First, you need to find out which partition on the hard disk contains the root
filesystem. You can do this using the
mount command:
foo@bar:~# mount
It should give some output similar to the following:
/dev/hda1 on / type ext3 (rw,noatime)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
The entry you’re looking for is the one mounted on the root filesystem, /.In
this case, it is /dev/hda1 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones

Publisher Resources

ISBN: 0596009119Catalog PageErrata