Ubuntu upgrade broke dual boot with Vista

Hi!

I appreciate your expertise very much...

I had Vista and Ubuntu 10.04 installed in a dual boot configuration on two partitions of a single hard drive working perfectly. I think I followed the guide here exactly: http://neosmart.net/wiki/display/EBCD/Ubuntu. I upgraded Ubuntu to version 11, and I got a message something like your grub is not default keep modified version. I'm pretty sure I chose keep modified version, but it was 2:00 AM so it's possible I messed that up. Whatever happened, my laptop goes straight to Ubuntu with no option of booting into Windows (even though I can see the files on the hard drive from Linux.) I tried booting from the Vista DVD and running automatic startup repair, but that didn't help. If anyone can tell me what to do to fix it I'll appreciate it very much!

Thank You
 
Try setting W7 "active".
Did you run "startup repair" three times ?
There are multiple things to fix if you've overwritten the W7 boot, and it only does one at a time.
 
I just reran startup repair and it said it was run 6 times and there are no problems. (my computer still goes straight to Ubuntu with no option to boot Vista.) What do you mean set W7 as active? I have access to Ubuntu but not Vista except through the Ubuntu file system.
 
Terry meant Vista , not win7.

Set the Vista partition Active.

To do that - boot vista/7 repair disc - go to command prompt, and type:

Diskpart

(then press enter - it will take a few seconds till you get another prompt - a prompt is this arrow head > )

lis vol

( press enter again - find your Vista partition letter from what diskpart tells you - it might not be the same letetr you saw in windows - us the letter diskpart gives instead of z below )

sel vol z

(press enter )

act

(press enter)

EXI

(press enter)



Then run startup repair 3 times.
 
Last edited:
Thanks for your help I'll try it. I guess I should have given you a n00b alert.

Addendum:

Hi!

I followed your instructions exactly and it still booted straight to Ubuntu. Any other ideas?
 
Last edited:
Sorry.
Vista ? W7 ? all the same thing really ! (think of W7 as Vista-lite SP3)

In Ubuntu, can you look in the Partition Manager and verify that Vista is the active partition.
If you didn't manage to reset it through Simon's command line instructions, you should be able to do it directly from there.
 
Hi I'm sure you deal with tons of people's problems, and I appreciate your help. I opened the disk utility, and the first partition, the one with Vista on it is marked bootable, is that what you meant by "active"? I attached a screenshot of the disk utility. The first partition is for Vista, the second is the swap and the third the Linux install.
 

Attachments

  • Screenshot.png
    Screenshot.png
    184.5 KB · Views: 4
I don't use Linux o/s - but yes, that seems to be what it's telling you.

Try booting 7 dvd/repair disk, go to command propmt and do it manually - find your 7 drive letter with diskpart and use that letter instead of z below - like you did before.

Then type

bcdboot z:\windows /s z:

bootsect /nt60 z: /mbr

That ought to get you booting into Windows.

[ I think the /mbr switch is only on Vista sp2 and win7 - you may need to use the win7 recovery disc for this.]


You may then need to reinstall grub2 or whatever it is - to your Linux partition - not onto the mbr - Terry will explain how to do that bit.
 
Last edited:
I hope you replaced z with the drive leter of your Vista partition. ( The message sounds like you did - just checking )

That is the Vista drive letter as seen from the win7 repair function - you can find it by using diskpart commands in previous post.

Try the second command using the Vista drive letter as seen from the win7 repair function in place of z

bootsect /nt60 z: /mbr

That might be enough to do the job.


If bootsect does not get you booting back into Vista, we can replace the boot critical files by copying them from win7 repair environment onto your Vista partition first - then running bcdboot.


Sadly you can't run easybcd from win 7 repair environment, because it requires net framework 2 - not included in win 7 repair environment by deafault.
 
Last edited:
Thanks for your Help! It boots fine int Vista now!:happy:

It even booted fine into Ubuntu without making any changes.

I tried the first line again, and this time it worked without error messages. Last time I did change the drive letter. Would you mind explaining what went wrong and what the commands did? I'm actually an IT student and I'd love to learn something.

Thanks again for your help, both of you.
 
Not sure why you got that message the first time.

BCDBOOT source [/llocale] [/svolume-letter] [/v] [/m [{OS Loader GUID}]]

Bcdboot.exe copies boot critical files from an installed Windows image. It also creates a Boot Configuration Data (BCD) store on the target partition with a new boot entry for the installed Windows image.

If you have a look in Windows\Boot folder - you will find bootmgr, the bcd template, and the locale mui files ( e.g. en-us ) - that is why you are telling it to look in driveletter:\windows


bootsect.exe { /nt52 | /nt60 {SYS | ALL | <DriveLetter:>} [/force] /mbr

Bootsect.exe updates the master boot code for hard disk partitions. /NT60 switch writes code compatible with Vista and later - it loads bootmgr - if not found the loads ntldr. /NT52 switch writes code compatible with legacy o/s - it loads ntldr, but not bootmgr.

If you use the /mbr switch, it also writes the disk code - that is the mbr executable executable code ( it doesn't touch the partition table ) .

Glad it's working for you.:happy:
 
Last edited:
I've run into the same problem and I usually fix it by using "dd" to make a copy of the MBR before the update happens, and then use "dd" again to replace it after the updates are done, but before I reboot the box.

I'm tempted to describe how to do it, but dd is one of those "44-Magnum" commands that carelessly used - or even if the user makes an honest mistake - can bork the box beyond any hope of repair.

I've been doing this for years, and I still get gooseflesh when I use "dd". It's damn handy but also damn dangerous.

What say ye?

Jim
 
Back
Top