cloning the installation
Hi
I have a serversystem running FC8 with iScsi-target and drbd installed. Unfortunately I'm not succeeding in making a clone of the systemdisk such a way that I can clone this system without the need to go trough the whole install process. In case of a crash I can use the clone to restore the system (on other hardware) I want to find a simple but reliable solution for this. - using dd: this will probably work but is pretty inefficient because a lot of diskspace is not being used. - using ghost: Didn't get that one to work. it looks like it doesn't see the lvm2 volume(=system) content. - using partimage\'PING'. bumped into a bit similar problems. the choices you have to make in the interface is a bit confusing also. - using clonesys.sh!! This is basically a smart script I found on the internet. The basic idea is great. It creates an iso to burn on CD. it's generating a initrd.img, using a copy of the systems kernel and building archives, gathering system information, etc, on the iso. This way it's able to regenerate the whole installation on a (new) system. The very big advantage of this method is that it's more hardware independent and you create a clean system without all unwanted stuff this way. In my situation everything seems to fit on one single CD. (found it on trickytools.com/php/clonesys.php and according to the information on that page the script has been successfully tested with RedHat Linux 9/ES3/ES4, Mandrake 10.x, Fedora Core 3/4, SuSE 9.x) ######################## I'm using FC8 however... The ISO building works great but at the end of the bootingprocess it ends in a kernel panic after burning the iso on cd and boot from it. The exact message is: RAMDISK: Compressed image found at block 0 grow_buffers: requested out-of-range block 18446744071562067968 for device ram0 isofs_fill_super: bread failed, dev=ram0, iso_blknum=17, block= 2147483648 List of all partitions: No filesystem could mount root, tried: iso9660 Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(1,0) Somebody any idea what might cause this and\or what I can do to get it work? If this works I really think this is a great solutions for cloning systems. |
I find that parted / gparted works for me. Sure it takes a bit of time and a spare hard drive(I use an external USB hard drive myself) but it does work.
Best to boot from a LiveCD like the SystemRescueCD ( http://www.sysresccd.org/Main_Page )to do this. One might have to install the bootloader (GRUB??) on the spare hard drive but that is not a big issue. |
I really want to see if it's possible to get clonesys.sh working because it really has a lot of advantadges using this method for cloning a system because of it's simplicity, speed, cleanup, flexibility of moving the installation\configuration around, etc
(It's not an alternative for making backups of partitions\data..!!) So if I can get some help to solve the booting problem I would be very pleased... :) |
A quick check of the clonesys.sh file shows one possible area of concern, others may be present also;
The section that I found, corrected; Code:
CreateSingleISOImage() { |
Lenard 1st of all: thanks for trying to help me!!
I changed the boot-load-size from 4 to 8 as you suggested and rebuild the iso\cd. unfortunately the same message\panic occurs earlier I also doubled the value of 8192 to 16384 in COUNTOFKB=$(($COUNTOFKB + 8192)) to create a bit bigger ramdiskfile but that didn't help much either. fred |
oops looks like I'm on my own again.. :cry: :)
I found out that the clonesys.sh script also tries to copy the mdraid and mkraid modules in the cloning process. In the generated log I there is an error that it can't copy the mkraid module and it's libraries. In the \etc of the created initrd I find a raidtab whih is generated by the script. It looks like Fedora FC8 doens't have mkraid however... Don't know if this has something to do with the 'grow_buffers: requested out-of-range block 18446744071562067968 for device ram0' kernel panic during boot but when not it will defenitely turn into a problem later Does somebody know if mkraid has been replaced by something else in FC8 and how I can migrate the mkraid \ raidtab to something which FC8 does support? (or get mkraid to work) (unfortenately I'm new to software raid stuff on linux) |
Quote:
It took for me a while to figure out in my diskless environment, that the only reason of having "grow_buffers" message in FC8 is a lack of "init" file inside of initrd.img (regardless of specified "init=disklessrc" kernel option). I have extracted initrd.img into temp folder, created a link using "ln -s diskless init" command and then packed it back (make sure you specify 'newc' format). It works now. What a shame... |
Hi Vladstar
because I didn't get much responses on forums for my problem and I already spent a lot of time to get it solved (in which I didn't succeed..:( ) I totally got away from cloning the system. Bumped into too much 'strange' problems. I found a solution in making a kickstart installation icw some scripting. thanks for your response anyway..!! regards fred |
Quote:
|
Did anyone find a solution to this yet?
Clonesys would seem perfect for my needs of just copying one system to another. But it fails with the same error as described by the OP. I'm trying to clone Scientific Linux 4.5 (which is bascially RH Ent). It's getting frustrating as systemimager also fails on (slightly different) kernel panic at exactly the same point! Thanks to anyone who could help. Mark |
Quote:
1) Wrong format of initrd.img file (which must be in 'newc' format for newer kernels) 2) Lack of 'init' file inside of initrd.img Unpack initrd.img into some folder, make sure it has 'init' file and pack it back using the following command: find . | cpio -o --verbose --format=newc | gzip -9 >/path/initrd.img Of course, it could also be something else. |
|
Quote:
I got away from clonesys. I had some support of the creator of he script but didn't get it to work. Got different errors on other distributions also and it did cost me a lot of time. It would be a perfect solution but it seems to be pretty dependant to a specific distribution\version. I found a good alternative in scripting a good kickstart for my job which does the job very good with a predictable result.. regards fred |
All times are GMT -5. The time now is 05:01 AM. |