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.
Asked
Active
Viewed 493 times
0
Art Shayderov
- 280
- 1
- 7
1 Answers
1
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.
jmreicha
- 2,187
-
Yes, that's probably because of the reading errors. I'll try dd_rescue – Art Shayderov Mar 09 '11 at 19:27
dd conv=noerror,sync? – mark4o Mar 09 '11 at 17:46conv=noerror. sync? "pad every input block with NULs to ibs-size" - what's this for? – Art Shayderov Mar 09 '11 at 19:20noerrorit will stop copying when it sees an error. Withnoerrorbut notsyncit 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,syncwill write a block of zeros for every error block to keep input & output synchronized. – mark4o Mar 09 '11 at 22:53