My goal here is to figure out a way to clone a RedHat Enterprise Linux (AS4) server in order to make restoration easier in case of a disaster. Thus far, every option I have tried as resulted in boot failures of various flavors. (kernel panic/halt or else GRUB fails to find the kernel)
I would like some detailed descriptions as to how I could go about making a clone/image file of a working RedHat Enterprise Linux system, Restore that image onto a new computer, and have a working "copy" of the original computer when I'm done.
So far, what I have tried as been based on booting Knoppix, connecting to a network share (smbmount) and creating/restoring my "image".. I have tried using PartImage (kernel panic on reboot, failed) as well as manually creating the file system, mounting it under Knoppix, and zipping everything into a tarball to be unzipped on the target system..
Here's the detailed explaination of what I have tried:
------------
/*on the existing system*/
-Boot Knoppix
-Root Shell
mkdir /mnt/smb
mkdir /mnt/tmp
fdisk /dev/hda /*make note of file system details to be restored on target system */
/*for the record, /dev/hda1 is boot, /dev/hda2 is root, /dev/hda3 is swap*/
smbmount //smbserver/dir /mnt/smb -o username=user/domain
/*prompt for password*/
mount -t ext3 /dev/hda2 /mnt/tmp
mount /dev/hda1 /mnt/tmp/boot
cd /mnt/tmp
tar czvf /mnt/smb/RHAS4IMG.tgz ./*
------------
/*on the new system*/
-Boot Knoppix
-Root Shell
mkdir /mnt/smb
mkdir /mnt/tmp
fdisk /dev/hda /*set up disks as noted from source system*/
mke2fs /dev/hda1; mke2fs -j /dev/hda2; mkswap /dev/hda3
smbmount //smbserver/dir /mnt/smb -o username=user/domain
/*prompt for password*/
mount -t ext3 /dev/hda2 /mnt/tmp
mkdir /mnt/tmp/boot
mount /dev/hda1 /mnt/tmp/boot
cd /mnt/tmp
tar xzvf /mnt/smb/RHAS4IMG.tgz
------------
I have also tried using PartImage to replace the tar steps, but got similar results..
Can anyone point out potential flaws in this procedure and help me get a working clone up and running? (would appreciate detailed steps, as my knowledge of linux is not "expert")
Also a consideration (though I haven't gotten far enough to worry about this part yet) How do I tell a RHN Registered RHEL system to forget its systemid and re-register with RHN? (so that I can register it as a new system or delete the existing registration on RHN)
-Thanks in advance for any comments.