Welcome to the JustLinux.
Glad you found the thread useful. I derive as much enjoyment writing it as you applying it.
To me the whole thing is so simple and the knowledge we gain will last for a life time. I believe that is what Linux is all about. Everybody can put 2 and 2 together to make 4.
Further to my post about my success in cloning my drive, I decided to try to use the leftover space on the drive to expand my data partition. My original drive was split into a NTFS section ( with XP, boot section) and a storage area formatted in FAT32. I downloaded PartedMagic and used the GParted option to "grow" my FAT32 section (after deleting the 3rd section I had previously formatted). This worked well as far as I can tell, although I was left with a bunch of FSCK****.REC files on the expanded area. I did a google search about them and it seems they are supposed to be leftovers of corrupted data or something, but I could not find any missing files that may have been messed up. They may have been some leftover stuff from a Puppy Linux install, but I am not sure. Other than that, it seemed to work great. I now have a 346GB storage area... plenty big for me.. ( what exactly do people download so much of that they need all this space?? I have no idea what I would need so much space for. I only have it cause you need a larger drive to clone to, and 500gb was the next smallest my local shop had in Hitachi (I like them cause they are quiet) . Thanks again for the instructions.
Great tutorial, really easy to follow apart from one thing. I tried it on a Dell PC with a 40Gb IDE hard drive partitioned hda1, hda2 & hda3, Del Utilities, NTFS and something else respectively. This needs to be cloned onto a 750Gb SATA drive attached to a SATA card inside the PC
Went for the second option, the dd if=/dev/hda of=/dev/sda bs-32256
And all seemed to be going well until I got the following message
dd if=/dev/hda of=/dev/sda bs=32256
dd: reading '/del/hda': Input/output error
1241951+1 records in
1241951+1 records out
40060399616 bytes transferred in 1405.185953 seconds (28508967 bytes/sec)
The original drive size was 40060403200, there doesnt appear to be much missing based on the difference in drive sizes and I have tried booting to the new drive yet, but I wasn't expecting any errors.
Should I be concerned or is there something I should change before doing over?
The 1241951 records of each 32256 bytes amounts to
If your hard disk has 40060403200 byte but only 40060399616 were copied then the difference of 3584 bytes may have been corrupted. The +1 mean a fraction (i.e. not a complete record) of the 32256 was copied.
The disk should boot alright. If it doesn't you can clone it again.
This Clone function is terrific! I just tried it and replace an endangered old HDD and transfer all the partition to the new HDD!
But I got some problem and need some help. The suspend function is not working anymore after the transfer, however, the hibernate works. Any thought?
Welcome to Justlinux!
You can always re-do the cloning again say using anther disk. If the original disk has some corruptions then you may be stuck with it because the cloned copy will have bits missing as they cannot be read.
How I DID IT
i a ! Sorry about the capital letters, its fault on !y xp and the loss of the letter that should follow n , but such is life under a syste! Created by a creep who's desire see!s to be, to own the world and suffer no loss of his own soul, hence the crippled keyboard. I have downloaded several distro's, so!e are bootable others are not. All i want to know is what i need to do to !ake the! All bootable. I have no proble! With linux on the keyboard, but under !$s progs ie ''xp ho!e'' its a night!are. So you !ay gather the sooner i get out of gates clutches the better. I have read your superb posts about booting !ultiple syste!s but what coding do i need to eradicate the !$ disease that has taken over !y co!putor, its a very, very, buggy version of xp, that should have been shot at birth. I have a few proble!s with a wifi and sa!sung printer drivers that need sorting. I can live with the! At present, but i refuse to buy another version of windows that is yet again defective on arrival, as were 3:0 onwards upto xp. !y son has vista for his work, a big disaster he reckons, but against a !afia type organisation like gates has how do you get your !oney back?. I used to love the old dos syste!, any faults, try retyping it. But this load of rubbish he stole of job's does not and has never, ever, worked when first released, for a highly inflated price. Those guys who code the linux distro's are so dedicated they all deserve to be knighted for their efforts, sadly they will have to be !erely held in awe by the rest of us !ere dos prodders. Sorry the post is so long, kind regards,bob.
Generally, I notice if I install MSXP and Suse, and install Ubuntu last- then Ubuntu will set it up so I can boot to all three.
Copy all partitions?
I'm trying this on my Dell Dimension E510. The 160GB SATA drive has 3 partitions: the 2nd one being the Windows XP Home; the other two are for utility and recovery. When I type "fdisk -l" I see /dev/sda1, /dev/sda2, and /dev/sda3.
Originally Posted by saikee
I installed an internal 1TB SATA drive. It is /dev/sdb. So my dd command should be:
dd if=/dev/sda of=/dev/sdb bs=32256
and this will recreate the 3 partitions in the source disk onto the destination disk? Do I first need to create a partition table on the destination disk or manually create the 3 partitions of the same sizes and types?
12-19-2009, 01:37 AM
12-19-2009, 06:50 PM
Welcome to Justlinux!
Cloning the whole hard disk is the easiest and the safest way and it always works and is pretty much bomb proof. This is because the first record in the cloning operation is 32256 bytes. The MBR is the the first 512 bytes so dd effectively clones the partition table across for you.
After the cloning you will have 160Gb occupying the 1TB space so the next step is how to resize the partitions. You cloned disk should have 1000-160= 840Gb empty space. This you need tp plan ahead.
What you need to do immediately after the cloning is to remove the source disk and run the 1TB disk alone. Xp does not like to see two sets of identical system files in one PC and can do something to destroy one of the two copies.
Since you now have a back up so run the 1Tb disk until your are fully satisfied. I would suggest to delete the recovery partition leaving only sda1 and sda2 in the hard disk. The sda1 should be the utility partition and never grows so you can use Parted to resize the sda2 which should be the Xp partition. You don't have to use all the space and it is a good pratice to create your own data-only partition. Anyway you can put back the recovery partition sda3 later on at any time.
My suggestion is to resize sda2 when it has nothing restraining its read end in the hard disk. That is easiest and fastest, otherwise you will need to move sda3 to create a gap for sda2 to grow in size. SUch operation takes ages.
Last edited by saikee; 12-19-2009 at 06:55 PM.
12-22-2009, 01:09 PM
saikee, thanks for the suggestions
Yes, I will run the new drive another week or so to make sure it's OK and mess with the partitions later -- maybe a good post-Christmas project in addition to replacing a bath faucet
12-23-2009, 03:18 AM
You sound as you have done the cloning.
Actually the new clone must work exactly as the original because dd cannot change a single byte or bit in the process. As this is a new experience so I recommend caution. That is all.
The original disk can be kept as long as you want or turn into a regular back up or used as a second disk after its content has been deleted (preferably with a Linux). It does open up countless opportunities for you to try many things with the operating system without fear since you can always go back to a good copy if anything go south with your experiments.
Until you expand the partition you can clone the current 1TB disk back to another 160Gb and it will work perfectly because the partition table footprint of you operating system is only 160Gb.
Remember the same cloning procedure can do any operating system in a PC, in any number and any combination.
10-19-2010, 01:25 AM
I registered to say thanks. I just cloned my win7 installation to a new drive with this method, worked like a charm. Companies like acronis sell boot hdd cloning for $$, something that linux does in a single dd command line..talk about marketing! way to go mods and linux.
10-19-2010, 07:25 AM
Thank for the feedback.
Hope you enjoy many wonders of Linux. I think the most important bit with Linux is that knowledge is genuine that will last for a very long time. Learning things that change for the purpose of getting money out of us really sucks
Welcome to Justlinux.