Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



Rescue MBR in Ubuntu?

jip8888
10-30-2009, 05:33 PM
I made a stupid mistake and can't seem to rectify it. I have a dual-boot Win XP/Ubuntu 9.04 system. This morning I tried to upgrade the Ubuntu partition to 9.10 UNR, but the installation instead created a new partition for 9.10 alongside the existing ones. Here is where I did something dumb and things went badly wrong. Seeing no easy way to undo the installation, I deleted the 9.10 partition. When I rebooted, I got the message

GRUB loading
error: no such partition
grub rescue>

The grub rescue> prompt does not seem to recognize any commands. Using a live installation USB stick, I can get to a regular Ubuntu command prompt and can also load a desktop using the startx command. 'boot.ini' looks fine, as does menu.lst. The Windows partition is is sda1 and is flagged as bootable. The Linux partition is extended partition sda2 with sda5 as the subpartition where the file system sits and sda6 as the swap file.

I assume there is a straightforward way to recreate the MBR, and need someone to point me to it.

WinXPert
10-31-2009, 05:38 AM
Try GAG http://gag.sourceforge.net/

Ad
10-31-2009, 05:38 AM
  

jip8888
10-31-2009, 10:10 AM
Thanks WinXPert, but I found the solution, which turns out as I thought it might be to be very simple. I post it here for others who might find themselves in this situation.

Boot a live CD to a command line or open a terminal.

Start grub with:

sudo grub

to get the grub prompt grub>

Type:

find /boot/grub/stage1

Using the informaton reported, type:

root (hd0,n)

to set the root device. Then type:

setup (hd0)

When it finishes installing, exit:

quit

and reboot. That's it.

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Sony: PlayStation 3 to be 3D-capable via firmware update

iSuppli: DDR3 to account for over half of DRAM shipments by Q2 2010

Facebook named third most popular video website behind YouTube and Hulu

Patriot introduces new PS-100 SSD series

Sony working on digital store for music, movies, books

Details of Intel's 32nm Atom emerge, on track for 2011

More Tech News

  
 Software Downloads

Norton Virus Definitions 2003-07 November 20, 2009

AVG Anti-Virus Updates November 20, 2009

Norton Virus Definitions 2008-09 November 20, 2009

avast! Virus Definitions November 20, 2009

McAfee SuperDAT Update 5808

Kaspersky Anti-Virus Update November 20, 2009

Google SketchUp 7.1.6087

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.