ParityCheck

July 26, 2007

One way to recover from a “missing operating system” message

Filed under: Linux — paritycheck @ 10:47 pm

Prerequisites: You’ll need a Windows 98 Startup Disk 

I was trying to install Red Hat Linux 8 over DeLi Linux and in the process I somehow corrupted the Master Boot Record (mbr).  I probably ruined the boot up code in the hard drive when I issued “fdisk /mbr ” .    After that, I simply could not install anything into my hard drive.  Everytime I tried to boot up the computer straight from the main hard drive(C:), without the Win 98 Startup Disk, I was getting “Missing operating system.” messages.  Even after multiple fdisk /mbr commands, I still couldn’t fix the hard drive or initialize the mbr properly.  I couldn’t even format the C: drive with a DOS “format c: /s” command.

Lucky for me, there is a program called DEBUG.EXE in the Windows 98 Startup Disk that helped me out.  By the way, Startup Disks built by Windows XP don’t have this program.  When booting the computer using the Win 98 Startup Disk, copies of useful programs are copied to the C: drive including DEBUG.EXE.  Using this program, I was able to clear out the MBR on the hard drive.  This article will describe how I did this.

Caution/Disclaimer: Doing the following will cause your hard drive to start from scratch and you will lose data that was originally on your hard drive. I’m not responsible for any loss of data.

  1. Boot the computer using a Windows 98 Startup Disk.  During boot, programs will be copied to your main drive (C:) including one called DEBUG.EXE
  2. After boot completes, change to the C: drive by typing “C:” at the A:> prompt
  3. Enter “debug” at the C: prompt
  4. At the “-” prompt, type ‘a’ to start the assembly editor
  5. Enter the following assembly code instructions:
  6. mov dx,9000
    mov es,dx
    xor bx,bx
    mov cx,0001
    mov dx,0080
    mov ax,0301
    int 13
    int 20
  7. then press ‘g’ to execute
  8. If everything goes right, a critical area in your hard drive containing the MBR has now been cleared to zeroes and is ready for a fresh new Operating System installation.

7 Comments »

  1. or u cud do the sane thing and insert the windows 98 cd rom and run from CD and have windows setup do that for you

    Comment by John — March 4, 2008 @ 7:01 pm

  2. Hi John,
    Thanks for the comment. Yes, I believe your approach would work as well. However, this was a case when booting from CD didn’t work either. So, I did this to completely start from scratch.

    Comment by paritycheck — March 5, 2008 @ 7:07 am

  3. My computer shows “missing operating system” soon after showing memory test screen. I am unable to start in even safe mode. I had installed win 98 in C drive and win xp SP2 in D drive. None of this OS is helping now. When tried to instal the Win XPSP2 in E drive in order to save the files, its asking me to go for formatting.
    The bios info says my hard disk is present. Any solution pl help me on this. I have a lot of files in the hard disk.

    Comment by senthil — July 20, 2008 @ 7:47 am

  4. senthil,

    is the following possible for you?

    1) the hard drives that have important data, don’t reformat – just leave alone and remove from computer.

    2) the unimportant hard drives, install the OS and reformat. you could lose data here but seeing that you don’t care about the data i would think it doesn’t matter.

    3) if the data in all the drives are important, get or purchase a new disk drive and install the OS in that.

    4) for the drives that are important to you, make it an external hard drive by buying a drive enclosure that has a USB interface to PATA or USB-to-SATA then access your data from there.

    I guess my approach is to try and preserve your data and making sure that installing a new OS doesn’t wipe it out. then, once the OS is installed you can copy over your important data. I’m not sure if the failure lies in the desktop or hard drives but making several copies of you data ensures that you don’t lose it.

    Let me know how it goes..

    Comment by paritycheck — July 20, 2008 @ 8:57 am

  5. Thanks a lot for the suggestion. I have a quick question:

    Is it “mov ax,0301″ or “mov ax,0201″? Will there be a difference in the final outcome?

    Thanks, :)

    Comment by jim — March 22, 2009 @ 8:53 pm

  6. jim, i never tried experimenting with a different mov command. what works for me is exactly as written.

    Comment by paritycheck — March 23, 2009 @ 4:53 am

  7. vignesh.
    I was really happy to got a good solution.

    i hope these commands are helpful for me.

    thank you

    Comment by vignesh — March 24, 2009 @ 8:42 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.