Fix MBR with Ubuntu Live CD


Recommended Posts

I have seen the other thread about MBR but it wasnt of much help. What happened is, my GRUB is giving me error 22, and doesnt boot anymore.

I want to fix the MBR and boot to Windows again, I cannot afford to format the disk from scrach.

The problem is, I have no floppy drive, and only the Ubuntu Live CD. I can't use the Recovery console with a Windows XP CD because I *forgot* the admin password.

Please, if there is any way to fix Grub, or just the MBR to boot straight to Windows, using only the Ubuntu live CD, plese let me know. :)

Link to comment
https://www.neowin.net/forum/topic/365026-fix-mbr-with-ubuntu-live-cd/
Share on other sites

Grub error 22 means "no such partition". If you are using Grub, I'm assuming that you are dual booting between *nix and windows.

Can you upload your /boot/grub/menu.lst and tell us all you know about your partitions and hard drives? Maybe find the /dev folder on your *nix system and dump ls . to a file and upload that..

I *hope* that your problem is just that your menu.lst file is pointing to the wrong partition (for some reason), and that editing this file correctly will solve your problem. Otherwise, you'll have to get guidance from wiser people than me :p

I am pretty sure you need any password to boot the CD and enter the recovery console. :ermm: You sure you doing it right?

In any case, you can use the MBR that I posted here:

https://www.neowin.net/forum/index.php?show...#entry586362675

but do not use the full 512 byte command that I posted there. The actual MBR is only the first 446 bytes. The rest is the partition table, and will alter your partitioning!

