Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have tried cloning a linux version with ext3fs filesystem using Ghost 7.5, 2003 and the latest Ghost 8.0.
The linux version I use is a Check Point hardened version of Red Hat which they call SecurePlatform.
I have 2 IDE disks and I clone from the first to the other. The cloning goes slow but it finishes with success. When I then remove the first disk and connect the second disk the way the first was (same ide controller etc), then it does not boot.
Grub isn't even shown.
When I put the 2nd disk back at the place where it was cloned to, I see grub booting but then I get a "Kernel panic, try passing the init=" parameter.
I remember that the partitions were resized by Ghost as it didn't want to use the same sizes, I think it wants the sizes to be the multiples of something.
Does anyone know what I should do ? The init parameter results in google mostly refer to bad disks/layout/missing files. Is there a grub parameter I can use?
Use the 'root=<disk>' option. This specifies where the linux partition is. It may have changed. You don't need to use Ghost anyways. Just copy all the files, reinstall the bootloader if needed, and edit the /etc/fstab file if needed.
The root is now located at /dev/hda2 and the /boot at /dev/hda1
Should I use the /boot ?
Anyway, cloning should be identical ? So same hardware path should be okay when I attach the disk to the same controller and the same mastersetting.
Just copying is not good I think....unless you mean with dd ? If I would copy then I must first create all the partitions and then copy.
Ghost should work imho....anyone done it ? It works perfectly with Windows so why not with Linux ? The ext3fs is supported but apparently ghost changes something in the bootfiles or elsewhere...
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
ghost has to make some changes when it copies stuff, and sometimes,
things will not boot correctly after the copy. i think you didn't put your first
disk back just the way it was, or it would have worked like before.
dd will copy best for that sort of thing
dd if=/dev/hda of=/dev/hdb<or whatever it is> bs=512
i've found that size copies about the fastest.
I am sorry if I haven't been clear : the first and original disk always continues to work. It is the new disk that I am testing and who doesn't want to boot correctly.
I want a backup disk for in case I mess up my original.
dd only works for disks that have the same size ? I have a 80 GB original disk but the data on it is only about 1 GB and my backup disk is 40 GB.
These disks are located in an HP/Compaq DL320 server.
I don't see why just copying all the files wouldn't work. Copy them like so:
First make & format the new partitions. To format ext3, use 'mke2fs -j <disk>'.
Now mount them:
#Mount old disk.
mkdir /mnt/hd1
mount /dev/<oldrootpartition> /mnt/hd1
mount /dev/<oldbootpartition> /mnt/hd1/boot
#Mount new disk
mkdir /mnt/hd2
mount /dev/<newrootpartition> /mnt/hd2
mkdir /mnt/hd2/boot
mount /dev/<newbootpartition> /mnt/hd2/boot
#Start copying:
umask=000
cp -a /mnt/hd1/* /mnt/hd2
#Edit the /etc/fstab & /etc/grub.conf in the new disk:
vi /mnt/hd2/etc/fstab
vi /mnt/hd2/etc/grub.conf
I was able to clone a RH8.0 on a simple PC. I was also able to clone SecurePlatform on that PC.
So I think there are problems with the combination of ghost and the server hardware.
Using cp does not maintain the user rights I think ?
On HP-UX I used to type find / -name -depth -mountstop -print | cpio -pvdumax in order to do that. I don't want to use chmod, chown after the cp. Or is the linux cp better than the HP-UX one ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.