Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-25-2008, 03:19 PM   #1
Registered: Feb 2007
Posts: 386

Rep: Reputation: 30
Clone OS from one machine to the other machine type

I install a redhat on one machine, recompile the kernel.
Now, i want to have the same setup on other machine (different type of desktop).

Should I reinstall it from CD, or is there a way I can image the OS?
Old 06-25-2008, 05:17 PM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
On the whole, reinstalling from a CD is probably easier.

If you want to copy the kernel image, then I would copy the kernel sources after doing the reinstall, and then just re-install the kernel on the second machine.

Cloning the disks is also possible. This is easiest if the two machines have hard-disks of the exact same size.

First, install sshd on the first machine, so that you can read the disk image across the network from the second machine.

You may run into problems if you don't remount the filesystem on the first machine as read-only at this point. For each filesystem:
mount /path/to/mountpoint -o remount,ro
For SATA or SCSI disks, you can create a disk image using:
dd if=/dev/sda of=/tmp/sda.dump
Now boot the second machine from a live (or rescue) CD.

You can then use fuse to mount the /tmp directory from the first machine. See

The command you will need is as follows; username is your user on the first machine and is its IP address:
sshfs username@ /mnt/remote
dd if=/mnt/remote/sda.dump of=/dev/sda
You should be able to substitute sda with hda for IDE/ATAPI disks. Because hda and sda includes the entire disk, boot sectors, partition tables and all, it should be immediately bootable.

Please note: This is a dangerous procedure, and I haven't tried it myself, although it should work. Please make sure you back up all your data first, including your kernel configuration.
Old 06-25-2008, 05:41 PM   #3
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
The initial installation should have created a kickstart file in root's home directory that will make the second installation an effective copy if that helps


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to clone a linux machine fw12 Linux - Software 17 04-07-2014 05:09 AM
how to clone Windows XP out of VMware to a physical machine? browny_amiga General 10 07-23-2008 01:53 AM
LXer: Psystar doesn't fade away, offers sweet Linux machine in addition to Mac clone LXer Syndicated Linux News 1 05-30-2008 04:25 AM
Windows Domain type of machine security Repentant_MCSE Linux - Networking 1 02-12-2006 07:21 PM
Identifying the type of Alpha machine wenberg Linux - Hardware 1 01-19-2005 05:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration