Answer the question
In order to leave comments, you need to log in
System transfer with dd, how to properly?
Tell me, you need to transfer the system from one machine to another, I want to use the dd utility.
on one machine I boot from live and copy the entire "sda" disk to a mounted disk in a specific directory.
The question is, the command dd if=/dev/sda of=/mnt/backup/sda.img bs=8M conv=sync,noerror
1. why is copying to the "sda.img" file here?, and not just to the directory.
2. If you copy this file back to an empty hard disk of another machine, will the system itself get up as it should?
Answer the question
In order to leave comments, you need to log in
You probably don't need dd but tar. With dd you get a file the size of your hard drive, not just the space used.
1) dd so called copies data byte by byte from the /dev/sda block device to the sda.img file, resulting in a disk image with a partition table that can be mounted, copied, etc.
2) It will work.
UPD forgot about the option with an old machine with Legacy, and a new one with UEFI. Then there will be problems.
dd - literally d-isk d-amp - dd doesn't even care what file system it is. The disk image is copied.
dd is cool to do this
backup dd if=/dev/sda1 | gzip - | dd of=/path_to_backups/fs.img.gz
and then restore like this dd if=fs.img.gz | gunzip - | ddof=/dev/sda1
With all my heart I recommend using clonezilla, it copies only used blocks, on disks where there is a lot of free space, it turns out many times faster. + Strange jokes do not happen if one disk is slightly larger than the other.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question