PDA

View Full Version : HD installed knop cannot be Ghosted?



metavoid
02-19-2004, 01:14 PM
I have a running knoppix on a hd where I got kylix3 to run. Now I want to
clone it to avoid all that fiddling again.

BUT using both Ghost 2002, and Ghost2003 the cloned harddisk will not
boot.

It simply writes 9 0 0 0 0 0 0 0 0 (tons) and nothing else happens.
I tried to "reinstall" lilo, but to no avail.

One time it did start to detect hardware etc, but then it reported BadCRC.
I then ran e2fsck and it said it fixed it, but when I later booted on it,
the same 9 0 0 0 0 0 0 0 0 happened.

Now I going to try partimage, but sadly it appears only to clone partitions so not as easy a ghost would have been.

My questions is: * It is possible to clone it ? *

The hds are same brand, size etc so resizing is going on.

I suspect that Ghost2003 doesnt handle ext3 correctly as all the
journal nodes were damaged.

Maybe If install knoppix to hd using ext2, it will clone correctly?

The funny thing is that on Ghost site, it says it can clone ext3.

Any of you tried to clone it from one hd to another?

Thanks.

ps. Knoppix really rocks. I came from a red hat 7.2 and knoppix made me understand why people love linux.

johnb
02-19-2004, 02:08 PM
Hi, if you do a search, there is an article where a guy tries to use norton ghost on linux. He goes thru the whole tech support thing and could not get it to work. There is an article also on the IBM website on Knoppix tips and tricks. I belive they used the command dd to clone hard drives. Sorry this is not more detailed just woke up and not firing on all cylinders yet.
good luck
johnb

metavoid
02-19-2004, 02:32 PM
Thanks john. Ill try to find out more about the DD command.
I did search, but I must have missed the Ghost posting you refer to.
Well its nice to know that there are issues as I felt rather stupid. :shock:

Good morning to you then:)

metavoid
02-19-2004, 03:08 PM
Hmm. I searched for "ghost" here on knoppix.net but didn't find any post regarding failed attempt to clone using Norton Ghost?

Did you mean search the big .net? :)

I man'ed the dd command, but I would like to read how they did it because my first attemp was to simply copy all files from on disk to the other and run lilo.

I called Tech support and they said it should not be a problem.
That Ghost supports ext3 and linux and bla. bla.
Not really helpful anyway.

Stephen
02-19-2004, 09:49 PM
Have you looked into partimage it is already included and there is mondo, kbackup and multicd that you can install as well.

metavoid
02-20-2004, 10:16 AM
Well, I spend some time searching for a quick fix for using Norton Ghost as I am so used to clone
any windows installation using any numer of partiontions to any combination of hds so I think it was hard for me to accept that it simply sux for Linux. :)

I tried partimage last night, but the clone would not boot.
Maybe I didnt mark the partitiont as boot or something.

I will try to download Mondo, as it might be able to just clone the hd so I can avoid
fiddling around so much in a Shell.
I just hope its easy to install as all the rpm to deb stuff is rather Ehh? when used to setup.exe and dobbeltclick :)

Thanks for mentioning kbackup and multicd. I'll check them out too.

johnb
02-20-2004, 07:45 PM
hmm
here is the url for the ibm knoppix article.

http://www-106.ibm.com/developerworks/linux/library/l-knopx.html

this is a cut and paste fro the article:
you'll need two hard drives the same size, or a destination drive larger than the source drive. Make sure no partitions are mounted on either drive. In this example /dev/hda is the source drive, /dev/hdb is the destination drive. The dd command makes an exact, byte-for-byte copy, including the MBR (master boot record):

# dd if=/dev/hda of=/dev/hdb

I havent tried the above if it works let me know.
the other article about ghost/linux was a review on some tech site like zdnet. It may not be still available..
johnb

oscar
02-20-2004, 10:04 PM
BUT using both Ghost 2002, and Ghost2003 the cloned harddisk will not
boot.

It simply writes 9 0 0 0 0 0 0 0 0 (tons) and nothing else happens.
I tried to "reinstall" lilo, but to no avail.


