I am pretty new to Linux and have run into some problems.
Goal: I have two machines running Debian 9 Stretch and I want to clone one of the machines onto the other.
First thing I did was connected an external harddrive into the first machine and used the following command to copy everything into it.
sudo dd if=/dev/sda1 of=/dev/sdb1 bs=10M && sync
I am still not sure if that was the right way to copy it or if was were to make the output equal to a .img.
Anyways, I connected the external harddrive into the second machine and executed the following dd command
sudo dd if=/dev/sdb1 of=/dev/sba1 bs=10M conv=noerror,sync
I kept getting errors saying something about I/O but eventually it went through and near the end it said it ran out of memory. It created new partitions and the internal drive got filled up.
I checked the /etc/rc.local file and it seemed to have been corrupted. I had rebooted and there were a bunch of lines popping up with rc.local as it was booting.
I decided to boot into recovery mode and for some reason it booted up like my first machine with the same directory and everything.
Looking back at my dd command, I felt that I should've entered in sda instead of sda1
I executed the dd command again and realized maybe I should change sdb1 to sdb as well.
I stopped the command about 30 seconds in and tried to correct the line.
When I re-executed the line, I got a reply saying segmentation fault.
Any command I entered afterward give me this reply.
A reboot was then perform and brought me to the EFI shell screen which now I am stuck at.
Is there anything I can do to resolve this problem?
conv=noerror,syncit behaves in unexpected ways ( superuser.com/a/1075837/195171 ). regarding the other errors, did you boot off a live medium or did you overwrite the system you booted, thus corrupting the running system? also why clone it at all? two clean installs, no surprises.sda1when the filesystem existing onsda1was mounted (as the root filesystem maybe?) and could change in the process? And did you copy the copy tosda1of another computer, when the filesystem existing on itssda1was mounted (as the root filesystem maybe?) at the time? And maybe thissda1was too small? Or was itsba1? (your question is not coherent in this matter, a typo?). What were the I/O errors? Withconv=noerror,syncthey could mangle the data, the above comment is right.