SCHAPPY — 2. July 2006, 23:33

Migrating harddisks

Some days ago, I’ve buyed a new harddisk for my notebook. My idea: place the old harddisk into an external 2,5″ chassis to use it as an external USB-2.0-HDD and install the new one to the notebook. But, how to get the whole content of the old harddisk to the new one without buying expensive third-party software products?

  • Download a live CD of any linux you like, burn it. Beware of Knoppix 4.02 (or so), because it has some typos in it, which restrict the output speed for USB devices below USB 1.1 speed 🙁 – Use the newest live CD/DVD!
  • Install the new harddisk in the destination system and install the old harddisk into the external USB-chassis
  • Boot from your created CD or DVD, attach the external USB-device to your system
  • Assuming that your internal harddisk is attached to the primary IDE-channel, and the external USB-HDD is the only attached device type this: dd if=/dev/sda of=/dev/hda bs=40M and hit enter. This uses your USB-attached HDD as input file (if) and your installed harddisk in your system as output file (of). bs sets the number of bytes to copy per cycle. Changing this value from its initial value increases the copying speed. Set it not above your hdd writing speed.
  • This operation will take some time and does not output any status information. To check progress, change to another console, find the PID of the dd process, e.g. by typing ps aux | grep “dd”.
  • Then send a USR1-signal to the process by typing kill -USR1 PID.
  • Switch back to your dd-console and within the next copying cycle the process writes status information on stdout including copied bytes and throughput rate.

The described method uses low level block copying approach, thus the whole system including partitioning information are copied. After finishing the process, reboot your system and everything should work. Because the size of the new disk is larger than the old one, you should assign an additional partition to your system using the unpartioned space.

No Comments »

RSS feed for comments on this post.

Bisher noch keine Kommentare.

Kommentare verfassen

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>