Transfer one Debian installation on another disk
by LuxGiammi from LinuxQuestions.org on (#5ACGG)
Hi everybody,
I currently have a dual-boot Debian 10 and Debian 10 (yes, two Debian 10 installations), but I don't use the latter and I'm thinking about deleting it.
Now, I'd like to change the disk on which the first Debian 10 installation is located (it's a 500GB SSD) on another disk (a 120GB disk). The first Debian 10 installation occupies 103GB on the first disk, so I have some space left (enough, and if it is not, I have 30GB of virtual machines I can throw away).
I was wondering if I could use dd for cloning the root partition (I have not separate partitions for /home or whatever) into a disk image on another disk and then use dd again to bring that disk image on the 120GB disk (I haven't got a SATA to USB cable).
I've heard that dd could be a potentially dangerous command due to some data stored by the disk manufacturers in particular area of the disk which is needed to make the disk function properly and because of formatting of course (if I were to clone the entire 500GB disk directly to the 120GB disk, wouldn't I get a massive wall of errors? And I think doing the opposite is a bad idea either, due to that data.).
Sincerely though, I know pretty much nothing about filesystems and hard drives in general, so I'd like to know if dd is suitable and safe for the job or if there are safer alternatives (I don't want to lose my debian installation or brick the disks).
Thanks in advance.


I currently have a dual-boot Debian 10 and Debian 10 (yes, two Debian 10 installations), but I don't use the latter and I'm thinking about deleting it.
Now, I'd like to change the disk on which the first Debian 10 installation is located (it's a 500GB SSD) on another disk (a 120GB disk). The first Debian 10 installation occupies 103GB on the first disk, so I have some space left (enough, and if it is not, I have 30GB of virtual machines I can throw away).
I was wondering if I could use dd for cloning the root partition (I have not separate partitions for /home or whatever) into a disk image on another disk and then use dd again to bring that disk image on the 120GB disk (I haven't got a SATA to USB cable).
I've heard that dd could be a potentially dangerous command due to some data stored by the disk manufacturers in particular area of the disk which is needed to make the disk function properly and because of formatting of course (if I were to clone the entire 500GB disk directly to the 120GB disk, wouldn't I get a massive wall of errors? And I think doing the opposite is a bad idea either, due to that data.).
Sincerely though, I know pretty much nothing about filesystems and hard drives in general, so I'd like to know if dd is suitable and safe for the job or if there are safer alternatives (I don't want to lose my debian installation or brick the disks).
Thanks in advance.