LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2007, 10:02 PM   #1
mrjohor
LQ Newbie
 
Registered: Aug 2007
Posts: 5

Rep: Reputation: 0
Question How to clone old HDD to NEW HDD?


Hi all senior,

I'm a beginner only, just start learning Fedora installation and know some configure in graphic mode only, I'm don't know in command mode(start learning).

So, I'm a newbie in Linux. I had meet a problem now, that's I'd like to clone a (SUSE)20GB HDD to 80GB new HDD, but after I used Norton Ghost to clone all the disk to new HDD, when I start the cloned hdd, it's shows the GRUB text and stops at that point.

I had try search the similar threads of this problem, but so ashamed, I still can't solve it.

So, can anybody here teach me how to solve it? If can, I hope is in a simple step.

Thanks for reading my 1st thread in this forum.
 
Old 11-07-2007, 02:10 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
Sorry to here about your issue.

Unfortunatly Norton Ghost does not support cloning GRUB partitions (and back when I tried ghosting a redhat machine it made a complete hash of lilo partitions as well)

If you still have the original 20GB hard disk the following link may help you to recreate the GRUB partition on the new disk:

http://www.uruk.org/orig-grub/install.html

Hope this helps.

EDIT:-

The following may also be useful:

http://www.gnu.org/software/grub/man...ub_002dinstall

Last edited by Disillusionist; 11-07-2007 at 02:23 AM.
 
Old 11-07-2007, 02:39 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Otherwise you can probably use DD. There's a really good thread on LQ if you search for dd
 
Old 11-07-2007, 03:01 AM   #4
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
I was going to suggest DD however wouldn't you need to boot of a live CD and ensure that both hard disks are not mounted?

If you do go the DD route, please be very careful to make sure the input file and the output file are the right way around.

If the old hard disk is /dev/hda and the new hard disk is /dev/hdb then:
Code:
dd if=/dev/hda of=/dev/hdb bs=512 count=1
Otherwise DD may live up to it's nickname "Data Destroyer"

Quote:
OK, when it's done I've cloned the c: drive successfully! But the new hard drive still isn't bootable - it has no master boot record (MBR). The MBR is a groovy little program kept at the very beginning of the partition table � the BIOS loads it during the boot process, and it tells the computer which partition to boot from. It's 512 bytes long. As it happens, simply copying the first 512 bytes from hda onto the beginning of hdc will make hdc bootable. It's weird that that works. I suspect it would mess up if you did much differently, e.g. if you copied hda1 to any partition on hdc other than hdc1. But anyways, here's how you copy those 512 bytes: "dd if=/dev/hda of=/dev/hdc bs=512 count=1". Note that if you screw anything up at all with this command, you're in hot water - for instance, if you switch the values of the "if" and "of" parameters you'll end out with neither disk bootable. Be careful!
http://www.mckeay.net/secure/2004/10...lone_a_hd.html
 
Old 11-07-2007, 03:09 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The tail of my signature has "Just cloning tips"

Never send a boy to do a man's job.

Last edited by saikee; 11-07-2007 at 03:11 AM.
 
Old 11-07-2007, 09:36 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Quote:
Originally Posted by mrjohor View Post
<snip>

I had try search the similar threads of this problem, but so ashamed, I still can't solve it.

So, can anybody here teach me how to solve it? If can, I hope is in a simple step.

Thanks for reading my 1st thread in this forum.
Hi,

Welcome to LQ!

As someone else suggested, use 'dd'. The LQ post; 'Learn The DD Command Revised' by AwesomeMachine is great.

Last edited by onebuck; 11-07-2007 at 01:34 PM.
 
Old 11-07-2007, 10:38 AM   #7
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
I've done this so many ties, I can do it blindfolded....

NOTE: The following could, potentially, make things worse. It makes the assumption that you have fedora on the first hard drive detected, and that you have a seperate /boot partition that is the first partition on the same first hard drive. If you are confused at this point ... do NOT follow the rest of these instructions.

Boot the fedora cd with the following:
boot: linux rescue

Let is scan and mount your filesystems when prompted.

From the command line (the /mnt/sysimage part varies, it will tell you what to type):
HOME=/root chroot /mnt/sysimage /bin/bash --login -i

Now type grub

Wait a second and you will, finally, be at a grub prompt:

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Now get out and reboot:
exit
exit
umount -a
reboot

