[geeks] Copy a linux disk
Doug McLaren
dougmc+sunhelp at frenzy.com
Sat May 27 22:38:53 CDT 2006
On Sat, May 20, 2006 at 09:35:42PM -0500, Bill Bradford wrote:
| On Sat, May 20, 2006 at 11:57:29AM -0400, Joshua Boyd wrote:
| > I'm trying to accomplish something on linux that is trivial on Solaris
| > and Irix.
|
| Would this be of any use:
|
| http://www.systemimager.org/
systemimager is built on rsync, and is quite convenient to work with,
but it's got it's own share of quirks.
I'm pretty sure that rsync can handle special devices -- block and
character devices anyways -- just fine, as such support would be
needed for systemimager.
gnu tar can handle them as well, on all the *nixes, and has for over a
decade, and it's what every Linux I've ever seen comes with. It used
to be that cpio's big strength over tar was that it could do special
devices, but gnu enhanced tar nicely.
In any event, it was always Irix that gave me fits when copying an
entire disk to another disk -- at least when I had to make the new
disk bootable. It's been a while, so I forget the commands, but you
had to copy some things to a special hidden partition on the disk if
you wanted it to boot ...
(Side note -- I used gnu tar to copy Irix disks too. Worked great,
after the fx and I forget what other magic to get the special boot
bits copied.)
Of course, Linux has often required some grub/lilo magic, so perhaps
it's just that I've gotten more used to that.
In any event, I suspect that Joshua's problem was that when he was
using cpio, devfs/udev or it's equivilent was mounted (and it had to
be, for the system to be usable) and this `covered up' the entries
that were in /dev previously, which were needed for the boot process.
Often the specific device names are different between different
setups, and more than one setup can be required in the process of
booting up, which can cause MUCH confusion, especially when using
something like systemimager (those quirks I was mentioning ...)
In any event, the fix in that case to copy the disk would be to boot
off some other media, like a Knoppix cd, fdisk your new disk, format
it's filesystems, then mount your two disks and copy via your favorite
tools (cpio, tar, rsync, whatever), then use the usual tricks to get
grub, lilo or the equivilent going, and then you're done.
--
Doug McLaren, dougmc at frenzy.com
How many roads must a Man travel down before he admits he is lost?
More information about the geeks
mailing list