6

I think I've lost my MBR upgrading from ubuntu 10.04 to 10.10.

During the upgrade it gave me a message saying which partitions did I want the grub details to go on, saying if I was unsure to select all of them.

After reboot I just end up in a grub recovery console.

The system was a dual boot with windows vista.

Any Idea how I can get both my operating systems to work?

I'm currently attempting to download a live cd of 10.10 but its a rather big download to fix what I assume is a small problem. Worse than that I don't have a clue how to fix it with the live CD.

Edit1 Results from the boot info script http://bootinfoscript.sourceforge.net/

                   Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #256 for /boot/grub.

sda1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   /bootmgr /Boot/bcd

sda2: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows Vista
    Boot files/dirs:   /bootmgr /Boot/BCD /Windows/System32/winload.exe 
                       /wubildr.mbr /wubildr

sda3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   /ubuntu/winboot/wubildr.mbr /ubuntu/winboot/wubildr 
                       /ubuntu/disks/root.disk /ubuntu/disks/swap.disk

sda3/Wubi: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub 2
    Boot sector info:  Grub 2 is installed in the boot sector of sda3/Wubi 
                       and looks at sector 21294336 of the same hard drive 
                       for core.img, but core.img can not be found at this 
                       location.
    Mounting failed:
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1                  63    24,563,384    24,563,322  27 Hidden HPFS/NTFS
/dev/sda2    *     24,563,712   256,700,415   232,136,704   6 FAT16
/dev/sda3         256,700,416   488,394,751   231,694,336   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/loop0                                              squashfs                                 
/dev/loop1       c0de1566-8c76-4392-ac90-9f026a82f928   ext4                                     
/dev/sda1        443C1D3EE49BED2A                       ntfs       PQSERVICE                     
/dev/sda2        B898B25F98B21BB6                       ntfs       ACER                          
/dev/sda3        A4202E96202E6F8A                       ntfs       DATA                          
/dev/sda: PTTYPE="dos" 

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

aufs             /                        aufs       (rw)
/dev/sr0         /cdrom                   iso9660    (ro,noatime)
/dev/loop0       /rofs                    squashfs   (ro,noatime)

3 Answers 3

2

Well, you can use a LiveCD to re-install GRUB so I recommend that you download the LiveCD. This thread, this thread and this thread might be useful to you. Look for the section explaining how to re-install GRUB2 in the first thread. (Also LiveCD is useful when you want to recover data.)

2

http://ubuntuforums.org/showthread.php?t=1639198 by following the instructions on that page I was able to install lilo.

Lilo gives me two options ubuntu and windows. Windows works directly, choosing ubuntu brings me to grub which allows me to boot ubuntu.

Yes grub gives a warning about an invalid background colour but at least my machine is usable (or as usable as it was before.).

1
  • Yes Wubi installs require a Windows-style bootloader, not Grub2. In fact, it is not lilo giving two options - that is the Windows Boot Manager. The form of lilo you installed acts the same as Windows' bootloader. Please check that same thread for the "Permanent Fix" shown under Problem #2, because that is the next problem you will encounter (known issues with the Wubi 10.04 to 10.10 Upgrade)
    – bcbc
    Apr 27, 2011 at 2:02
2

I never got in trouble by using these instructions:
https://wiki.ubuntu.com/Grub2#Recover

First of all, you must start your system from a live cd. Then

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal (Applications > Accessories > Terminal).

3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run

df -Th  

Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt  

Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition: sdYY is the /boot partition designation (for example sdb3)

sudo mount /dev/sdYY /mnt/boot 

6) Mount the critical virtual filesystems:

sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys 

7) Chroot into your normal system device:

sudo chroot /mnt 

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub 

9) Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX 

10) Verify the install (use the correct device, for example sda. Do not specify a partition):

sudo grub-install --recheck /dev/sdX 

11) Exit chroot: CTRL-D on keyboard

12) Unmount virtual filesystems:

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys 

13) If you mounted a separate /boot partition:

sudo umount /mnt/boot 

14) Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr 

15) Unmount last device:

sudo umount /mnt 

16) Reboot.

sudo reboot 
"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .