On Sun, Oct 03, 2010 at 10:40:11AM +0800, Dennis Cao wrote: > Yesterday, I used this command to correct my MBR on my working computer, > $ dd if=/somefile of=/dev/sda bs=512 count=1 > But very unfortunately, I used a wrong file. Now when I boot my > working computer, it says: > Non-system disk or disk error > replace and strike any key when ready > > I think the partition table is destroyed. How can I restore my disk?
You have overwritten the first 512 bytes (i. e. the first sector of the disk, if the disk uses sectors that have 512 bytes). That shouldn't have affected the partition table or other data on the disk. Partition tables and data usually don't reside in the first 512 bytes of a disk. The message you're getting allows to conclude that what you have overwritten was something that allowed booting the computer from /dev/sda. If you can restore whatever it was, you should be able to boot as before. You can boot a rescue system from a removable media or another disk and take a look at /dev/sda. You'll very likely find your data is all still there and unharmed. As to how to restore your disk, it depends on what you consider as "restore": To just retrieve the data, boot from a removable media and make a backup. How to make it bootable again depends on what was used for booting. If you have the right file you wanted to write with dd, you could just write it ... _______________________________________________ Help-grub mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-grub
