0

enter image description hereGood day. I have Ubuntu 18.04.3 installed on an 64GB SD card. I want to buy a 128GB SD card. Is it possible to transfer a system from a 64GB card to a new 128GB? Without installation and configuration?

2 Answers2

2

You can clone your 64Gb disk using DD Command - not for the feint hearted!

The DD command (Dataset Definition) comes integrated with the Linux Operating System and permits multiple management tasks on hard drives securely and straightforwardly keeping their integrity.

With DD cloning a partition or a complete unit, deleting all data from a disk, it must be used with caution.

The basic syntax of the command in terminal is:

sudo dd if=source of=destination

IF= Input File –

OF= Output File –

In addition to the previous syntax, add the following lines:

bs=64K conv=noerror,sync

The 64K value indicates the size of the blocks, bs (Block Size). The larger the size of the block the faster the transfer but, the smaller, the more reliable.

To see the units in Ubuntu 18.04, use the command:

sudo fdisk -l

If the objective is to clone the path/dev/sda2 in the destination /dev/sdb, for this execute the following:

dd if=/dev/sda2 of=/dev/sdb bs=64K conv=noerror,sync

Then it will be necessary to wait for the cloning process which depends on the capacity and content of the source disk. Using this method, you have the possibility to clone your hard drives and in this way it always guarantees the integrity and availability of the information hosted there.

A first step would be to open a terminal and type man dd as this will give you the instructions on the use of the dd command.

Incidentally, in a standard(ish) 18.04 installation I am only using just over 25 GiB of a 128 GiB SSD and other files/data not associated with the maintenance of the OS are stored elsewhere (such as Dropbox and a NAS).

graham
  • 10,436
0

Let's say the 64GB SD card corresponds to block /dev/mmcblk, and the 128 GB one corresponds to block /dev/sdb. You can clone the first into the second by doing:

sudo dd if=/dev/mmcblk of=/dev/sdb status=progress

You can find your actual block names by doing: sudo fdisk -l

Once your Ubuntu system is cloned into the bigger card, it will continue to be a total size of 64GB. But you want to use the full 128 GB. To do this you can use gparted (be sure to unmount /dev/sdb first) and then resize one of the partitions in the sdcard. Presumably the partition to be resized would be root or home.

  • so I did. Everything ok the system works. I only have 60GB free on a separate partition. how this free space connect to partition / home without losing data. ? gparted tried but can't connect partitions? – tomasz-groch Aug 24 '19 at 16:07
  • I close the topic everything is ok. It helped to check and repair the system with the gparted live program. – tomasz-groch Aug 25 '19 at 05:39