PDA

View Full Version : [ubuntu] 10.04 Beta Dual Boot with Windows 7 Issue



Jeff May
March 25th, 2010, 04:53 AM
I've seen a number of people reporting the same issue. The other day I upgraded my Karmic 9.10 install to the Lucid Lynx 10.04 beta using the update-manager -d method. My machine (ASUS AMD 64 "Windsor" Dual-Core) is dual-boot with a Windows 7 professional installation (sda1) and Ubuntu (sda5) as well as various other operating system options.

The installation was flawless, and I'm quite impressed with Lucid Lynx from a number of aspects, not the least of which is boot time.

One problem

When I tried to boot to my Windows 7 installation, I just kept going back to the Grub2 menu.

What seems to be happening is that the Lucid upgrade process causes Grub to be installed in the first partition of the primary hard drive, even if that's not your Ubuntu partition.

Here's the fix.

First, you will need to restore the Windows 7 boot loader and the master boot record.

1. Boot the machine from the Windows 7 CD
2. After accepting the appropriate regional settings and NEXT> Select "Repair Windows"
3. After the installer finishes searching for Windows systems, select the installation you wish to restore.
4. Select the "Boot to command prompt" option.
5 At the command prompt, issue the following commands

bootrec /fixmbr
bootrec /fixboot

- After issuing each command you should receive "The command was completed successfully"

If you are like me and for some reason you absolutely need to be able to access Windows (in my case it's job-related) you can now reboot directly into your Windows 7 partition. Unfortunately you will no longer have Grub or the ability to boot into Ubuntu.

No worry . . . that's easy to fix too. Let's restore Grub functionality. Hopefully you made a note of which partition your Ubuntu installation was on. In a dual-boot environment with Windows it is typically sda5, but your mileage may vary.

Let's assume that Ubuntu is installed on sda5 . . .


1. Boot the machine from an Ubuntu Live CD
2. Open a terminal session
3. Create a mount point for your Ubuntu partition
(example: if your Ubuntu installation is in sda5 . . . )

sudo mkdir /media/sda5

4. Mount your Ubuntu partition to the mount point

sudo mount /dev/sda5 /media/sda5

5. Finally, install Grub on your Ubuntu partition and point the boot loader to it.

sudo grub-install --root-directory=/media/sda5 /dev/sda


This should restore your Grub installation, and you should be able to access both operating systems.

bumanie
March 25th, 2010, 05:52 AM
Is this a tutorial, or did you have a specific question as in, the instructions did not work?

Jeff May
March 25th, 2010, 01:47 PM
Yes.

Or, more specifically, There are various threads all over this and other boards here reporting this or essentially similar issues with various suggestions as to a solution - some complete, some not so complete, etc.

So like I said, I guess I could answer "yes" to both of your questions. :)

Mark Phelps
March 25th, 2010, 04:16 PM
You should post all beta-related threads to the proper forum ... Development & Testing, Lucid Lynx Testing.

People looking for solutions to beta-related problems will be going to that subforum, not here.

auh2o
May 3rd, 2010, 01:43 PM
Well, this isn't merely beta-related any more. I upgraded to the final release, and it did exactly the same thing. Windows 7 would no longer boot. I would think it to be a serious flaw that Grub overwrites the MBR on the first partition and not the partition Ubuntu is installed on. I'm bumping this so more people can see it. Thank you Jeff for the help!

kansasnoob
May 3rd, 2010, 02:01 PM
Well, this isn't merely beta-related any more. I upgraded to the final release, and it did exactly the same thing. Windows 7 would no longer boot. I would think it to be a serious flaw that Grub overwrites the MBR on the first partition and not the partition Ubuntu is installed on. I'm bumping this so more people can see it. Thank you Jeff for the help!

Reviving old threads is not a very effective way of getting help but what the OP described:


When I tried to boot to my Windows 7 installation, I just kept going back to the Grub2 menu.


Is almost certainly this:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector

auh2o
May 3rd, 2010, 07:34 PM
Reviving old threads is not a very effective way of getting help but what the OP described:

I don't need any more help on this specific issue than what's described in this thread, and neither should any one else; but thanks for playing.

auh2o
May 5th, 2010, 10:10 PM
This was indeed a Grub bug, but it is now fixed!

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/508173

Run the Update Manager to get the latest version.