Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to migrate an external USB HDD which I have been running Ubuntu 10.04 LTS for a while onto a Laptop internal HDD.

Unfortunately the internal HDD is smaller than the external HDD so I cannot transfer the partition using dd. But all the files on the external HDD will fit on the internal HDD so copying all files will work.

After googling and reading this blog post and all its comments, it seems like rsync -H and cp -a are both good candidates, but I never really got a confirming answer which of those that was fastest, most reliable etc. rsync is good for other things as well but for a local filesystem transfer, cp would be the right choice, I mean this is Unix so the basic commands should work.

share|improve this question
up vote 2 down vote accepted

Rsync is meant for regularly synchronizing two copies and efficiently transferring only the changed parts. Since you only need to copy once, cp -a will work just fine, though you should get the same results with rsync.

After copying, you will need to edit /etc/fstab on the internal disk and update the UUID of the disk. You can look up your disks' UUIDs with:

sudo blkid

Then you will need to install grub on the internal disk. Assuming that the internal disk is sda and you have it mounted in /mnt, do:

sudo grub-install --root-directory=/mnt/ /dev/sda

That will make the new disk bootable.

share|improve this answer
Thanks, I read your answer too-late, I took the tedious route and did mount dev/sys/proc & chroot /mnt prior running grub-install. It worked but the --root-directory is more convenient. – Ernelli Apr 14 '11 at 20:53

When doing a selective backup, make sure that you copy /var/cache/apt/archives to your new machine. This way, you do not need to re-download all packages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.