Last edited by dgar; 11-07-2007 at 10:41 AM.
 
Old 11-09-2007, 01:50 AM   #8
mrjohor
LQ Newbie
 
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Dear all senior,
Thanks for all of your help, I'm used the DD to clone the old HDD to New HDD successfully.

But now, I'm meet another problem again, That's when I boot up with the New HDD, it's appear no active partition found, check with pqmagic also can't view any partition. BUT when I used Parted Magic to view it, I CAN view all of the partition. WHY? Anybody can teach me how to solve it?

Thanks for viewing..
 
Old 11-09-2007, 02:46 AM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
You have failed in the use of dd or your original disk has the same fault.

dd copies bytes and knows nothing about filing system or active partition.

What dd must do is to produce a mirror image of the original. It cannot do anything other than giving you exactly what you got in the original disk.

Linux never need an active partition to boot from. Linux never uses the damn thing which is only required by the MS systems as they go to pieces without it. It is just the first byte of the partition table that every user can switch it on or off.

To make any partition active you boot up a Linux Live CD that has Grub inside, like Ubuntu, knoppix, Debian, Mandriva or Suse (except Slackware/Slax) families. Activate a Grub shell. If it is the first partition of the first bootable disk, known to Grub as (hd0,0), that need to be made active the commands are
Code:
sudo su
grub
root (hd0,0)
makeactive
quit

Last edited by saikee; 11-09-2007 at 02:47 AM.
 
Old 11-09-2007, 09:24 PM   #10
mrjohor
LQ Newbie
 
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
I'm try plug in the old HDD, the Linux program can run properly. Only the NEW HDD can't run. Is it I need to do dd again?



I have a sharing file problem, that's can't access the sharing folder of the SUSE PC. Actually I still can access it by last 2 days, but don't know why, I can't access it now. The SUSE pc not do anything, just like a data pc, and now, when want access the folder via network, it's appear "the folder is not accessible, you might not have permission to use the network resource. Please contact the admin...". Firstly I suspense is network card problem, but I still can access it via WEBMIN. So, I don't know what's problem again, anybody know to solve it?

Thanks for reading..
 
Old 11-10-2007, 02:20 AM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I suggest you deal with one problem at a time otherwise one problem combining with another can make finding a solution very difficult.

Before your last post your were complaining no active partition. Have you solved that problem?

If the target disk doesn't boot what steps did you used to clone it?
 
Old 11-11-2007, 08:13 PM   #12
mrjohor
LQ Newbie
 
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for Saikee advice..
I had solve the folder sharing problem already..
But the clone HDD haven't solve yet. I'm try download other software to try it.

Saikee, I need ur advice for the step I do, is it got any problem.
Here the step I do:-
~Boot from Parted Magic disk
~Run Command line
~fdisk -l
(hda is 20GB HDD, hdb is 80GB HDD)
~type "dd if=/dev/hda of=/dev/hdb bs=32256" or bs=32768.
~then it display "16xxxxx+1 in, 16xxxxx+1 out"
~then I type fdisk -l again
~I can see both HDD is same now.
exit the program, and restart pc with cloned HDD, but it appear don't have the boot......
but the original hdd can work properly...
 
Old 11-11-2007, 08:34 PM   #13
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
Unplug the old hard drive. Then try what I suggested up above.

Can you post the output of fdisk -l here?
 
Old 11-11-2007, 09:34 PM   #14
mrjohor
LQ Newbie
 
Registered: Aug 2007
Posts: 5

Original Poster
Rep: Reputation: 0
[QUOTE=dgar;2955736]Unplug the old hard drive. Then try what I suggested up above.



Is it can use under SUSE?
 
Old 11-11-2007, 09:56 PM   #15
cojo
Member
 
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
make sure your clone drive is set as master or cable select. Bios is set to boot with your clone drive.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redhat hdd clone suro Linux - Software 1 06-13-2007 03:29 AM
Clone HDD to increase Storage DjRakso Linux - Hardware 3 03-12-2007 12:25 PM
how to do a dual boot (Windows on portable HDD) linux on computer HDD izquierdista Linux - General 5 01-28-2006 09:50 AM
Gentoo test on virtual pc - can I clone HDD? solomage Linux - Distributions 1 01-15-2006 07:10 AM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:04 PM.

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