Playing around with MBR

Status
Not open for further replies.

theKonqueror

CCIE# 20863
Hi all.... Have u ever played with MBR?

Once I installed Red Hat Enterprise on my system where NTLDR was on MBR. GRUB replaced it with itself so I decided to manually restore NTLDR w/o/ XP's recovery CD. I launched Red Hat, logged in as root and mounted C drive on /c.
In terminal, I typed following:
dd if=/c/ntldr of=/dev/hda bs=512 count=1

When rebooted, my PC showed the good ol' NTLDR's boot menu. :lol:

I turned off the PC, but when I reboooooted, It started to say Invalid system disk.... All partitions on my hard disk were corrupted, no drive was in proper condition. launching FDISK asked me that MBR is corrupted, and repairing it will result in Loss of all data. I searced the net for 2 days for any goos data recovery software.... I couldn't find one. So I decided to try something on my HDD. I borrowed my friend's HDD and installed it as a slave. Launched Linux rescue, then typed following:

dd if=/dev/hdb of=/dev/hda bs=512 count=1

This copied my friend's MBR to my hard disk. Now my C drive came into existance, and at least data on C was in proper condition. Then I remembered that GRUB keeps copy of existing MBR on C drive in bootsect.dos file. I again mounted C drive in Linux rescue in /c and typed this:

dd if=/c/bootsect.dos of=/dev/hda bs=512 count=1

After reboot, everything was in proper condition,all data was available and NTLDR was installed as a boot loader. :lol: :lol: :lol:


Now, I want to ask, has anyone played with MBR like this? I just wanted to share my experince coz, if someone has screwed MBR, maybe This can help.
 
Status
Not open for further replies.
Top Bottom