6

I've seen a few postings about migration with older Ubuntu versions.

What's the fastest way to migrate 120GB (80GB full) to a 1TB SSD under Ubuntu 18.04?

  • live duplicate or via image possible
  • how to extend the new volume on the new SSD?

Because I've only a limited time window once I've started I'd be happy for suggestions for the fastest way to get new system up and running again.

ssssstut
  • 667
  • Is having both disks in the system an option? – Thorbjørn Ravn Andersen Dec 30 '18 at 13:03
  • no, I don't want to use both disks afterwards. (limited=because of other jobs that should run at a certain time) Murphy: yes, I'm willing to prepare everything as good as possible – ssssstut Dec 30 '18 at 13:12
  • 1
    I boot install media from one SSD using grub's loopmount and toram parameter and install to another SSD in about 10 minutes. Then I restore /home & data partitions. Fully working system in about an hour. I always suggest new installs rather than image copy, but since going from smaller to larger you can do a image copy. DD is known as disk destroyer so should be last choice, it also is slow as it also copies bit by bit and includes all the blank space. – oldfred Dec 30 '18 at 14:57
  • DD is known as disk destroyer so should be last choice, - Oh, I didn't know that, thanks a lot for mentioning it! I'll probably try clonezilla or acronis

    – ssssstut Dec 30 '18 at 21:59

2 Answers2

3

What about using a Live System and

sudo dd if=/dev/sdx0 of=/dev/sdy0

and

sudo resize2fs /dev/sdy0

afterwards to resize the partition.

With sdx0 being your old partition and sdy0 being the new one.

user535733
  • 62,253
  • dd: how long would it take to duplicate around 100 GB approx.? resize2fs: does it expand the file system to the max avail. capacity? – ssssstut Dec 30 '18 at 13:13
  • "man resize2fs" will tell you that if no size is specified, the full partition size is used, which is probably what you are looking for. dd indeed might be slower than solutions in the other answer. – vanadium Dec 30 '18 at 15:21
  • Will this work with a windows system? – Tomáš Zato Aug 25 '20 at 13:12
0

For a fast migration you have more than a couple of choice (and for fast not use dd, it copy bit per bit)

common used tools:

You can also decide to create a tar of your OS and restore it (more manual work to do but still fast then dd)

Personally I suggest you to use clonezilla, have a large community and a good Knowledge on the common issues can be encountered and of course because is opensource!

AtomiX84
  • 1,231
  • "bit per bit"? dd ... bs=1M will do the copy using 1 MB blocks. – Hannu Dec 30 '18 at 12:49
  • yes, but as per the first answer and if you do not pass any flags to dd the default is that, off course with the base count flag will faster then normal, but you have also to think the dd command do not skip free space, so the image size of 500GB disk will be 500GB, does not metter if the disk is in use at 30%. For this I suggest different solution, partclone is more evoluted then dd for this pourpose. – AtomiX84 Dec 30 '18 at 12:54
  • In a low usage situation any other tool than a block by block copy is preferred, yes. Then you also have other issues -> https://superuser.com/a/1388090/346288 – Hannu Dec 30 '18 at 12:56