1. Install OpenSSH to enable SSH host.

       sudo apt install openssh-server

  2. Allow SSH through firewall.

       sudo ufw allow ssh

  3. Install and run gparted. (Or, in Ubuntu, just use disk utility. Xubuntu and Kubuntu don’t have it.)

       sudo apt install gparted
       sudo gparted

Start it and note the size and name of the disk in the top right corner. It should be something like «/dev/sdS (128.00 GiB)». The items in the list are partitions, we don’t want them.

So note the size - 128, and name — /dev/sdS.


  1. Install VMWare workstation.

  2. Download the Ubuntu image. Not the server one, the usual one, it has Live CD boot by default.

  3. Create new Linux VM. Make disk size the same as in the computer. Use it in the VM.

  4. Boot into live CD. When asked «try» or «install», select «try». You’ll get the user interface.

  5. Go to Settings / Disks. Note the name of the disk, it should be something like /dev/sdT.

  6. Open terminal. Run the following:

       sudo su
       ssh user@hostmachine "sudo -S dd if=/dev/sdS bs=4M" | dd of=/dev/sdT status=progress

Enter password twice and wait till completion.