Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
(Let's assume I'm basically a n00b and hold my hand quite a bit here....)
Due to some hardware problems I need to make an exact copy of a SATA drive to an IDE drive. This 80GB drive is partitioned in a very odd way. It's something like this:
| 10GB raw | 15GB FAT32 | 5GB raw | 5GB ext2 | 45GB raw |
I believe data exists in the raw partitions, and therefore I need it copied as well. Is there a program that will simply copy every single byte on one drive to the same position on another, partition tables and MBR included? Would that even work if the drives were two different brands (but the same size or at least very close)?
If such a program doesn't exist, I can try to duplicate the partition structure on the second drive, but is there any way I can copy the data from the raw partitions over?
Due to some hardware problems I need to make an exact copy of a SATA drive to an IDE drive. This 80GB drive is partitioned in a very odd way. It's something like this:
| 10GB raw | 15GB FAT32 | 5GB raw | 5GB ext2 | 45GB raw |
I believe data exists in the raw partitions, and therefore I need it copied as well.
I think that you should set up the IDE drive by creating partitions using a partitioning utility like fdisk. Then use mkfs to create a FAT32 file system in one of the new partitions and use the cp command with -pur options to copy the FAT32 file system from the SATA drive to the IDE drive. Similarly use mkfs to create an ext2 file system in one of the IDEw partitions and use cp -pur to copy the ext2 partition from the SATA drive to the IDE drive.
I find your statement that data exists in the raw partitions puzzling. How do you access this data? You can use the dd command to copy the contents of a raw? partition to a new partition on the new drive but copying with dd will possible introduce new logic errors into the new partition file structure so that recovering data on the new partition will be even more difficult than recovering data from the old partition.
As to the MBR, once you have the valid file systems copied to the IDE drive then boot a rescue CD. Use the rescue CD to boot into some working OS on the IDE and then install a working boot loader onto the IDE MBR. If you don't have a working OS on the IDE then installing a working OS on the IDE drive comes before fixing the MBR on the new drive.
Well, there is command-line utility called dd. To use it, you need to get really sure what are device names of your source and target. 'fdisk -l' lists all partitions with device names, so it can help you understand which disk is which device name. Then (of course, new disk must be equal or a bit bigger) you can run
Code:
dd if=source_disk of=target_disk bs=1048576
- 'if' means input file, 'of' is output file, and do not switch the order by accident! To see progress you can get one more console and run 'pkill -USR1 dd' . dd will print some statistics.
This is the job things like "dd" were designed for. However ...
Quote:
Originally Posted by Pawprint
Due to some hardware problems I need to make an exact copy of a SATA drive to an IDE drive.
Erk ... what sort of hardware problems ???.
Quote:
Is there a program that will simply copy every single byte on one drive to the same position on another, partition tables and MBR included? Would that even work if the drives were two different brands (but the same size or at least very close)?
Be aware that drives of (supposedly) the same size quite often aren't. Make sure you have at least the same number of cylinders on the target drive.
"fdisk -l" will tell you
Thanks for the replies, guys, but unfortunately the issue is moot. The motherboard I was trying to use as a substitute wouldn't even boot an older version of my game, so this avenue didn't play out for me. I guess I have to wait until I get an exact replacement or (gulp!) buy a new system board from the manufacturer.
It is technically impossible to make a byte-to-byte copy to a smaller disk. How should that work?
Also, why advertising Windows-only programs on this forum, even if they are freeware?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.