Something happen to a windows Master Boot Record (MBR) that you’re responsible for? Want a very quick, very easy way to restore it with nothing but your craft, native intelligence and a liveCD?
Be cautious here - you’re working with your disks in a very direct manner. If you don’t have everything backed up or are unsure of anything, you may want to wait until you have a standard Windows CD/DVD.
Boot into your Ubuntu LiveCD on the offending machine. Once Ubuntu starts up, go to System -> Administration -> Software Sources and enable (by checking it off) the Universal repository.
Now, open a terminal session (Applications -> Accessories -> Terminal) and type the following:
sudo apt-get install ms-sys
ms-sys is a program used to write Microsoft compatible boot records.
Now you’ll need to figure out what partition is the one hosting your Windows operating system. Back in the command line, type:
sudo fdisk -l
That will list the available partitions. You’re looking for a partition that says something like
/dev/sda1 1 9327 74919096 83 NTFS
The two important bits are the ‘/dev/sda1‘ which is the partition itself and the ‘NTFS‘ which tells us it’s a Windows formatted partition. So your Windows partition exists on your drive sda and it’s partition 1. The MBR for drive sda (assuming you boot into windows using it’s native boot loader) is what you want to repair.
We want to fix the MBR on /dev/sda. To do so, type:
sudo ms-sys -m /dev/sda
You’ll want to change the ’sda’ bit if your results from ‘fdisk -l‘ are different. If for instance your windows install is on sdb or hda.
Once you do that, reboot the machine, removing the LiveCD from the drive and Windows should come back to you.
Sure, you could do this by inserting the correct Windows CD and booting into repair mode from it - but I find the Ubuntu way a bit faster and I’m more likely to have an Ubuntu LiveCD on me than a Windows CD.
Technorati Tags: mbr, ubuntu, linux, windows, fix, repair mbr, howto, how to, repair, technology, geek, compturs















