Duplicating a corrupted HDD
For some tests I need to duplicate a corrupted hard drive (the filesystem is corrupted according to reiserfsck). I do not need to repair it but to clone the BAD filesystem structure into other identical HDDs several times. I don't even care about the contents of the files.
This is the problem: using dd takes hours for a 250GB HDD using clonemaxx or other software takes hours too if i duplicate the MBR and the boot record using dd and then run reiserfsck I get as a response that the filesystem is healthy. Any ideas to have a good supply of identical corrupted hdds without waiting for hours? |
Well I'm not sure of what do you want to do exactly but if you want to duplicate (clone) your Hard drive "dd" will do the job fairly well.
if you do not want to clone your HD can you please clarify? Regards, Angel. |
Clarification
Well, I'll try to make it as clear as possible.... I'm not really familiar with filesystems so, I don't know if what I want to do is possible.
STEP 1 I have a corrupted HDD (according to the results of reiserfsck) STEP 2 I am testing an equipment that runs reiserfsck --rebuild-tree automatically. So, I get a functional HDD after the test. STEP 3 I'd like to restore the HDD to the original condition (corrupted)in order to run similar tests in different equipments. __ This is what I did thinking that it would help me avoid the three hours of cloning: dd if=/dev/hda of=/dev/hdb bs=512 count=1 dd if=/dev/hda1 of=/dev/hdb1 bs=512 count=1 hdb is the one that had been repaired. hda is a corrupted clone. I ran again reiserfsck on hdb1 and I got a "healthy" result. Is the tree information saved in the partition table? If not, how can I duplicate it? Other possibility. How can I manually edit and corrupt the filesystem? First time I have problems to make something malfunction! Usually it comes naturally... Thanks. |
dd is a wonderful tool for corrupting filesystems.
for instance dd if=/dev/random of=/my/output/device seek=someoffsetvalue will make a real mess, particularly if the offset is into the filesystem header. |
if you just want a corrupted HD I have several laying around that you could play with!
|
Quote:
I think dd is the tool you need as it is a byte-by-byte copy. If it can wait a while, why don't you leave it running overnight and come back to it in the morning? |
Quote:
>sudo dd if=/dev/sda1 of=/dev/sdb1 skip=0 count=9000 bs=4096 For reiserfsck they are now identically corrupted. According to what I've read today, I think I copied the superblock, the journal and some of the data... and only took 1 minute. It's going to save me 2h59min per disk. |
All times are GMT -5. The time now is 06:27 PM. |