The solution is running lilo to record de MBR again. You need a working linux to run lilo including the not booting disk or partition.
I have one disk with two linux partitons. When I restore a partition from a ghost image it will not boot.
I boot the second linux partition or knoppix live-cd or minidistro floppy linux to be able run lilo. Then I can boot the new restored partition.

metavoid
02-23-2004, 10:32 AM
oscar: Ok so you have seen the same error and was able to fix it?
I did boot on the knoppix cd and tried to recreate the mbr using lilo, but Im not that good yet with these tools so chances are that I didn't do it correctly. Thanks for your input:

JohnB: Thanks for the link, Ill try that tonight. And post my
success/failure here. Both the disk are the same. Excactly. So
a bytetobyte copy should work.

gowator
02-23-2004, 02:17 PM
I don't really understand why your trying to use ghost or even partimage etc. to do this.

If I understand you want to clone a disk.
partimage is very good for backing up a partition ,it compresses them but this is what dd is FOR. Forget the fact its Knoppix or even linux, dd is the basic raw tool that copies the image.

The type of image is immaterial, it can be a tape, disk whatever.
Using anything but dd is over complicated and .. well pointless.
You can dig a hole with a shovel if you persist but a spade is much easier.



hmm
here is the url for the ibm knoppix article.

http://www-106.ibm.com/developerworks/linux/library/l-knopx.html

this is a cut and paste fro the article:
you'll need two hard drives the same size, or a destination drive larger than the source drive. Make sure no partitions are mounted on either drive. In this example /dev/hda is the source drive, /dev/hdb is the destination drive. The dd command makes an exact, byte-for-byte copy, including the MBR (master boot record):

# dd if=/dev/hda of=/dev/hdb

I havent tried the above if it works let me know.
the other article about ghost/linux was a review on some tech site like zdnet. It may not be still available..
johnb

metavoid
02-23-2004, 02:45 PM
Well, I tried Ghost because normally this is a no fuss operation and make
booting copies of windows systems so I had hoped it would work for Linux too. It takes 3 clicks so clone my winxp to another disk so I find it easy to use compared to commandline tools.

But as far as I understand, dd should be easy:
like

dd disk1 disk2

So I cross my fingers that no funky stuff will happens as lilo and the
like is not my cup of tea.

gowator
02-23-2004, 02:54 PM
Yeah it should work fine.
dd doesn't need to know anything about the filesystem, it could be NTFS for all it cares!!

Just as a general hint though you'll find Linux a lot easier when you use native tools on it rsather than windows ones.

there are a whole load of 'utility' applications in the windows world that simply don't need to exist in linux becuase its native. Quite often ex-windows users get bogged down in trying to do something the familair way rather than the native way.

metavoid
02-23-2004, 03:13 PM
Indeed. In windows I rarly use the Shell, but on Linux its my
best friend.

The only reason I tried ghost was because the docs stated in could
clone ext3 systems, but apprently only in their dreams. :)

I have been using computers for more than 20 years, so I didn't
expect using Linux would be the same as WinXp, but I really like knoppix as its not as nerdish as it used to be. I only had to read a little bit of docs
to connect to the server and get printers to work.

All in all a very impressive piece of software to get for free. I even gave my mom a knoppix and she still thinks its an XP :)

The only trap I seem to jump all the time is forgetting to umount
my cdrom drive and get that ehh? feeling when nothing happens when I
press eject..

metavoid
02-23-2004, 03:56 PM
gowator::

Since you have used dd, can you tell me how long time cloning
20gb disk will take ?

There is no progress indication at all so I wonder.

I booted on my knop cd after learning that you don't umount your boot drive :) and just said

sudo dd if=/dev/hda of=/dev/hdb

None of the hds seemed to be mounted so I cross my finders.
I can hear the hds working so something is going on, I just hope
I didn't tell it to copy it byte by byte as that would properly take a very
long time.

gowator
02-23-2004, 05:57 PM
It will take a while, perhaps even a couple of hours depending on the blocksize and stuff.