January 16th, 2008 at 6:32 am
Nice tip
You could also use Super Grub Disk to fix MBR and Grub.
January 16th, 2008 at 9:34 am
lol the average windows user is going to use their own windows CD to fix the MBR, because they will not have copies of anything else lying around. Plus, they would have to go to the local public library to get Ubuntu, something which many people have never done in their lives.
January 16th, 2008 at 12:00 pm
True if you kept the original CD, but it is something that 85% of users don’t do it. Plus the fact that most of computers came with a “recovery partition” that will not help you in this situation.
So, the users will take the computer to a repair shop where the technician will use a good tip like this because it is much faster, and in addition because the increasing Ubuntu’s popularity, many people is having both system on the PC.
January 16th, 2008 at 12:10 pm
Awesome! Nice to see this method outlined. A friend has this exact problem (missing MBR) and despite being a pretty much MS Windows guy has just become aware of Ubuntu. Only “problem” is he likes Ubuntu so much already he may not ever repair the MBR on the Windows disk.
Oh, and this method gets around the possible “I forgot the administrator password” problem with the Windows CD repair method.
And to s810 - Ubuntu is available free on “the tubes” - never underestimate the power of free.
January 16th, 2008 at 12:27 pm
just put Ubuntu CDs in every book in your library’s computer section. I didn’t say public library, I mean your own personal library at your house, yeah heehehehehehe.
January 16th, 2008 at 1:59 pm
Does this work with a dualboot with Vista?
January 16th, 2008 at 2:29 pm
If it’s got a windows MBR that needs fixin’ then it will work.
January 16th, 2008 at 2:45 pm
Bootup goes around in circles and won’t boot up! Tryied to use the windows backup floopy get to the prompt A: but I forgot what I need to enter at the A: prompt. could you please help me?….Thank you and have a good day.
Marie
January 16th, 2008 at 4:06 pm
Since the Win CDs that came with my computer will not allow me to repair the MBR (they only restore the backup using Norton Ghost), I’m thankful for this advice as I don’t have to worry about finding a Windows CD somewhere.
January 16th, 2008 at 5:43 pm
For more info …
http://ms-sys.sourceforge.net/
January 16th, 2008 at 6:43 pm
s810 is right. This is interesting but not useful. Why would you go to all that trouble when you just pop in the Windows CD or a boot disk. I wish there were hints for doing anything in Linux that did no inolve lust for the command prompt and assoted switches, spaces, repositories, and caps. Heck, I wish Linux just worked at the GUI.
I like Linux. But it is not user friendly. Linux is a hobby.
January 16th, 2008 at 9:40 pm
If you use MBR boot manager, would it show linux partition as well? In the past I have tried several times to add ubuntu’s entry to the MBR list, but never succeeded. Because, my friend had a wireless keyboard that cannot be read in grub to select which operating system to boot. That is , I tried to add ubuntu’s entry to the MBR and use that, but unfortunately I couldn’t get it working. However, this happened a year and half ago and I am not sure if it is still like that.
January 16th, 2008 at 9:43 pm
If you use MBR boot manager, would it show linux partition as well? In the past I have tried several times to add ubuntu’s entry to the MBR list, but never succeeded. Because, my friend had a wireless keyboard that cannot be read in grub to select which operating system to boot. That is , I tried to add ubuntu’s entry to the MBR and use that, but unfortunately I couldn’t get it working. However, this happened a year and half ago and I am not sure if it is still like that.
January 17th, 2008 at 10:38 am
Its true it does work but you dont have to go to the extent of all teh above (command lines etc.), as long as it physically boots into Unbuntu or Knoppix (does the same), it repairs the Windows MBR automatically, let it go into the live O/S and then restart the system, ive done this a fair few times on customers machines, that have come in for repair!..
The Windows FIXMBR & FIXBOOT commands dont work maybe 1in10 chance of it working.
January 17th, 2008 at 10:45 am
Because my WinXP disk is somewhere in a box in storage and I can’t get to it, but I *can* borrow someone else’s computer and burn an Ubuntu Live CD. (I already posess an Ubuntu Live CD, but that is beside the point)
January 17th, 2008 at 9:10 pm
1. insert the win xp setup cd
2. reboot your computer
3. boot into the cd
4. go to “Recovery Console”
5. select your win drive
6. type “fixmbr”
6a. done
January 18th, 2008 at 12:28 am
“1. insert the win xp setup cd”
Yeah. I have a “recovery” DVD that I had to burn myself using the hidden Sony “recovery” tools. All it’s capable of doing is wiping the entire disc and reinstalling the shovelware that I spent 6 weeks trying unsuccessfully to remove.
If there’s any way to avoid that agony in the future, I express my deepest gratitude in advance.
January 18th, 2008 at 3:23 am
Everyone saying the Windows install CD is sufficient is ignoring the fact that the Windows install CD takes 20 minutes just to load drivers so that you can select the Repair option.
January 18th, 2008 at 3:26 am
I have recovered MBR several times just using FDISK /MBR command form diskette (created on second computer). When diskette is not present, I have the same on CD which emulate diskette. In above, Ultimate boot CD (also mentioned on lifehacker) is available for free and contains MBR tools. Nevertheless, always is good to know more ways how to make the same things in different ways…
January 19th, 2008 at 3:52 am
This doesn’t work, do you people ever check the crap you’re publishing?
My windows partition was ntfs and now it’s all ruined, couple of days at least to rebuild everything… please stop posting stuff that you haven’t actually tried.
idiots.
dan
January 19th, 2008 at 10:28 am
Well, I have grup errors at boot… I’m the little better than average windows user, and tried the windows option, but blocked!! I don’t know the admin password (as I installed ubuntu on a usb key on my work locked up laptop)…. so i will try this option hopefully it will work
January 19th, 2008 at 12:05 pm
I applied the sudo commands from the beginning of this message, it asked me to use the -f option (to force) in additon of -m (mbr) which I did.
Now I still get my grub error when I boot my laptop. When I plug my usb stick in (with Ubuntu 7.10) the grub comes up (as it did before) but when I pick Windows XP… it doesn’t work “partition error”………… !!!! MAYDAY SOS… Help
January 19th, 2008 at 12:09 pm
Ok, I just remembered the gparted command for ubuntu… and now I noticed that my partition is “unallocated” and the file system “unallocated”
?
January 19th, 2008 at 12:55 pm
Ok, Booted with windows CD, chose recovery console, went to dos prompt then fixmbr followed by fixboot. now it’s booting like a charm.
sorry for the 5 messages
January 20th, 2008 at 1:02 pm
I’m currently downloading the LiveCD and running through the howto so I can be familiar with it, and I came to the part that says:
Now you’ll need to figure out what partition is the one hosting your Windows operating system. Back in the command line, type:
sudo fdisk -l
That will list the available partitions. You’re looking for a partition that says something like
/dev/sda1 1 9327 74919096 83 NTFS
Problem is that I have sda1-5, and two of those are HPFS/NTFS, so I don’t know which one to choose. I’m worried about having two and what that means, and that neither are simply NTFS, but rather HPFS/NTFS. What do I do?
January 21st, 2008 at 4:46 pm
Help! E can’t find package ms-sys, but my PC only has a WinModem, so can i download this package from other source and make it available in USB disk together with my Ubuntu LiveCD?
Many thanks.
January 22nd, 2008 at 9:43 am
I recently installed Ubuntu on a Firewire disk and apparently it changed my MBR to point grub to that disk. Since it’s not there during boot-up grub exits with error 21 and I can’t boot neither Windows nor Ubuntu (except from CD)
If you have your Windows Disks handy or otherwise can boot into Windows then maybe it’s best to fixmbr or such. I don’t so I need to download something. Windows disks? Possible but illegal.
So if ms-sys works as outlined here that’s good news for me. I also made a SuperGrubDisk floppy that could work.
(http://users.bigpond.net.au/hermanzone/SuperGrubDiskPage.html#How_Make_your_Super_Grub_Floppy_Disk)
May I also say it’s a bad thing that Ubuntu installs an MBR pointing at a disk that may or may not be visible during boot-up? If it is not visible then it’s bad news and not so very obvious to restore.
January 27th, 2008 at 3:53 pm
tnx, this could come in handy someday…
February 5th, 2008 at 12:43 am
Technically /dev/sda1 will have a Boot Record, not a Master Boot Record. There’s only one MBR per physical disk so the MBR would be on /dev/sda.
Each partition can also have it’s own boot record, so there could be one on /dev/sda1, /dev/sda2 and so on.
- rmjb
February 5th, 2008 at 8:19 am
rmjb is right. the correct device would be /dev/sda NOT /dev/sda1.
The person responsible for posting the original erroneous info should think VERY carefully before posting any misleading information ever again. As given, the instructions will definitely hose any windows installed in /dev/sda1.
What is REALLY disturbing is the number of people praising the original article. Obviously they haven’t tried it either.
February 18th, 2008 at 1:38 am
PLEASE HELP ME!!
After reading the comments I was under the impression that this would work for Vista (”If it’s got a windows MBR that needs fixin’ then it will work.”). So, now instead of getting “NTLDR is missing” I get “Invalid Partition.”
Since it didn’t work, I went and found a Vista Recovery ISO and put that in my CD drive upon startup. I go to use “Startup Repair,” and it gives a list of which Vista installation (a list of ONLY Vista installations) that I want to repair. NOTHING SHOWS UP!! I’m assuming that this program above, ms-sys, rewrote my that particular partition (sda2) to look like a former version of Windows (not Vista).
Please help, I’m desperate to recover my MBR so I can access Windows without having to restore and lose all my data.
NOTE:
My partitions are:
(0) Hidden recovery partition that came with laptop (Sony Vaio VGN-FZ160E)
(1) Vista
(2) Ubuntu 7.10
If I write GRUB to the MBR I can boot to Linux but not to Vista….
February 19th, 2008 at 2:17 pm
-mbr doesn’t work in 7.10. Just use -m, so in other words:
sudo ms-sys –m /dev/sda
February 26th, 2008 at 4:40 am
@ rmjb / torchwd
that is so true. I had a colleague who was trying to fix their mbr and ended up killing their entire windows partition because of the misleading instructions:
“You’ll want to change the ’sda1? bit if your results from ‘fdisk -l‘ are different.”
wtf — that kills the entire partition. That sentence needs to be reworded AND a warning added to inform ppl that they should only apply ‘ms-sys’ to entire disks, not partitions. (i.e. /dev/sda NOT /dev/sda1).
February 26th, 2008 at 4:41 am
ARSGEEK PLEASE FIX!!!! Your article is great apart from that potentially misleading statment. (and it also needs a notice warning ppl *not* to do ’sudo ms-sys –m /dev/sda’)
February 26th, 2008 at 4:48 am
(oops that would be “telling people to do ’sudo ms-sys –m /dev/sda’ and NOT to do ’sudo ms-sys –m /dev/sda1′”)
TIA
February 27th, 2008 at 4:34 pm
[...]MBR najpro?ciej przywróci? u?ywaj?c p?yty instalacyjnej systemu Windows. Nale?y dokona? rozruchu z p?yty, uruchomi? konsol? odzyskiwania systemu i pos?u?y? si? poleceniem fixmbr.
Je?li jednak w danej chwili nie dysponujemy p?yt? z Windowsem, mo?emy wykorzysta? kr??ek Ubuntu (lub innej dystrybucji uruchamianej w trybie LiveCD).[...]
February 27th, 2008 at 4:34 pm
[...]MBR najpro?ciej przywróci? u?ywaj?c p?yty instalacyjnej systemu Windows. Nale?y dokona? rozruchu z p?yty, uruchomi? konsol? odzyskiwania systemu i pos?u?y? si? poleceniem fixmbr.
Je?li jednak w danej chwili nie dysponujemy p?yt? z Windowsem, mo?emy wykorzysta? kr??ek Ubuntu (lub innej dystrybucji uruchamianej w trybie LiveCD).[...]
February 27th, 2008 at 4:35 pm
[...]MBR najpro?ciej przywróci? u?ywaj?c p?yty instalacyjnej systemu Windows. Nale?y dokona? rozruchu z p?yty, uruchomi? konsol? odzyskiwania systemu i pos?u?y? si? poleceniem fixmbr. Je?li jednak w danej chwili nie dysponujemy p?yt? z Windowsem, mo?emy wykorzysta? kr??ek Ubuntu.[...]
February 28th, 2008 at 11:50 pm
Help. Does this method work with Vista? I tried to make a dual boot Vista Ubuntu 7.10. Using the vista software I resized a windows partition and then installed Ubuntu into the free space using live CD with guided partioning which created two partitions (one swap.) I intended to preserve the Vista bootloader so I tried to install the GRUB bootloader onto the Ubuntu ext3 partition during the install. My plan was to reboot into Vista and use easyBCD to add the Ubuntu boot. However when I rebooted after the install I got “invalid partition table” and cannot boot anything. I don’t know where I messed up since I did not install grub on MBR (I dont think!) Using the Ubuntu live CD I can see the partions and there are 3 windows partions all NTFS and all on sda (1,2,3) and then linux partions sda4 (extended) sda5 (ext3) and sda6 (swap) there is also a partionless other device /dev/hda.
The ext3 partition had boot flag in Gparted, but GRUB reported (hd0,4) as the boottable. I heard that vista may not boot if there are other bootable partitions so I first tried removing boot flag with grub which removed the flag but I still get “invalid partition…” and cannot boot. Then I tried ms-sys -m /dev/sda as explained here and this didn’t make any difference either - I still get “invalid partition table” on reboot. Any ideas would be great. I don’t have a vista disk or any windows repair disks.
March 1st, 2008 at 10:04 pm
Thanks. Very good tip.
March 2nd, 2008 at 2:54 am
I tried this method I had Ubuntu and Widows XP , I used ms-sys command because I do not have access to Administrators Password on my Windows XP.
Now the Windows XP partition is SCREWED, I got ‘INVALID PARTITIO TABLE”
Pls advise.
tejerin
March 3rd, 2008 at 6:33 am
If you have the ubuntu live (install) CD you can try putting GRUB on the MBR, see here:
http://apcmag.com/5045/how_to_dual_boot_vista_with_linux
This worked for me and Ubuntu and vista were both detected and I got multiboot option.
March 4th, 2008 at 4:38 pm
If i use Ubuntu will I loose my files from the hardrive??? Cause there are some files that I need from the hardrive that I didnt back up!!! thnx
March 7th, 2008 at 6:19 pm
Hi, I found you post using google… you saved my life! Your trick works also for Winsows Vista, which DVD isn’t shipped with a Console for “fixmbr” command!
I lost my MBR with Dell Media Direct “bugged” system..
Thnakyou! Bye!
March 10th, 2008 at 3:35 am
GoodToKnow:
“s810 is right. This is interesting but not useful. Why would you go to all that trouble when you just pop in the Windows CD or a boot disk. I wish there were hints for doing anything in Linux that did no inolve lust for the command prompt and assoted switches, spaces, repositories, and caps. Heck, I wish Linux just worked at the GUI.
I like Linux. But it is not user friendly. Linux is a hobby.”
But when you use a Windows CD to restore the MBR it is done at the MS-DOS command prompt by typing in commands.
RTFM before you rant!
Also learn to spell “inolve” and “assoted”
March 21st, 2008 at 6:54 pm
Thank you so much! I had dual boot for ubuntu and XP and I didn’t like Ubuntu. Used Gnome partition to delete it and resize back to XP, and got the error. Unfortunately I couldn’t find my XP disk and didn’t have a floppy drive. You helped me out alot!
April 2nd, 2008 at 6:54 am
HOW TO: Recover Windows MBR using Ubuntu LIVE CD
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
***
it will look like this at the end in terminal:
ubuntu@ubuntu:~$ sudo ms-sys –mbr /dev/hda
Windows 2000/XP/2003 master boot record successfully written to /dev/hda
***
3) Reboot.
This should get your windows back.
http://ubuntuforums.org/showthread.php?t=622828
April 25th, 2008 at 2:22 pm
Great tip, saved my weekend, thanks!
April 28th, 2008 at 11:13 pm
ok,good to know how to fix windows using Ubuntu live CD but how to fix Ubuntu by Ubuntu life CD??
– i have Ubuntu 7.10 i gotta problem with log in into system i could only by using failsafe Gnome session otherwise was message with ( ~/.session-errors file)i did try reinstall some packages etc but now i can only use terminal ,i have life cd and how can fix Ubuntu problem without loosing private data?
i did try : sudo mkdir /mnt/repair
sudo mount /devhda2 mnt/repair doesn’t work
so now I’m stuck with windows xp from second partition to look for help :S
thnx
April 30th, 2008 at 10:07 pm
True Ass Saver for dealing with Windows XP. Heard a few whines about “Why don’t you insert the Windows XP disk and go into recovery mode?” somewhere up there.
Well Dearies, I have a whole company full of Windows XP install disks. Umm, only problem, they’re Smell System Recovery Disks, and the recovery mode seems to only boot you to C drive, and once you get there, FIXMBR seems to be totally lacking along with all the other utilities that should be there.
However, for all it’s lack of REAL (TM) Windows XP Professional SP2 install disks on the premisis, the company does have a live internet connection and a paid for copy of Nero. So it was a real pleasure not having to drive down to the local Staples to fork over another couple hundred dollars to get a really high dollar Windows XP boot disk with all the missing utilities.
Thanx a bunch.
May 8th, 2008 at 8:26 am
This is awesome tips. My windows CD would not boot for some reason (some incompatibility with the SATA driver - I am not even sure how I installed windows the first time). So the only way I could add the partition to the mbr was using this method. Unfrortuently to get online i had to install unbuntu to harddisk to get it to work to view this page, but luckily i had the free space on the drive to make partitions for ubuntu.
May 13th, 2008 at 1:18 pm
- This *is* excellent, and I was hoping Knoppix did it as well ’cause I have that already. (grin) Only just got bright enough to research if it would work.
- As someone pointed out, essentially NO systems ship with a REAL install disk. They have this f*****g “recovery” disk that caused this problem to start with … it did NOT install the MBR correctly after a drive failure. Since to took FOUR HOURS to not install correctly, TWO HOURS to rip out all the bloatware I didn’t want to start with, and the only option is a full re-install, I’m not too hot on letting it try again.
- Companies should be run out of town on a rail for shipping that crap with systems. Even the “recovery console” that’s available from HP (after two reboots) does NOT have access to the hard drives! What??? Tell me how useful is that?
- I’m sure it’s not even the companies. It’s the source … mickeysuck … that’s driving the licensing requirements. Oh to have a job that uses Linux. (wistful sigh)
- Kudos to Linux *again*…
May 21st, 2008 at 1:37 pm
Thank you. This worked brilliantly for me.
Toshiba supplied me with a CD that only enables a complete restoration of my hard drive to “out of the box” state or re-installation of the crappy software they supplied.
Thanks again, Brian
June 20th, 2008 at 5:45 pm
Fantastic just what I need to recover the MBR on my ASUS EEE 900 because I dont have an external DVD drive
June 26th, 2008 at 9:19 pm
Hi,
When I try to do the first step (sudo apt-get install ms-sys), I get this error:
E: Couldn’t find package ms-sys
What do I have to do?
July 1st, 2008 at 7:13 pm
ms-sys has been removed from ubuntu repository as it was removed from debian repository. So this mbr-recovery tip does not work with new hardy (8.04) live cd.
July 1st, 2008 at 11:22 pm
Thanks for the tips. I have both ubuntu and windows xp installed on my pc, and windows keeps restarting after ten mnts. This happened when I installed Faronics Anti-exetable along with deepfreeze. I wonder if ubuntu could help me undo the changes in this case? and will the previous tips help here?
thanks
July 24th, 2008 at 12:49 pm
THANK YOU!! I needed this!
August 21st, 2008 at 10:07 pm
You have no idea how much stress you just saved me. Thank you so
so much.
August 23rd, 2008 at 9:42 pm
Thank you thank you thank you!!! This was so easy and to all of those people who say stuff like “windows users would never need this” you are all so very very wrong. I erased my linux partition, had GRUB problems, but couldn’t repair using my Windows CD because I didn’t know my administrator password. I was totally screwed. But this worked great, again, can’t thank you enough.
August 31st, 2008 at 4:50 pm
There are as many scenarios of NOT having a LEGALLY LICENSED copy of a windoze installation CD as there are users of that lame operating system. Try to repair a windoze-hijacked machine using a LEGAL installation CD that came with your system. What happens? You end up with all the crapware you so meticulousy removed before your windoze machine broke. Plus, in your haste to get updated and patched to the latest windoze version (after all, it’s not safe to surf without a fully updated windoze-hijacked machine!) you forgot to install the Recovery Console. So you go to install it from your LEGAL OEM installation CD, only to be told that you have a newer windoze version and you will have to:
a) re-install the original LEGALLY LICENSED windoze version and install Recovery Console, after which you must install all hotfixes, patches, and service packs (you did download them and burn to CD previously, did you not?)
or
b) create a slipstreamed CD with all the installation files, hotfixes, updates, and service packs you downloaded and burned to CD via another safe and LEGALLY LICENSED windoze-hijacked machine. Now install.
After that, install your $$$$ anti-virus/firewall software, connect to the internet (finally) and hope that no crackers are able to hijack your machine before you get the latest virus definitions downloaded and installed.
… WTF!?
I have a better way. Get a LiveCD of any distribution of GNU/Linux, boot it, click Install and leave windoze behind.
Of course, if you must have windoze so you can run apps that can’t run on Linux, use whatever tool you need such as outlined above to get your lame operating system to boot.
But do yourself a favor and configure your machine to dual boot with Linux. You are definitely capable of installing and running a GNU/Linux distribution if you can repair a windoze-hijacked machine! If you can point and click, you can install a user-friendly and stable operating system with tons of productivity, entertainment, and education software — FOR FREE (donations accepted)! Expand your horizons. Learn something new. You’ll save tons of money too!
September 1st, 2008 at 6:21 pm
Thanks, this saved my life. I removed my Linux partition (planning another install in the near future) and then wasn’t able to make it past the boot loader.
sudo ms-sys –m /dev/sda
What got me stuck was stupidly putting a “1″ at the end for the first partition, when this works mainly on the whole disk resetting it.
September 7th, 2008 at 8:32 pm
I thought Linux was to help the poor. A free operating system ?? BS !! I went to the library and the only copies of Linux are on APC magazine dvd’s. I needed to borrow a external dvd burner from a nieghbour (dont like to intrude either).
Oops ! go back a bit, first I needed a windows computer to make all happen with windows xp or above and nero to drop and drag “ISO” from dvd and compile image for my cdrom to read ! All windows based technology. It appears Linux has a symbiotic relationship with windows, you work out which type of symbosis.
Now I try to load Linux !! oops, has formated my drive and windows no longer available ? Oops only installed live cd and after reboot, nothing but gobblygock, no OS at all.
Go back ! run cd again and do install ! ok ! half way through Linux wants me to build a sql ? wtf !! then build some php’s, insert my dchp details from a library modem dsl ? wtf !
I am not a wealthy tribesperson from a ghetto, where all is laid out for them on a platter. I am a pensioner white person wanting to upgrade fro 98se and have got together $7.90 per month from my budget to buy 10 days a month internet from Dod pre paid !!
Linux is for a bunch of will be yuppies or advantaged poor, well catered for by the international community with everything on a platter. We the “other” white poor, have to beg, borrow and steal windows for time to time, to try and make an allegedly free OS ! bs Linux to work! So I pirate windows for a day, get all this happening and one week later I still do not have (now) any operating system.
I want to stay honest and just leave my pirate days behind me, I want to help all the poor and I have helped many with comnputers “free”, understand “free” I dont charge nothing.
Now I have a drive with messed up MFT ? So i a=want to fix ? yep ! need a windows cd, I dont have ! need Linux, you really need a tech or a friend with dsl and windows for a long time to make it happen !
This is the biggest bs, I have ever heard. I was going to do a Ubuntu vs Vista “youtube” presentation. Ubuntu and Sabayon are all smoke and mirrors in my opinion.
At least I can borrow and xp or vista dvd/cd and have my computer “user friendly” loaded in a little over 36 minutes, I have been working a week to simple install linux bs!
Vista and windows are for real, they are for the poor and disadvantaged, every pc sold in oz, came with a microsoft liscence, I can do more on 98se than linux, except for “smoke and mirrors”.
If I can not resolve this, I will just be running 98se and autopatcher updates on all “poor and disadvantaged” ppls computers. Not the people the UN or HREOC has made billions$$$ available to to provide what “real poor peple” cant get
September 8th, 2008 at 7:14 pm
OK….does this work or does it not?
I’ve got a dual boot machine (XP home, unbuntu 7.10) in which the Windows installation has become unbootable.
Using the XP installation disk produces nothing other than a semi-dark screen. No installation, no recovery console, no nothing. It goes as far as making the statement ‘press any key to boot from cd’ and nothing more.
September 11th, 2008 at 4:57 pm
My sister’s dual boot Ubuntu/Vista computer just got GRUB error 22 after Vista updated itself. We booted it from the Ubuntu CD & downloaded ms-sys but terminal says it can’t find the package. We tried adding it to the packages but it still won’t work and since we’re only dabbling in Linux we have no idea what to do now!
(we already enabled the universe thingy)
September 14th, 2008 at 1:44 am
Hm. Requires an internet connection, though.
September 19th, 2008 at 5:55 pm
Help
E: Couldn’t find package ms-sys
November 1st, 2008 at 7:23 pm
Hi… I’m a newbie to the whole linux game and had chosen Ubuntu over Fedora for a Windows alternative… I was trying to create a “run from USB” install and I ended up messing up the MBR on my friend’s WinXP MCE computer…
I tried following the instructions mentioned above a few times, but I keep getting an error stating “E: Couldn’t find package ms-sys”…
What am I doing wrong?
I’m thinking it’s the MBR because when the computer boots up minus the Ubuntu liveCD, I get:
>> GRUB Loading Stage 1.5
>> Error 21
I tried downloading UltimateBootCD because we don’t have any of the boot discs/disks to just run the regular fdisk from the DOS prompt; any of the programs I tried to use from UltimateBootCD (it boots up into it) returns “Invalid Opcode” with a string behind it.
Please note that GRUB is not needed on this computer since it’ll solely be running WinXP MCE.
MUCHOS GRACIAS!!!
=CeR0ZeR0=
November 3rd, 2008 at 11:54 pm
Awesome! Saved my life.
Thank you thank you thank you.
After I busted the MBR on one of the Win2000 machines at work and I couldn’t use the win2000 repair disk because I don’t have the admin passwd. But I used this great little tool and in just a quick flash. My but was out of the fire.
please note that ms-sys is not in Ubuntu 8.10 repositories but can go here to get it.
http://packages.ubuntu.com/gutsy/ms-sys
Powel
November 10th, 2008 at 9:33 am
I just used this method to restore the MBR instead of GRUB on a friend’s machine and it worked perfectly.
Apparently ms-sys is not included in the repositories of more recent Ubuntu releases so I used an old Dapper Live CD.
I enabled the Universe repository, installed ms-sys, and then ran sudo ms-sys -m /dev/sda, exactly as described above. I got a message in the terminal to say that the MBR had been restored, rebooted, and went straight into Win XP.
Thanks very much for this.
Nda
December 9th, 2008 at 4:17 am
For those of you that said this is a nice distraction … just depends on the kind of work you’re doing. Try using an XP CD on a Thinkpad X series. Proprietary MBR, SATA HD that XP doesn’t have the drivers for … boss’ laptop at home over the weekend - a recipe for disaster. I had to download ms-sys from SF.net, and after Clonezilla-ing the old drive to the new one, a quick ms-sys had it back up & running. There WAS no other way to do it.
You don’t need to be a command line jockey to take advantage of the power of Linux & the open source community. Reject the FUD & get productive.
December 31st, 2008 at 3:02 am
Ok, let’s get one thing straight in regards to this “poorandconfused” guy who left that massive comment. Your local library is NOT the only place to access a free Linux install CD. You can easily find a free version of any Linux distro available for download online. Anyone with half a brain can use this download to install Linux.
Ubuntu even has this Windows-friendly install app called “Wubi”, so you don’t need to burn a CD to install it. So, please think before you go around flaming an OS you’ve barely tried getting.
To those of you who say that Linux is nothing more than a “Hobby OS”, again, try Ubuntu. The GUI is so amazing that you’ll really never have to use the terminal (but you still can if you want to).
January 31st, 2009 at 10:32 am
Thanks a bunch for this article, I have been searching for days trying to figure out away to repair the corrupt MBR on my windows drive from my Fedora 10 installation, after reading this a quick update using yum install ms-sys, then fdisk -l to check which drive was needed and ms-sys -m to write the mbr. for something that was beginning to become a pain to fix, this was amazingly simple. Thanks.
February 14th, 2009 at 2:19 pm
another vote of thanks.
However….I had to use the link
http://packages.ubuntu.com/gutsy/ms-sys
from Powel212, copy it to a USB memory stick and install it from there. Once i’d done that, it was smooth sailing.
March 9th, 2009 at 8:14 pm
I did this, but now it boots into my acer recovery partition every time. It won’t boot into xp, only into the recovery partition, even after I run the system recovery.
March 21st, 2009 at 11:40 am
Ruined my windows partition because I put hdb1 instead of just hdb… should of read the comments first. To those who read this comment: If you find out that your partition is “dev/hda1″ or “dev/sda1″ or something similar DO NOT, I repeat DO NOT, keep the numbers at the end, it should work if you type “dev/hda” or “dev/sda”, but NEVER put the numbers in, it’ll ruin your partition.
It’d be nice if the OP could put a note of warning in the original post.
April 22nd, 2009 at 9:32 am
Thanks!
I needed to restore MBR on a new notebook that can’t boot Win XP or Dos (only Vista and Linux). Vista DVD was useless but ms-sys saved the day!
Note for others:
sudo apt-get install ms-sys … doesn’t work on Ubuntu Hardy or newer as the package has been removed from repository :(.
Just download the package from here and install it:
http://packages.debian.org/etch/i386/ms-sys/download
April 26th, 2009 at 10:57 am
This faq is a bit out-of-date. More details regarding recovery and Ubuntu can be found here. MS-SYS tools seem to have been “yanked”.
http://ubuntuforums.org/showthread.php?p=6361212
May 3rd, 2009 at 3:03 pm
Thanks!!!
You really saved my day.
As other mentioned, it was removed from the repository. I downloaded it from http://ms-sys.sourceforge.net and made a “sudo apt-get install gettext” to get the “make” to work.
Suppose the other links, just above, also should work. (though I didn’t test them..)
Thanks again!!
July 28th, 2009 at 4:47 pm
Thanks a lot for the post, it saved me a lot of trouble.
August 6th, 2009 at 8:04 am
Hey you really post here a very nice article, i read it whole and it seems very informative & very useful too..
August 8th, 2009 at 9:46 am
Unfortunately the ms-sys package was removed in hardy.
But one can still download it from here:
http://packages.debian.org/etch/i386/ms-sys/download
September 5th, 2009 at 11:39 am
Thanks for post! You saved my life!
September 5th, 2009 at 6:07 pm
Maybe it’s time to update this post, because this article is actually useful, but the info about where to find ms-sys is out of date (you can still get it from sourceforge)
I needed to restore my MBR after deleting my linux partition - GRUB didn’t work anymore. I’ve done this on a netbook (no CD drive, no recovery CD, 16GB flash drive).
There are many ways to fix the MBR problem. Maybe incidentally, this is what worked for me (after maybe 5 hours, considering nearly every attempt involved juggling the flash drive with ISO images).
The simple reason why it worked is that ms-sys targets the problem directly (rewriting the MBR) and this post provides an accurate strategy used to identify the drive to repair from linux. Coming from windows, sd?#/ stuff makes precious little sense (!)
After you download ms-sys from sourceforge, you need to extract it somewhere and actually build it (they give the source apparently, not the executable) before you can run it. That may seem scary to a non programmer, but it’s actually quite smooth if you follow the readme file step by step, and literally should take no more than 1 hour (it took me 10 minutes or less, and there’s no need to download anything else).
By the way the building/make process throws errors. Ignore them.
Then fixing your MBR goes just like this post describes.
Messing with the MBR seems more common than I would have thought. I hope you’ll update this post - not because it will save 5 hours to everybody (that’s how long it took me to fiddle, google and eventually find this post), but because (a) the process of finding and building ms-sys as I roughly described will put off many users unless simply explained - potentially leaving them without a solution - and (b) there are too many replies to this post, including this one, so it would be great to trash some of this stuff and summarise it all in an update (yes, I know it takes time, and yes again, delete THIS entry while you’re at it, as it’s just meta-information and this post can be improved by removing all meta-info and keeping the essence).
Cheers
Tea
October 21st, 2009 at 9:55 am
December 12th, 2009 at 8:38 pm
Thanks man, it worked for me after uninstalling ubuntu
December 24th, 2009 at 9:50 pm
This is very nice. I had lost my window’s recovery disk and this saved my day and I had no other ways of removing grub and ubuntu installation.
I don’t know what the other folks are carping about. I found this very useful.
Thank you very much.
December 27th, 2009 at 4:46 pm
This is perfect, as my now 4 yr old Dell desktop came “preinstalled” from Dell, no Microsoft media was supplied at the time (as is typical!!!). I have a dual boot with a Linux distro that is no longer in support and is not easy to upgrade. So this method to restore the MBR is exactly the ticket. Thank you, thank you.
December 27th, 2009 at 4:52 pm
Ah, but one thing - have you people tried printing off the information on this page? It comes out one heck of a mess - the core article starts 2/3 down page 2 and part of page 3 - layout of all the links and other “stuff” is a mush before and after. Some elementary CSS would fix it to beautiful.
January 13th, 2010 at 8:18 pm
Thanks!!
January 24th, 2010 at 2:45 pm
@poorandconfused
Please don’t lump all poor white people in with yourself. Not all of us a dumber than dirt. :\
/@poorandconfused
So let me get thi straight; this fix only works for ubuntu pre-8.04? well crap. Anyone have a fix that works with the hardy heron?
January 25th, 2010 at 7:44 am
I have downloaded ms-sys 2.1.4 as my internet connection is windows-based (and windows went blue-screen after I installed Ubuntu 9)- do I just need to run ‘make’ on the package in linux (on my ubuntu partition) before I can use it?
Also - does it matter that my windows disk is fat32?
February 7th, 2010 at 11:03 am
following worked for me:
“sudo lilo -M /dev/sda mbr”
it’s already on the ubuntu live cd