Use a dd if=~/XP_mbr.bin of=/dev/hda bs=446 count=1 command (assuming you save the file locally in your home dir as "XP_mbr.bin".

Keep in mind that this is something that I haven't personally tried. It could cause all sorts of problems.

I strongly recommend the XP Pro CD boot method. :yes:

My partitons are as it follows:

Device Boot Start End Blocks Id System

/dev/hda1 * 1 2497 20057121 7 HPFS/NTFS

Disk /dev/hdb: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/hdb1 1 7179 57665286 7 HPFS/NTFS

/dev/hdb2 7180 9729 20482875 f W95 Ext'd (LBA)

/dev/hdb5 7180 9728 20474811 7 HPFS/NTFS

As you can see, there is no Linux partition, although there should be one at /dev/hda1. I Believe that is what is causing GRUB to complain.

I tried all my passwords from 5 years to this day, and none worked to acess the admin account of my Windows install - does it make a difference if I use a SP1 disk to boot a SP2 system? Because I'm certain I know the password, I always use the same ones.

Can I just edit GRUB to not point to the missing partition anymore, and simply boot into Windows?

Or ultimately, is there a way I can mount the partitions and backup my data from /dev/hda1 to /dev/hdb1 ?

Thanks everyone for the help so far.

Where is Grub installed?

I'm assuming that it must be installed on one of the windows partitions, given your PC is finding Grub to be able to try and load it..

Is it complaining about a missing partition before you get to the menu screen, or after you select an item?

If it's complaining about a non-existant partition that the linux menu item is pointing to, comment out the linux item, then see if you can boot back into Windows.

If you can do that, we'll see what can be done about getting your linux partition back..

There is nothing to edit, except the first block of bytes on your hard drive (the MBR). It points to where the rest of GRUB used to be in your former Linux partition. It cannot find it. It posts an error. You are stuck and sad. :(

You must re-write your MBR to 'fix' the computer and allow it to boot. If the XP Pro CD doesn't work, and you can't to the boot floppy thing, then you need an alternate method to write the MBR.

I think I will have to take the HD to another computer and use a floppy disk with the fdisk /mbr command to fix it. Or find a floppy drive and install it here. Anyway, I'm not touching this partition again to aovid further complications.

Thanks for the help

there's also a 3 meg file that you can burn to cd that will allow you to reset the windows password to blank, or whatever as well. oddly enough, it's a small linux boot. but i do have the file if you cant find it through google that i can send you too. great tool to have around if i may say so myself =)

is a 3 meg cd image. if i can find the link again i'll post it, otherwise just lemme know and i'll up it. :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I noticed this was already happening within my organization; my teams location will change between remote and on-site without me having to do anything. Is it possible this is live already for select customers?
    • I wonder what it will show when I'm plugged in with my ethernet cable at home and not using WiFi.
    • While LibreOffice is not pleased to see a new competitor, they are absolutely correct in stating that Euro-Office using a MS file standard as a default is not being truly "European." Using a MS standard just means Euro-Office is just a "bastardized MS Office Suite." (Wasn't a major purpose of Euro-Office was to get away from being captive and enslaved to MS's Office Suite??)
    • Microsoft continues its long-term policy of spying on their users--despite vehement denials. That feature will be disabled (or removed) either "elegantly" with MS providing a true way to disable it, or "quick and dirty" via a third-party who WILL come up with a way to disable it. Your choice MS...
    • Helium Browser 0.13.3.1 by Razvan Serea Helium is a private, fast, and honest Chromium-based web browser — built for people, with love. It offers the best privacy by default, unbiased ad-blocking, and a clean experience free from bloat and noise. Proudly based on Ungoogled-Chromium, Helium removes Google’s clutter while keeping a fast, efficient development pipeline. With thoughtful touches like native !bangs and split view, Helium is a people-first, fully open-source browser that puts control back in your hands. Privacy, security, and control come first. Ads, trackers, and third-party cookies are blocked automatically, HTTPS is enforced everywhere, and all Chromium extensions work seamlessly — while Google can’t track your activity. Helium’s 13,000+ offline-ready !bangs let you jump straight to sites or AI tools like ChatGPT instantly. Open-source, people-first, and unbiased, Helium delivers a browsing experience that’s fast, secure, and free from noise, ads, and compromises. Helium Browser key features: Performance Fast, efficient, and lightweight — built on Chromium’s optimized engine. Energy-saving and consistent — stays fast over time without slowing down. No bloat — stripped of unnecessary components for maximum speed. Minimalist interface — compact, clean, and distraction-free. Customizable toolbar — hide elements you don’t need. Smooth and stable — no flicker, lag, or animation glitches. Comfort-focused experience — intuitive and unobtrusive. Privacy & Security Best privacy by default — blocks ads, trackers, phishing, and third-party cookies. Unbiased ad-blocking — powered by community filters and uBlock Origin. No telemetry or analytics — zero background web requests on first launch. Strict HTTPS enforcement — warns for insecure sites. Passkeys supported — modern authentication made simple. No built-in password manager or cloud sync — your data stays yours. Extension Compatibility Full Chromium extension support — including MV2 extensions. Anonymized Chrome Web Store requests — Google can’t track extension installs. Extended MV2 support — maintained for as long as possible. Smart Features Native !bangs — browse faster using 13,000+ offline-ready shortcuts. AI integration — use !chatgpt and others directly from the address bar. Offline functionality — bangs work without an Internet connection. Philosophy People-first design — open source, transparent, and community-driven. No ads, no noise, no bias — privacy and honesty over profit. Helium Browser 0.13.3.1 changelog: f53b28d update: helium 0.13.3.1 (#292) b3cbb2ba revision: bump to 3 (#1925) bcacb8c7 chromium: update to 149.0.7827.114 (#1924) Download: Helium 64-bit | Portable 64-bit |~100.0 MB (Open Source) Download: Helium ARM64 | Portable ARM64 Links: Helium Home Page | macOS | Linux | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Week One Done
      ssd21345 earned a badge
      Week One Done
    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      507
    2. 2
      +Edouard
      179
    3. 3
      PsYcHoKiLLa
      140
    4. 4
      ATLien_0
      91
    5. 5
      Steven P.
      78
  • Tell a friend

    Love Neowin? Tell a friend!