I would like to clone a whole linux OS from the harddrive to an external USB stick. However, I don't want to clone all the unused part of the harddrive, only the used part.
The partitions on the harddrive look like this (lsblk
)
sda
- sda1 512M /boot/efi
- sda2 1K
- sda5 223,1G /
With df -H
:
/dev/sda5 235G 14G 210G /
/dev/sda1 536M 6,4M 530M /boot/efi
As you can see, only 14G are occupied so there is no reason that this whole OS doesn't fit on my 32GB USB-Stick.
The question now is - how can I do this as user friendly as possible? I tried Clonezilla and gave up after 4h of not being able to read my external USB stick and / or not being able to clone the data to another computer.
sda5
so that the whole space of all the required partitions does NOT exceed the size of the target drive. It's that simple.rsync
with appropriate exclusions so you don’t try to copy /dev, /proc, /sys, etc.