Server Fault is a question and answer site for system and network administrators. 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 have one 500 GB hard drive with Linux Ubuntu and I wish to move it to a smaller SDD drive (40 gigs) because the system itself (with some data) occupies only a few gigs.

I did some searching and found out about dd but apparently it cannot copy to smaller drive (partition table would have incorrect size).

Is there some way how to achieve this and leave the system in tact?

share|improve this question
up vote 1 down vote accepted

You could use a GParted Live system to resize your Ubuntu partition then use dd to clone it.

share|improve this answer

Just copy the files over.

Using cpio to copy the files will go a lot faster than than 'cp -R -p' but by the time you've worked out all the flags for cpio, you'd have copied the files anyway using cp.

You'll need to change the 40gDisk:/etc/fstab to use the partition on your 40gb disk for '/' and amend the root mount in the grub config (and probably install grub on the disk too). If you're leaving the 500Gb disk in, then you may want to amend the grub settings there too.

Migbht be a good idea to have a bootable cdrom / usb standing by key just in case it goes pear-shaped.

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.