LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can i get my mbr back? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-get-my-mbr-back-917884/)

Stranger420 12-09-2011 06:28 AM

How can i get my mbr back?
 
hi guys,i have somehow managed to screw my mbr, here is what happened.

I had windows xp and pclinuxos 2011 kde with grub installed on mbr.
my hard drive has 5 partitions,(c)which is fat32 and xp is installed on it,(d)which is ntfs and is used for documents,music etc.(e)was fat32 and primarily used for games installation and downloads.next partition is linux swap.the last one is the ext4 pclinuxos one.
i wanted to convert the (e) to ntfs to use ntfs native compression.
i successfully converted (e) to ntfs by using convert e: /fs:ntfs.which went flawlessly, but when i restarted my computer the grub was GONE.so i booted from dos cd and restored windows boot-loader through fdisk /mbr.and windows was back.now i wanted to get the grub back so i booted from livecd and tried to reinstall grub through grub prompt but it gave me a error (something about stage1 can't be written).so i decided to use super grub disk.i have parted magic on my usb which has super grub disk(by the way pclinuxos uses grub lagacy)and successfully booted into pclinuxos.i tried to re install grub through the option in control center (with usb drive still plugged in) and the installation went smoothly,but when i rebooted there was no grub and the system booted from usb drive (instead of hd)and there was my grub on my USB. apparently since pclinuxos was booted from usb through supergrub disk which took usb as sda and the hard disk as sdb (and i selected sda when i installed grub back)now between all this something has happened to my mbr and bios doesn't detect an partition om my hd at all.but i have access to all of my partition if i boot from a live cd.
so how can i get my mbr back so that i can get my windows back and then i can install grub again or simply install another distro over pclinuxos (i was thinking of backtrack 5 or opensuse 11).
thanks in advance.

ongte 12-09-2011 09:43 AM

Usually the GUI way works. But sometimes you just gotta do it manually.

The PCLinuxOS forum has the commands.

Stranger420 12-09-2011 10:32 AM

i have installed grub back using mepis 8 lice cd.but windows boot loader is still missing, so i am gonna reboot from a dos disk and copy io.sys and msdos.sys files from that to my c partition and hope that the problem is solved.


All times are GMT -5. The time now is 11:15 AM.