Quote:
Originally Posted by dbc254
I have 2 SSD's in my desktop /dev/sda + /dev/sdb Previous to the installation of the 2nd drive, I would simply;
if=/dev/sda of=/dev/sdb. sdb was my external backup drive
Is there a way to if=/dev/sda + /dev/sdb of=/dev/sdc ?
|
Don't do that.
Very likely you would end up with garbage. Dumping /dev/sda contains all the partition definitions and the data. Appending another set of partition definitions and data only confuses the result.
You can't restore the result - well, you could restore /dev/sda (it would error out when the device is full)
, But estoring /dev/sdc from it would require you to know the starting point.
Now said you wanted was an output put on /dev/sdc - and no it won't work. The partition definitions only come at the beginning of the disk - thus the /dev/sdb portion would still be inaccessible.
You CAN concatenate multiple inputs. The easiest way is
Code:
(dd if=inputdata ; dd if=moreinputdata) >outputdata
This works because without an "of" specification, dd writes to stdout. Thus you can combine the output of two dd commands into one output file.
In your case the result won't be usable.
You can't even do a "dd if=/dev/sda of=/dev/sdc1" for instance either... UNLESS there are no partitions on /dev/sda. Again, the problem is the partition tables.
If /dev/sda has partitions, then the first blocks copied to /dev/sdc1 will be the partition table - not the filesystem home block, thus the partition will not have a valid filesystem.
The only time this would work is if /dev/sda was not partitioned, but was entirely dedicated to a single filesystem. It works then because the first blocks copied would be the home block of the filesystem.