[LINUX] Clone using the dd command
I want to clone to a new HDD / SSD
- Shrink the partition so that it fits in the new one with [Method in CUI required] such as gnome's disk manager.
- Clone using
dd
# dd if=<inputDisk> of=<outputDisk> bs=1G conv=noerror,sync count=<n_size> status=progress
There are two capacities here: $ input <output $ and $ input> = output $
- When input is larger
- No need to shrink partition
- No need to specify
count
- When input is smaller (for example, input = 500GB, output = 200GB)
- Of 500GB, move the partition smaller than 200GB
- About 180GB? (90%) [citation needed]
- Set count = 180 (so that $ bs \ times count == 180 $)
- After dd, expand the partition with Disk Manager to use up the disk
reference
[Disk Clone --ArchWiki](https://wiki.archlinux.jp/index.php/%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%81] % AE% E3% 82% AF% E3% 83% AD% E3% 83% BC% E3% 83% B3)