Its normal for them not to be mounted, when you mount you actually mount a filesystem, but what youre doing is a level belwo the filesystem, its just a bit by bit copy.

metavoid
02-24-2004, 09:18 AM
It worked!!! I have booted it right now :)
Thanks JohnB and gowater and others for being so helpful.

With 1m as bloksize, it took 2.8h to copy 20 gb.

I booted on the knoppix cd as I had no idea how I could
avoid having the primary drive mounted otherwise.

Would it have worked if the source drive was mounted while dd'ing it?

Thanks.
Best Regards from Denmark.

gowator
02-24-2004, 10:59 AM
Theoretcially YES!
But personally I think you did it the safest way! (I would have probably done the same)
It might have been faster not from the boot Cd since more memory means it writes more at once but the important thing was it worked !

p.s. it was John B who posted it, not me!

however, Ill try and find some good links for you on native linux tools.
The O'Reilly powertools book (linux or UNIX) is great for some stuff like this! Her's a sample from my bookmarks becuaase I never remember the exact syntax :D
http://www.linuxdevcenter.com/pub/a/linux/lpt/18_16.html


Hmm, I guess I wasn't so far off with the 2 hours then.
It might not be fast but its reliable!

windos_no_thanks
02-24-2004, 11:12 AM
Theoretcially YES!
But personally I think you did it the safest way! (I would have probably done the same)

dd:ing a mounted filesystem will result in the copy also being in the mounted state, which means it might be inconsistent and it will be "dirty" the next time it is mounted. Usually things can still be fixed automatically but there are no guarantees. This is less of a problem with logging filesystems like ext3 or reiserfs, whenever you are dd:ing an ext2 filesystem it is important that it is not mounted.

metavoid
02-24-2004, 11:24 AM
Well, the system has 1gb so the boot from cd should not steal that much.

There appeared to be a huge gain setting the bloksize to 1m compared
to the default. I tried to run for 10 mins with both settings
and the 1M blocksize had almost copied twice the amount of the default
setting. Setting to higher blocksize didn't give much more for unknown reasons.

Thanks for the great link! (bookmarked)

>p.s. it was John B who posted it, not me!
I know. I said thanks to him too. You have both been very
helpfull.

Yes, your guess of 2h was very good. :)

Actually, I would not call it
slow as it copies ALL of the 20gb disk in less than 3 hours.
Last time I copied the same(!) disk using xxcopy from a dos
boot it spend +3 hours and that was only the files not byte to byte copy.

Now I just so happy as I have a cloned system already setup for the
network, printers, kylix, compglibc, and tons of other setup stuff.

Thanks!!

gowator
02-24-2004, 12:17 PM
windos_no_thanks: I knew somewhere I'd just forgotten WHY.

I think its Ok so long as you mount it RO.

metavoid, that a good point. The FREESPACE is copied but by bit too.

You might want to look at the 'magic tar' too.
This has the advantage of only looking at used space and you can use the compress options too. It also gets round the live filesystem problem windos_.. brought up but it won't copy the MBR....
However you can copy the MBR explicitly after or even just remake it with lilo using a bootable Cd.

cpio is another option for this sort of thing!

johnb
02-24-2004, 05:26 PM
Great! I will try it this weekend.
johnb

metavoid
02-25-2004, 10:16 AM
Johnb:

I had no issues with the clone disk at all, but if you plan on using the clone in another system, please make sure that the monitor on both
systems support same refresh and resolution. :wink:

At home, it booted into black screen as my 21" monitor on work is far better than my home one so I had to diddle around with a knop cd to fix it.
Would have been easier to lower the res and then dd it.

I know, you know this, but just in case.

Also, make sure to set the block size as this speed up thing alot.

gowator
02-26-2004, 01:47 PM
i think I just came up with an analogy to help clarify the difference between dd and tar or copying.

Its like a CD. You can write a file called knopppix.iso to a CD and it won't be bootable, you just have a file on the CD called knoppix.iso

If you want to make it bootable you have to copy the image bit by bit of knoppix.iso to a CD.

The first one is like a copy. The seciond like a dd.

(hope that makes it clearner to someone!)