LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   cloning the installation (https://www.linuxquestions.org/questions/fedora-35/cloning-the-installation-627200/)

fredvr 03-11-2008 06:54 AM

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.

Lenard 03-11-2008 08:08 AM

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.

fredvr 03-11-2008 09:23 AM

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... :)

Lenard 03-11-2008 09:45 AM

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() {
        Info "Create the ISO image:"; InfoNL
        mkisofs -f -o $C_ISOFILE -b isolinux/isolinux.bin -c isolinux/boot.cat \
                -no-emul-boot -boot-load-size 8 -boot-info-table \
                -l -R -r $C_ISODIR
        if [ $? -ne 0 ]; then
                Error "mkisofs failed"
        fi
        InfoNL "OK"

        Info "ISO image generated as $C_ISOFILE - Ready to burn !"; EchoNL
}


fredvr 03-11-2008 11:52 AM

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

fredvr 03-13-2008 04:07 AM

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)

VladStar 04-22-2008 12:35 PM

Quote:

Originally Posted by fredvr (Post 3087127)
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

I am not sure, if the following is related to your problems, but it may lead you to the solution.

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...

fredvr 04-23-2008 04:24 PM

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

VladStar 04-24-2008 10:29 AM

Quote:

Originally Posted by fredvr (Post 3130721)
thanks for your response anyway..!!

No problem. I submitted a bug report to developers, hopefully they would fix.

Mark Hewitt 12-12-2008 02:36 AM

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

VladStar 12-12-2008 09:32 AM

Quote:

Originally Posted by Mark Hewitt (Post 3372693)
Did anyone find a solution to this yet?

Based on my experience, I has the same message in 2 cases:
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.

doublejoon 12-12-2008 11:10 AM

Solution: Clonezilla live

http://clonezilla.org/clonezilla-live

It Works

fredvr 12-14-2008 03:09 PM

Quote:

Originally Posted by Mark Hewitt (Post 3372693)
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

Hi Mark

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.