Click to See Complete Forum and Search --> : cloning installations
Antho
05-05-2001, 05:52 PM
Hi , y'all...
If I have two hard disks, can I clone my installation simply by tar and gzipping my / directory and unpacking it onto my second disk? I tried something similar when I was building my LFS, but the clone installation acted weird, it froze up constantly and crashed often, are there any special flags I need to use when I tar and gzip it?
ph34r
05-05-2001, 10:41 PM
A few ways to do it. You could manually copy, since there are things you *don't* want to get by copying /* .
cp -a /root /home /var /etc /newroot (and so on, leave out /proc tho!)
Or, the later versions of ghost support Linux as well.
Antho
05-06-2001, 01:49 AM
Thank you VERY much...I totally spaced out proc...that helps explain all the spooky behavior ;)
Kadesh
05-06-2001, 02:48 AM
Don't forget to modify fstab and lilo.conf . Those don't act nice if you mess them up.
Antho
05-06-2001, 03:33 AM
Thank you ...I've been putting off building my latest Linux From Scratch and now that I know how to do this I think I'll start.
DrDebian
05-06-2001, 03:58 AM
Originally posted by Antho:
<STRONG>Thank you ...I've been putting off building my latest Linux From Scratch and now that I know how to do this I think I'll start.</STRONG>
Good for you. In case you want to take extra precautions, you might want to consider making backups to CDRs. Try looking for mkCDrec on www.freshmeat.net, (http://www.freshmeat.net,) it's really fantastic for restoring and also as rescue disk!
Antho
05-06-2001, 02:56 PM
I'm definitely going to go check that out, thanks for the tip! :)
My personal favorite method for doing this involves having a second partition mounted under '/mnt/something' where 'something' can be backup/lfs/newinstall whatever. You head over to the root dir and issue
linuxprompt:/# find . -xdev | cpio -pm /mnt/something
The disks will churn for a moment or two and you will have a nicely mirrored copy of your root partition, less other partitions mounted under '/'. So for example, if you had other dirs mounted seperately, like '/boot' '/var' '/home' etc, you'd want to repeat the same command but under the different dir, like so
linuxprompt:/home# find . -xdev | cpio -pm /mnt/something/home
so on and so forth. Give it a shot, it works great for me; I always use it to transfer my root partition over to a RAID device.
Antho
05-06-2001, 03:42 PM
You know, if I can get a ghosted LFS install (the first static stage) on a cdr as per the suggestions above,and use a boot-disk (a la tmsrtbt) then I wouldn't have to use a "normal" distro at all to build my LFS systems(after this last time of course), then I could use my second disk as a backup dump as per your suggestion, thanks for the tip. :)