Is using the SysRQ Emergency Remount an acceptable way to clone hard disk?
0
votes
2
answers
314
views
I'm using Linux (Ubuntu) and I was told that I can use the method described below to clone the system's hard drive to another one - to plug into a new machine. (Without booting from a Live CD)
It assumes that the system's disk is
/dev/sda
, the partition mounted as root is /dev/sda1
, and an empty disk to clone it to is /dev/sdb
.
u > /proc/sysrq-trigger
Remounts all filesystems including the one mounted as root read-only.
-fy /dev/sda1
Corrects the filesystem errors caused by forcing the R/O remount.
if=/dev/sda of=/dev/sdb
clones the disk to the empty one.
-fy /dev/sdb1
fixes the newly cloned filesystem. At this step it usually tells about fixed block checksums.
-f
Reboots the system. At this step I disconnect the newly cloned disk, and plug it into a new PC.
I've used this method two times, and all machines are working fine, but I'm afraid that doing that could cause some dangerous filesystem issues? If yes, why? And should I avoid using this method to clone hard disks in the future?
Asked by melonfsck - she her
(150 rep)
Oct 25, 2023, 09:38 PM
Last activity: Oct 27, 2023, 01:29 PM
Last activity: Oct 27, 2023, 01:29 PM