0

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?

NumberFour
  • 419
  • 2
  • 8
  • 18

2 Answers2

2

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

user9517
  • 115,471
  • 20
  • 215
  • 297
0

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.

symcbean
  • 21,009
  • 1
  • 31
  • 52