Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I cloned a boot disk (bootloader, / and swap partitions) with dd to the same size disk (bad sectors started to appear). Got 1 reading error in the middle of the disk. After I swapped the disks I received "Target filesystem doesn't have sbin/init" error. At first I thought that the problem is /etc/fstab points to the wrong UUID to boot off. It turns out new disk has the same UUID, but I changed it to /dev/sda just to be shure and it is indeed /dev/sda (I disconnected all other disks). The problem persists.
How could it be that from 2 identical disks one is okay and the other not?
Edit:
I just mounted the new disk (it's LVM except /boot - does this matter?) and I can't read anything - "Input/output error". So why I receive "Target filesystem doesn't have sbin/init" now solved. I did try this before, I swear. But I did ls on it, saw my root directory and decided that it's okay.

share|improve this question
    
Did you use dd conv=noerror,sync? –  mark4o Mar 9 '11 at 17:46
    
@mark4o just conv=noerror. sync? "pad every input block with NULs to ibs-size" - what's this for? –  Art Shayderov Mar 9 '11 at 19:20
    
Without noerror it will stop copying when it sees an error. With noerror but not sync it will skip over the input block that is in error but then all of the blocks after that will be written to the wrong place (one block earlier). conv=noerror,sync will write a block of zeros for every error block to keep input & output synchronized. –  mark4o Mar 9 '11 at 22:53

1 Answer 1

up vote 1 down vote accepted

It is my understanding that dd doesn't play well when there are errors on the disk. Maybe try using dd_rescue to image bootloader, / and swap to the new disk. Otherwise you might try imaging the entire disk.

dd_rescue works the exact same way as dd but can handle errors.

share|improve this answer
    
Yes, that's probably because of the reading errors. I'll try dd_rescue –  Art Shayderov Mar 9 '11 at 19:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.