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 need help cloning a 80Gb IDE hardisk with slackware linux installed
(reiserfs file system and lilo boot loader).I have tried "sudo ddrescue
-v /dev/sda
/dev/sdb"-
where sda is the source hardrive- under a ubuntu 8.10 live desktop
session and everyting seems to go just fine.
Now if i try to boot the
clone operating system it seems to boot fine meaning that i see a
loading bar but when the loading has reached towards the end the
computer shuts down without any warning whatsoever. The source system behaves as it should on the same computer. I have also tried
Clonezilla LiveCD with the same dissapointing result.I must mention here
that this harddisk operates some kind of a file server that is used to
play music so maybe i'm dealing with a security system of some kind.If
this is the case then how can i go around it? I will be greatful for
any hint.
Did you clone sda to sdb then boot on sdb or did you remove sda so that sda effectively becomes sda?
Why not simply do a dd?
Are the drives the same size?
Why not disable the splash screen in grub so that you can see what happens at boot?
Have you updated your /etc/lilo.conf on /dev/sda with an appropriate stanza for the clone system and then run lilo from within your original install?
An appropriate stanza would be something like this.
Quote:
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/sdb
label = SlackClone
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
Thank you eco, allend, DropSig for such a quick replie. You made my day
because this is my first post on a forum ever so please be proud of
youself.
@eco:-yes.i cloned sda to sdb, then boot with sdb as the only hardisk in
the system with the result described.
-a joke would fit for the second question: i didn't use dd
because ddrescue was in the tutorial that i followed and not dd
(yes although i use ubuntu for 2 years, i am still a newbie). How
would a dd command look for my case and why should i use it instead?
-the drives are the same size; both 80Gb IDE from diferent vendors
-i think lilo is the boot loader and i will do that after i'll
found how to do it.
@allend:you're saying i should try altering /etc/lilo.conf on the clone,
then put both hardisks in the system, booting the clone with the lilo from the
original hd? How do i do that? And if this is succesful how will it
help me?
@DropSig:LFS = Linux From Scratch?
What (i believe) you didn't tell me is why didn't my method worked (i even tried with another 80Gb hard as to eliminate the possibility of faulty hardware or somthing); was
the MBR copied allright? was lilo copied allwright? Than what's
happening?
Yes LFS = linux from scratch,
Sorry i catn tell you exactly why you have that problem,
i never played with dd or the like.
But like eco said, remove the splash screen to see whats goin on.
dd does a sector by sector copy of your disk. So something like
Code:
# dd if=/dev/sda of=/dev/sdb bs=<size to determin>
This will copy the entire disk, MBR included from sda to sdb. The bs represent the sector size. The smaller the better but the larger the faster. Have a look and find out which is best for you.
If you want to simply copy it to a large image file:
Code:
# dd if=/dev/sda of=file.img bs=<size to determin>
@allend:you're saying i should try altering /etc/lilo.conf on the clone,
then put both hardisks in the system, booting the clone with the lilo from the
original hd? How do i do that? And if this is succesful how will it
help me?
What I am saying is leave both disks in your system.
To test your cloned system, you need to tell lilo that you have introduced another operating system into your setup. This is done by adding additional information to the lilo.conf file in your original system (on drive /dev/sda), then running lilo so that the additional information is available to lilo at boot.
When you boot, you should get a menu that allows you to select which operating system you wish to boot.
(For those who don't know what's in this thread: the cloning of a slackware system ran fine with "sudo ddrescue -v /dev/sda /dev/sdb" from a live ubuntu session; the source works and the clone doesn't put as the only hardisk and on the same system; i get a system halt with the clone)
I've succeeded in seeing the running screen at the begining of the boot (as sugested by eco) so here is what's happening seconds before the system halt:
Starting gpm: /usr/sbin/gpm
Starting mysql daemon with data from /ramdisk/sam.auth (and some other files in /ramdisk)
------------------------------------------
---- -----
---- INVALID VDJ INSTALLATION -----
---- -----
------------------------------------------
INIT: Switching to runlevel: 0
INIT: Sending processes the TERM signal
Running shutdown script /etc/rc.d/rc.0:
VDJ is the name of the application that should run on the clone. After this i get some messages about processes killed and actions taken and then the system halts. Maybe i should say that the directory /ramdisk from the second statement above contains nothing.
Is there a way for the system to determine the hardisk on which it is installed ? (because remember that the source hardisk runs as it should on the same machine)
What are my chances to determine where from this shutdown script is called or where from the action of switching to runlevel 0 is taken? (i am somewhat familiar with shell scripting)
I'd personally remove the original disk and only work with the clone (a) to avoid compromising the original disk and (b) because I guess that's what you want in the end.
I'm worried it might boot on one disk but that some fstab or the like will point to the other disk and make a mess of both OSs.
You might go into single user mode. Disable mysql and see if the system come up. If it does, troubleshoot mysql. If it doesn't, get back in touch with us
@eco: - (i have already mentioned that) i ran each hardisk separately;
- how do i get the system to boot in single user mode?
- Can't i disable mysql running from another hardisk than the one that i am troubleshooting (point me to some file to modify)?
I suspect that the VDJ software ( a commercial product ) incorporates code to detect cloning, probably by inspecting your hard disk serial numbers. I also suspect that going any further with this would be in contravention of LQ rules.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.