LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-08-2011, 07:35 AM   #1
oxident
LQ Newbie
 
Registered: May 2009
Posts: 16

Rep: Reputation: 0
Clone a running system?


Hello,

I'm thinking about cloning a system without having physical access to its HDD. Is it possible to simply copy the contents of the filesystem (using ssh/scp) to a freshly formatted HDD (maintaining the source fs-type and -geometry)?

Do I have to pay special attention regarding the /dev, /proc and /sys folders?
 
Old 01-08-2011, 08:00 AM   #2
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
You can use cpio command to live backup. It will not maintain fs-type and disk geometry.
You need to tar backup for /dev

Your destination machine should manually parition and create filesystem as you want.
Again, your source and destination boxes must be same hardware. If not, you may need to change the drivers manually.
 
1 members found this post helpful.
Old 01-08-2011, 08:11 AM   #3
oxident
LQ Newbie
 
Registered: May 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for your answer. So it should be (at least theoretically) possible to acomplish this task...
Is there an easy way to copy the current bootloader or can I simply prepare the new disk using syslinux?

By the way: Why do you mention cpio instead of tar?
 
Old 01-08-2011, 08:16 AM   #4
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
what Linux OS is it oxident, just curious?
 
Old 01-08-2011, 08:23 AM   #5
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
To copy the bootloader
dd if=/dev/sda of=bootloader.img bs=512 count=1
or
dd if=/dev/sda of=bootloader.img bs=446 count=1

sda or hda is depend on your harddisk
bs=512 will backup your parition also. bs=446 will not include partition table only bootloader

Yes. you can use any linux liveCD or bootableCD to create partition table with fdisk,parted utilities and format with any filesystem.

cpio is my preference for live backup. Here is some comment about cpio vs tar. You may google also.
http://rightsock.com/~kjw/Ramblings/tar_v_cpio.html

Cheer
 
1 members found this post helpful.
Old 01-08-2011, 08:29 AM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
What is the reason behind cloning the system? Do you have special settings that you have forgotten or something of the sort?

It has been my experience, that building a new VM or Server, then rsyncing the actual content that I need is always easier than trying to clone a machine. Given, sometimes that means pulling out the httpd config, or hosts files, or other configurations that are sometimes forgotten until you try and get the thing to work, but it still seems quicker than trying to find a machine with the exact same specs, formatting and partitioning, copying bootloaders etc...
 
Old 01-08-2011, 08:30 AM   #7
oxident
LQ Newbie
 
Registered: May 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linus72 View Post
what Linux OS is it oxident, just curious?
Wind River Linux glibc_cgl (standard) 2.0 2.6.21.7-hrt1

It runs inside a raster image processor...
 
Old 01-08-2011, 08:35 AM   #8
oxident
LQ Newbie
 
Registered: May 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by szboardstretcher View Post
What is the reason behind cloning the system? Do you have special settings that you have forgotten or something of the sort?
The reason is a little bit strange: The system is an embedded print server (using specialized/properitary expansion cards) and I need to upgrade its performance (currently, it runs on an Intel Tolapai SoC at 1GHz). Unfortunately, everything's tight closed and no sources are available (not even for the kernel!).

I'm now trying to put everything on a P4 or Core2 mainboard (maintaining the same chipset or at least, matching the same series).

I can't clone this machine offline because the HDD is protected (using ATA security).

Last edited by oxident; 01-08-2011 at 08:39 AM.
 
Old 01-08-2011, 10:11 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
While each is entitled to their own opinion of the horrors of proprietary licensing (the horror, the horror) you should be aware that (aiding in) circumvention of protection mechanisms, regardless of motives, may be a violation of the license agreement and of the LQ Rules.

Last edited by unSpawn; 01-09-2011 at 07:54 AM. Reason: //typo
 
Old 01-08-2011, 12:53 PM   #10
oxident
LQ Newbie
 
Registered: May 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Yes, of course I have this in mind and I totally respect those rules but I don't see any legal issues in this case. I won't break any protection when I swap the hardware my (licensed) software runs on, will I?
 
Old 01-09-2011, 06:25 AM   #11
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by oxident View Post
Unfortunately, everything's tight closed and no sources are available (not even for the kernel!).
This statement runs counter to this:
From http://www.windriver.com/products/pr...-overview.pdf:
Quote:
Wind River Pristine Source Code
Wind River offers all source code in “pristine source” format,
cleanly separating the original open source code and any
additions or modifications that are delivered as patches. This
transparent source code foundation enables you to see which
patches and packages have been included as well as incorpo-
rate new packages or patches as required. Wind River Linux
also provides an open, intuitive build system that makes it
simple to install and modify the kernel and root file system.
What have you done to try to obtain the source?
 
Old 01-09-2011, 06:47 AM   #12
oxident
LQ Newbie
 
Registered: May 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by archtoad6 View Post
What have you done to try to obtain the source?
First, I've crawled Windrivers website in order to find any sources. Then I've written a mail requesting the sources but they replied that my request is being forwarded to the sales dept.
This happened about two weeks ago ...
 
Old 01-09-2011, 07:49 AM   #13
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
I too crawled & googled their web site & found no sources or offer of them.

In your e-mail, did you reference the GPL or mention the FSF?

Last edited by archtoad6; 01-09-2011 at 07:54 AM.
 
Old 01-09-2011, 08:00 AM   #14
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Interesting. While two weeks seems long polling the vendor IMO is the right approach.

Quote:
Originally Posted by oxident View Post
The system is an embedded print server (using specialized/properitary expansion cards)
CYP post detailed print server vendor, brand and product specs? Maybe that'll help those willing to do some research.
 
Old 01-09-2011, 08:21 AM   #15
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Including the make & model of the locked HDD.

Last edited by archtoad6; 01-09-2011 at 08:22 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clone/Fork a running process khanrockz Programming 1 08-27-2008 11:48 PM
best way to clone a Linux system yumener Linux - Hardware 11 02-23-2007 12:37 PM
Best Way To Clone A Running Server? hurt138 Linux - Software 8 01-05-2007 02:41 AM
clone system call swadesh Linux - Software 0 02-07-2005 12:39 PM
Problem running up2date on clone channel after sync to rhn. dmorgan Red Hat 0 03-15-2004 05:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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