* Re: Cloning Hard drives
2007-12-09 20:24 Cloning Hard drives Doug
@ 2007-12-09 21:09 ` Paul Lewis
2007-12-09 21:11 ` Jeff Laughlin
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Paul Lewis @ 2007-12-09 21:09 UTC (permalink / raw)
To: Doug; +Cc: linux-hams
Hi Doug
I have installed a temporary second harddrive
and run up a program called "driveimage" under dos (loaded from Floppy)
to copy the harddrive to the second hardrive as a backup. Boots up OK
on a second machine.
Paul g4apl(gb7cip)
In message <0JSS00MBZU39P300@bgmpomr1.sasknet.sk.ca>, Doug
<appld@sasktel.net> writes
>Is there a way to clone or ghost a Linux hard drive??
>
>Doug VE5DA
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-hams" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
--
paul@skywaves.demon.co.uk
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Cloning Hard drives
2007-12-09 20:24 Cloning Hard drives Doug
2007-12-09 21:09 ` Paul Lewis
@ 2007-12-09 21:11 ` Jeff Laughlin
2007-12-09 21:14 ` Jeff Laughlin
2007-12-09 22:06 ` Cloning Hard drives" Robin Gilks
` (5 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Jeff Laughlin @ 2007-12-09 21:11 UTC (permalink / raw)
To: linux-hams
AFAIK there is nothing exactly like Ghost for Linux, at least not yet.
Last I checked there were some alpha projects. They could me more
mature by now...
The dd command can copy an entire hard drive or a single partition
byte for byte. It's not as flexable as ghost however. It knows nothing
about the size or partitioning of the hard drive and will also copy
all of the empty blocks, so you can only restore a dd image to a
drive/partition of the same or larger size, and if it's larger you
will not be able to access the extra space.
dd if=/dev/hda of=hdaimage bs=10M
This will create an image of the entire hda drive including all
partitions in the file hdaimage in the current directory (don't create
this file on hda obviously). The bs makes dd copy 10 meg chunks at a
time, greatly speeding up the copy.
dd if=/dev/hda1 of=hda1image bs=10M
This will create an image of just the first partition on hda. man dd
for more info.
Tar works perfectly for copying a single partition. It captures all of
the file system metadata. If you are using SE Linux you need to make
sure you are using a version of Tar that captures SE Linux info and
you may need to pass a command line switch to turn it on. Of course if
you are trying to restore a system from tarballs you will have to
partition and format by hand first and then restore each tarball for
each partition.
I'm confused about tarring /dev. It used to be that /dev was a normal
folder with normal files. Then came devfs and now udev. I think some
of the files in /dev are created at boot by the kernel and maybe some
are real or something, I'm not sure.
On Dec 9, 2007 12:24 PM, Doug <appld@sasktel.net> wrote:
> Is there a way to clone or ghost a Linux hard drive??
>
> Doug VE5DA
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
73 de n1ywb
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Cloning Hard drives
2007-12-09 21:11 ` Jeff Laughlin
@ 2007-12-09 21:14 ` Jeff Laughlin
2007-12-09 21:16 ` Jeff Laughlin
0 siblings, 1 reply; 13+ messages in thread
From: Jeff Laughlin @ 2007-12-09 21:14 UTC (permalink / raw)
To: linux-hams
Also if you are trying to tar up your whole system you shouldn't tar
/proc or /sys since they aren't real directories. There may be other
directories you want to omit, like stuff in /var, /tmp, it varies from
distro to distro.
Also bear in mind some things can't be safely backed up at all without
additional steps, like databases.
I really like the book "Practical UNIX Internet and Security" for it's
extensive discussion of backups and disaster recovery.
http://www.oreilly.com/catalog/puis/
On Dec 9, 2007 1:11 PM, Jeff Laughlin <jeff.laughlin@gmail.com> wrote:
> AFAIK there is nothing exactly like Ghost for Linux, at least not yet.
> Last I checked there were some alpha projects. They could me more
> mature by now...
>
> The dd command can copy an entire hard drive or a single partition
> byte for byte. It's not as flexable as ghost however. It knows nothing
> about the size or partitioning of the hard drive and will also copy
> all of the empty blocks, so you can only restore a dd image to a
> drive/partition of the same or larger size, and if it's larger you
> will not be able to access the extra space.
>
> dd if=/dev/hda of=hdaimage bs=10M
>
> This will create an image of the entire hda drive including all
> partitions in the file hdaimage in the current directory (don't create
> this file on hda obviously). The bs makes dd copy 10 meg chunks at a
> time, greatly speeding up the copy.
>
> dd if=/dev/hda1 of=hda1image bs=10M
>
> This will create an image of just the first partition on hda. man dd
> for more info.
>
> Tar works perfectly for copying a single partition. It captures all of
> the file system metadata. If you are using SE Linux you need to make
> sure you are using a version of Tar that captures SE Linux info and
> you may need to pass a command line switch to turn it on. Of course if
> you are trying to restore a system from tarballs you will have to
> partition and format by hand first and then restore each tarball for
> each partition.
>
> I'm confused about tarring /dev. It used to be that /dev was a normal
> folder with normal files. Then came devfs and now udev. I think some
> of the files in /dev are created at boot by the kernel and maybe some
> are real or something, I'm not sure.
>
>
> On Dec 9, 2007 12:24 PM, Doug <appld@sasktel.net> wrote:
> > Is there a way to clone or ghost a Linux hard drive??
> >
> > Doug VE5DA
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
>
>
> --
> 73 de n1ywb
>
--
73 de n1ywb
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Cloning Hard drives
2007-12-09 21:14 ` Jeff Laughlin
@ 2007-12-09 21:16 ` Jeff Laughlin
0 siblings, 0 replies; 13+ messages in thread
From: Jeff Laughlin @ 2007-12-09 21:16 UTC (permalink / raw)
To: linux-hams
Of course if you un-dd a drive image to a drive that's larger than the
image, you may be able to add additional partitions afterwards to
access the extra space, if you're careful not to goof up the existing
partitions.
I guess I should slow down before I post :)
On Dec 9, 2007 1:14 PM, Jeff Laughlin <jeff.laughlin@gmail.com> wrote:
> Also if you are trying to tar up your whole system you shouldn't tar
> /proc or /sys since they aren't real directories. There may be other
> directories you want to omit, like stuff in /var, /tmp, it varies from
> distro to distro.
>
> Also bear in mind some things can't be safely backed up at all without
> additional steps, like databases.
>
> I really like the book "Practical UNIX Internet and Security" for it's
> extensive discussion of backups and disaster recovery.
>
> http://www.oreilly.com/catalog/puis/
>
>
> On Dec 9, 2007 1:11 PM, Jeff Laughlin <jeff.laughlin@gmail.com> wrote:
> > AFAIK there is nothing exactly like Ghost for Linux, at least not yet.
> > Last I checked there were some alpha projects. They could me more
> > mature by now...
> >
> > The dd command can copy an entire hard drive or a single partition
> > byte for byte. It's not as flexable as ghost however. It knows nothing
> > about the size or partitioning of the hard drive and will also copy
> > all of the empty blocks, so you can only restore a dd image to a
> > drive/partition of the same or larger size, and if it's larger you
> > will not be able to access the extra space.
> >
> > dd if=/dev/hda of=hdaimage bs=10M
> >
> > This will create an image of the entire hda drive including all
> > partitions in the file hdaimage in the current directory (don't create
> > this file on hda obviously). The bs makes dd copy 10 meg chunks at a
> > time, greatly speeding up the copy.
> >
> > dd if=/dev/hda1 of=hda1image bs=10M
> >
> > This will create an image of just the first partition on hda. man dd
> > for more info.
> >
> > Tar works perfectly for copying a single partition. It captures all of
> > the file system metadata. If you are using SE Linux you need to make
> > sure you are using a version of Tar that captures SE Linux info and
> > you may need to pass a command line switch to turn it on. Of course if
> > you are trying to restore a system from tarballs you will have to
> > partition and format by hand first and then restore each tarball for
> > each partition.
> >
> > I'm confused about tarring /dev. It used to be that /dev was a normal
> > folder with normal files. Then came devfs and now udev. I think some
> > of the files in /dev are created at boot by the kernel and maybe some
> > are real or something, I'm not sure.
> >
> >
> > On Dec 9, 2007 12:24 PM, Doug <appld@sasktel.net> wrote:
> > > Is there a way to clone or ghost a Linux hard drive??
> > >
> > > Doug VE5DA
> > >
> > >
> > > -
> > > To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > >
> >
> >
> >
> > --
> > 73 de n1ywb
> >
>
>
>
> --
> 73 de n1ywb
>
--
73 de n1ywb
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Cloning Hard drives"
2007-12-09 20:24 Cloning Hard drives Doug
2007-12-09 21:09 ` Paul Lewis
2007-12-09 21:11 ` Jeff Laughlin
@ 2007-12-09 22:06 ` Robin Gilks
2007-12-10 13:07 ` Nate Bargmann
2007-12-09 22:34 ` Cloning Hard drives Vic
` (4 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Robin Gilks @ 2007-12-09 22:06 UTC (permalink / raw)
To: Doug; +Cc: linux-hams
> Is there a way to clone or ghost a Linux hard drive??
>
> Doug VE5DA
>
I'd recommend dar - like tar but designed from scratch to back up to disk
(CD or DVD) rather than tape. It allows directories to be easily excluded
(eg. /proc and /sys) and there are GUIs available such as kdar for KDE.
The archives created can be compressed with gzip or bzip2 to save space
(but it takes a LOT longer to so the backup then). It, like tar, maintains
soft/hard links, ownership and permissions.
I usually use the command line for backup but if I only want to restore a
couple of files then kdar allows me to pull whatever files I like from the
archive without all the rest.
--
Robin Gilks
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Cloning Hard drives"
2007-12-09 22:06 ` Cloning Hard drives" Robin Gilks
@ 2007-12-10 13:07 ` Nate Bargmann
0 siblings, 0 replies; 13+ messages in thread
From: Nate Bargmann @ 2007-12-10 13:07 UTC (permalink / raw)
To: linux-hams
* Robin Gilks <g8ecj@gilks.org> [2007 Dec 10 00:33 -0600]:
>
> > Is there a way to clone or ghost a Linux hard drive??
I've had good luck using rsync and KNOPPIX for such a task. For
example, I've used the following to copy installed partitions from an
older laptop to its replacement and likewise when upgrading hard
drives.
Boot both machines with KNOPPIX (version doesn't seem to be critical as
I've used everything from Version 3.8.1 to 5.1.1). The "remote" machine
is the one that will be receiving the data and the "source" machine has
the current data (I have copied data from a failing drive using this
method to my desktop, then back from the desktop to the laptop). I'll
assume that the machines are network connected and the remote is
192.168.0.1 and the source is 192.168.0.2. If you're on a switch with
DHCP, your addresses will be different.
On the remote machine once booted into KDE:
Open a Konsole session
su
passwd admin # This is necessary since ssh needs a password
mount target partition on /mnt/hdaX
rsync --daemon
/etc/init.d/ssh start
On the source machine (also booted into KDE):
Open a Konsole session
su
mount target partition on /mnt/hdaX
rsync -avHx /mnt/hdaX 192.168.0.1:/mnt/hdaX
# you'll be prompyed for the apssword of the remote machine, enter
# admin as assigned above. Answer 'yes' to accept ssh key
Note that on the rsync command line on the source machine, a trailing
slash is significant. Without a slash, the file layout will be put
into the root of the partition, with a slash the file structure will
appear under the preceding directory before the slash. Experiment.
Also, installing Grub or LILO on a clean drive may be problematic.
I've solved this a couple of ways. Since I use my laptop for
experimentation, I had installed KNOPPIX to the hard drive in its own
partition and was able to boot into my copied Debian partition by
fixing /boot/grub/menu.lst. I've also used the Debian install disk for
Etch in "rescue" mode to place Grub in the MBR after pointing it to the
copied partition with /boot/grub/menu.lst.
I hope these notes help.
73, de Nate >>
--
Wireless | Amateur Radio Station N0NB | Successfully Microsoft
Amateur radio exams; ham radio; Linux info @ | free since January 1998.
http://www.qsl.net/n0nb/ | "Debian, the choice of
My Kawasaki KZ-650 SR @ | a GNU generation!"
http://www.networksplus.net/n0nb/ | http://www.debian.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Cloning Hard drives
2007-12-09 20:24 Cloning Hard drives Doug
` (2 preceding siblings ...)
2007-12-09 22:06 ` Cloning Hard drives" Robin Gilks
@ 2007-12-09 22:34 ` Vic
2007-12-10 0:01 ` Robert Jenkins
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Vic @ 2007-12-09 22:34 UTC (permalink / raw)
To: linux-hams
> Is there a way to clone or ghost a Linux hard drive??
Yes.
dd is the best way IMO - just make sure you've got DMA turned on & use a
decent blocksize, or it takes forever.
There are a couple of utilities that do stuff like this - such as FOG
http://freshmeat.net/projects/freeghost/ . I don't use apps like this;
they're just fluff as far as I'm concerned.
If you're trying to move between different filesystems, consider using
rsync. You ought really to do this from a liveCD, but TBH, I've done it
loads of times with no problems. You just get a warning next time you
boot...
HTH
Vic.
^ permalink raw reply [flat|nested] 13+ messages in thread* RE: Cloning Hard drives
2007-12-09 20:24 Cloning Hard drives Doug
` (3 preceding siblings ...)
2007-12-09 22:34 ` Cloning Hard drives Vic
@ 2007-12-10 0:01 ` Robert Jenkins
2007-12-10 0:30 ` Jim Bayer
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Robert Jenkins @ 2007-12-10 0:01 UTC (permalink / raw)
To: 'Doug', linux-hams
Yes, Ghost..
Norton Ghost (up to the 2005 version) will happily clone a Linux system.
Make a Ghost floppy on a Win machine with Ghost installed & boot from that,
or if you don't have a floppy drive on the target machine make the floppy
anyway then do a ghost copy (of anything) to DVD and opt to make it
bootable, copying from the Ghost floppy.
You can then boot Ghost from the DVD on the target machine.
After copying, you will have to reinstall Grub. Run the linux CD/DVD in
rescue mode, chroot to the mounted drive & run grub.
Then do
find /grub/stage2
Which should return something like hd0,0
Enter
root(hd0,0)
setup(hd0)
(that's from memory, it should be approximately correct..)
The later versions of 'Ghost' are Windows-only in every sense, it must be a
version that allows itself to be put on a floppy disk.
You can also replicate a drive in Linux, but this is rather more complex.
Robert, G8TBF.
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Cloning Hard drives
2007-12-09 20:24 Cloning Hard drives Doug
` (4 preceding siblings ...)
2007-12-10 0:01 ` Robert Jenkins
@ 2007-12-10 0:30 ` Jim Bayer
2007-12-10 0:35 ` adam.vazquez
2007-12-10 15:29 ` Mike McCarthy, W1NR
2007-12-10 23:04 ` Scott Lambert
7 siblings, 1 reply; 13+ messages in thread
From: Jim Bayer @ 2007-12-10 0:30 UTC (permalink / raw)
To: Doug, linux-hams
You could also use cpio as follows:
1. Cd to the target you want to copy to
2. The command is: find -depth <source path> | cpio -pvdum .
This will pass through the file tree from the find and pre-build the
entire structure for the target. cpio does a block and sector copy so
you need a file system target at least as large as the source.
Another suggestion that may work is to use mkisofs and create an iso
image of the source, which will also grab the boot sectors.
If I think of any more I'll pipe up again.
On 12/9/07, Doug <appld@sasktel.net> wrote:
> Is there a way to clone or ghost a Linux hard drive??
>
> Doug VE5DA
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Cloning Hard drives
2007-12-10 0:30 ` Jim Bayer
@ 2007-12-10 0:35 ` adam.vazquez
0 siblings, 0 replies; 13+ messages in thread
From: adam.vazquez @ 2007-12-10 0:35 UTC (permalink / raw)
To: Jim Bayer; +Cc: Doug, linux-hams
Hello from Adam kb2jpd
Google ddcopy instead. It is text mode and it is by far superior to dd
and if you have bad sectors it will recover the data using a narrowing
window algorithm.
It works great for good and dying drives .
On 12/9/07, Jim Bayer <kc9aop@gmail.com> wrote:
> You could also use cpio as follows:
>
> 1. Cd to the target you want to copy to
> 2. The command is: find -depth <source path> | cpio -pvdum .
>
> This will pass through the file tree from the find and pre-build the
> entire structure for the target. cpio does a block and sector copy so
> you need a file system target at least as large as the source.
>
> Another suggestion that may work is to use mkisofs and create an iso
> image of the source, which will also grab the boot sectors.
>
> If I think of any more I'll pipe up again.
>
>
> On 12/9/07, Doug <appld@sasktel.net> wrote:
> > Is there a way to clone or ghost a Linux hard drive??
> >
> > Doug VE5DA
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> -
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Cloning Hard drives
2007-12-09 20:24 Cloning Hard drives Doug
` (5 preceding siblings ...)
2007-12-10 0:30 ` Jim Bayer
@ 2007-12-10 15:29 ` Mike McCarthy, W1NR
2007-12-10 23:04 ` Scott Lambert
7 siblings, 0 replies; 13+ messages in thread
From: Mike McCarthy, W1NR @ 2007-12-10 15:29 UTC (permalink / raw)
To: Doug; +Cc: linux-hams
Doug wrote:
> Is there a way to clone or ghost a Linux hard drive??
>
> Doug VE5DA
>
>
Knoppix live CD or DVD has tools like dd and gparted to copy and resize
partitions.
There is also a gparted live CD.
For a commercial product, Acronis True Image understands Linux
filesystems and can do network images and partition/filesystem resizing
as well. Norton Ghost really doesn't do Linux filesystems other than
raw images of the partition.
Mike, W1NR
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: Cloning Hard drives
2007-12-09 20:24 Cloning Hard drives Doug
` (6 preceding siblings ...)
2007-12-10 15:29 ` Mike McCarthy, W1NR
@ 2007-12-10 23:04 ` Scott Lambert
7 siblings, 0 replies; 13+ messages in thread
From: Scott Lambert @ 2007-12-10 23:04 UTC (permalink / raw)
To: Doug; +Cc: linux-hams
On Sun, Dec 09, 2007 at 02:24:10PM -0600, Doug wrote:
> Is there a way to clone or ghost a Linux hard drive??
http://www.feyrer.de/g4u/
--
Scott Lambert KC5MLE Unix SysAdmin
lambert@lambertfam.org
^ permalink raw reply [flat|nested] 13+ messages in thread