HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Tested on Ubuntu 7.04; Ubuntu 7.10 and Linux Mint 4.0 Live CDs
If want to restore Windows Bootloader and for some reason cannot use the windows installation cd, there is a simple way to do it:
NOTE: make sure you have internet working.
1) Boot with Ubuntu Live CD or Linux Mint Live CD
2) On the terminal:
sudo apt-get install ms-sys
then
ms-sys --mbr /dev/hdX
NOTE: in my case the main windows xp system is located in hda1 so I used ms-sys --mbr /dev/hda
3) Reboot.
This should get your windows back. :D
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Brilliant! Thanks for this, it worked well.
However I needed to enable the 'universe' repository (System->Administration->Software Sources) before I could install the ms-sys package. I also needed to put "sudo" in front of the ms-sys command (e.g. "sudo ms-sys --mbr /dev/sda") otherwise I got permission denied.
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Hey guys, I recently cloned my hard drive. Every thing worked ok and still does except that I can not boot into windows anymore. I have a dual boot system (Kubuntu / Windows XP Pro).
I can boot into Kubuntu fine and all is well. Just booting into XP is messed up.
When I choose to boot into XP it just sits there with "starting up" in the top left of the screen.
I was wondering if doing the steps in this post is what I need to do?
Does anyone know what got messed up during the cloning process and how to fix it.
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
It has taken me a week to find a solution that worked -- and it worked so smoothly! Thank you! Now that the desktop PC is back in working order, my wife and I will not be fighting for the laptop!
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Quote:
Originally Posted by
inoxllor
Tested on Ubuntu 7.04; Ubuntu 7.10 and Linux Mint 4.0 Live CDs
If want to restore Windows Bootloader and for some reason cannot use the windows installation cd, there is a simple way to do it:
NOTE: make sure you have internet working.
1) Boot with Ubuntu Live CD or Linux Mint Live CD
2) On the terminal:
sudo apt-get install ms-sys
then
ms-sys --mbr /dev/hdX
NOTE: in my case the main windows xp system is located in hda1 so I used ms-sys --mbr /dev/hda
3) Reboot.
This should get your windows back. :D
Hi, I'm having the exact same problem as inoxllor and I was really excited about trying the solution you suggested. So I loaded the Ubuntu Live CD, executed installed ms-sys and executed the commands the (I too had to set software to "universe" to install ms-sys and I also needed to use the sudo, as well as the "-f" switch when I ran ms-sys). However, this did not resolve my problem - when I shut down my system and rebooted, GRUB is still trying to load and my system just hangs at the GRUB load error message.
Any other ideas? I've tried everything solution I could find and none of them have worked. Help!
fluteman:confused:
HOW TO: Recover Windows MBR using Ubuntu LIVE CD
:guitar:
THANKS TO INOXLLOR & GONK THE FINAL FIX WOULD BE SOMETHING LIKE THIS:
HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Tested on Ubuntu 7.04; Ubuntu 7.10 and Linux Mint 4.0 Live CDs
If want to restore Windows Bootloader and for some reason cannot use the windows installation cd, there is a simple way to do it:
NOTE: make sure you have internet working.
Before the first step:
(I needed to enable the 'universe' repository (System->Administration->Software Sources) before I could install the ms-sys package. I also needed to put "sudo" in front of the ms-sys command (e.g. "sudo ms-sys --mbr /dev/sda") otherwise I got permission denied.)
1) Boot with Ubuntu Live CD or Linux Mint Live CD
2) On the terminal:
sudo apt-get install ms-sys
then
ms-sys --mbr /dev/hdX
NOTE: in my case the main windows xp system is located in hda1 so I used
sudo ms-sys --mbr /dev/hda
***
ubuntu@ubuntu:~$ sudo ms-sys --mbr /dev/hda
Windows 2000/XP/2003 master boot record successfully written to /dev/hda
***
3) Reboot.:KS
This should get your windows back.
__________________
Thanks Reply With Quote
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Hi everyone!
I've tried to fix mbr with ubuntu live cd, but now it appears:
Invelid partition table
Notice: I'm working on a laptop asus, with 2 partions (one recovery, and one with windows and all my dates).
Help!!!
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Quote:
Originally Posted by
musico218
Hi everyone!
I've tried to fix mbr with ubuntu live cd, but now it appears:
Invelid partition table
Notice: I'm working on a laptop asus, with 2 partions (one recovery, and one with windows and all my dates).
Help!!!
This happened to me too. I don't think ms-sys works with Vista. Another (easier?) way is to use the Windows Recovery CD which is available for download here - http://neosmart.net/blog/2008/window...disc-download/. Go through the various options then pick "Startup Recovery". Works a charm.
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
It does not appear ms-sys is in the repos for intrepid any longer.
Re: HOW TO: Recover Windows MBR using Ubuntu LIVE CD
Quote:
Originally Posted by
zorkerz
It does not appear ms-sys is in the repos for intrepid any longer.
Yes, unfortunately that is the case. You could download that package from packages.debian.org and do it that way, but there are many ways to install a Windows type MBR though, including:
Code:
sudo apt-get install syslinux
sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
And replace sda if you want to install the MBR to a different drive. Or another method:
Code:
sudo apt-get install mbr
sudo install-mbr -i n -p D -t 0 /dev/sda
Both the "syslinux" and "mbr" packages are available in the repositories. I should mention that all a Windows MBR does is attempt to boot whichever partition on the HDD is marked as bootable, or active, so there are many open-source boot loaders that do exactly the same thing, including the two methods given above. :)