LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-25-2008, 03:19 PM   #1
ufmale
Member
 
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
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

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:
Code:
mount /path/to/mountpoint -o remount,ro
For SATA or SCSI disks, you can create a disk image using:
Code:
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 http://www.cyberciti.biz/tips/rhel-c...ing-sshfs.html

The command you will need is as follows; username is your user on the first machine and 192.168.1.1 is its IP address:
Code:
sshfs username@192.168.1.1: /mnt/remote
Code:
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
billymayday
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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 AM.

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