LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 01-14-2009, 05:09 AM   #1
papadie
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 0
help cloning a slackware reiserfs system


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.
 
Old 01-14-2009, 06:34 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
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?
 
Old 01-14-2009, 06:51 AM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
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
 
Old 01-14-2009, 10:05 AM   #4
DropSig
Member
 
Registered: Apr 2004
Location: Saskatchewan
Distribution: Ubuntu, Centos
Posts: 208

Rep: Reputation: 30
This is not a solution to your problem, but just as information, see this post.
http://www.linuxquestions.org/questi...system-413503/
I used this to create clone of an lfs system i did a while back.
 
Old 01-14-2009, 12:48 PM   #5
papadie
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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?
 
Old 01-14-2009, 01:15 PM   #6
DropSig
Member
 
Registered: Apr 2004
Location: Saskatchewan
Distribution: Ubuntu, Centos
Posts: 208

Rep: Reputation: 30
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.
 
Old 01-14-2009, 01:52 PM   #7
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi papadie,

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>
You'll find loads of examples on the net.

Last edited by eco; 01-14-2009 at 01:53 PM.
 
Old 01-14-2009, 08:11 PM   #8
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
@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.
 
Old 01-15-2009, 04:36 PM   #9
papadie
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
(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)

Thank you.

Last edited by papadie; 01-15-2009 at 04:38 PM.
 
Old 01-15-2009, 04:45 PM   #10
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
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
 
Old 01-15-2009, 05:25 PM   #11
papadie
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
@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)?
 
Old 01-16-2009, 08:47 AM   #12
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
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.
 
Old 01-16-2009, 09:55 AM   #13
papadie
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
understood..i guess this is my last post on this thread..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cloning the Linux System pras123 Linux - Server 6 06-03-2008 11:17 AM
Cloning Linux System from PC->PC ALInux Linux - General 4 07-26-2006 05:09 PM
cloning (somewhat) my lfs system DropSig Linux From Scratch 2 02-11-2006 10:23 PM
disk/system cloning Sharaz Linux - General 2 12-28-2005 03:11 PM
cloning system image gag Linux - Newbie 1 11-24-2003 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration