2

Would someone know how to do this? I have cloned equal sized harddrives before with dd but I don't know how to clone a bigger one to a smaller one. The 120GB ssd has less than 50Gb worth of data fyi. How can I do this in Ubuntu?

answerSeeker
  • 901
  • 2
  • 10
  • 25

1 Answers1

2

Use resize2fs (see man resize2fs) to shrink your existing partition from 120GB to 80GB (since you have only 50GB of data). Then, use your standard 80GB to 80GB clone process.

waltinator
  • 36,399
  • @answerSeeker, This works well when there is an MSDOS partition table. But if there is a GUID partition table, GPT, there is a backup of the partition table at the tail end of the drive, and it can be restored afterwards with gdisks. The script gpt-fix according to the following link might do it 'semi-automatically', https://help.ubuntu.com/community/Installation/UEFI-and-BIOS/stable-alternative#gpt-fix – sudodus Jun 24 '17 at 05:10