2

My computer (Dell XPS M1330) dual boots to Windows 7 or Ubuntu 12.04. I made the mistake of changing the Windows startup options so that it boots to Ubuntu by default, and also displays the choices for 0 seconds.

Obviously my computer boots to Ubuntu automatically, and I need to get to Windows to fix this problem.

Any ideas on how to do that?

Many thanks.

Edit:

I am using a Wubi install. This means that Windows bootloader chain loads GRUB. It also means that I have access to windows files in /host/ as well as being able to mount the hidden system partition.

Pressing F8 at the BIOS screen only flashes the bootloader on screen as it has been doing.

I don't have a Windows DVD. I installed 7 several years ago and have since lost the DVD, this is not a pirated version of Windows.

Edit 2:

I have tried to edit my boot settings using bcdedit.exe in /host/Windows/System32/ using wine, but I get this error message: The boot configuration data store could not be opened.

5
  • 1
    Windows 7 boot loader cannot boot linux natively - did you use a tool for this, like EasyBCD?
    – Paul
    Nov 19, 2012 at 0:37
  • 1
    Honestly, I'm not sure. I installed ubuntu using Wubi, and it "just worked" Nov 19, 2012 at 0:57
  • I used bcdedit to change the settings. Nov 19, 2012 at 1:14
  • Have you tried pressing F8 during boot (right when the boot loader is loading)? Are you shown any boot options menu when you do that?
    – user541686
    Dec 13, 2012 at 0:49
  • Or instead, you could get the ISO directly from Microsoft's certified content host: msft.digitalrivercontent.net/win/X17-59183.iso . Digital River has been their official digital distribution channel, and the above link is perfectly safe and perfectly legal to download from (as it has no key since you are expected to already have that, but you don't need one to do what you want to do)
    – Harsha K
    Dec 19, 2012 at 1:23

7 Answers 7

2
+50

The way to fix this, assuming you're using the Windows boot manager, is to:

  1. Use a Windows DVD to boot.
  2. Click "Repair your Computer"
  3. Select "Restore your computer", and click Next
  4. Click "Cancel" on the two screens that pop up
  5. Click "Command Prompt"

Alternatively, you might be able to press F8 and select the "Repair" option at the top, then bring up a command prompt that way.

In the command prompt, type BcdEdit /timeout 3 and press Enter.
Then type Exit and restart the computer.

4
  • Hi Mehrdad, I have tried using the F8 key. It only flashes the windows bootloader screen without allowing me to select an option. I also don't have my windows dvd, unfortunately. Dec 13, 2012 at 5:27
  • 1
    @BryanGlazer: Oh, okay. You don't need your DVD actually -- any Windows 7 DVD will work. You could also try searching online... I found a quick search on Google turned up this link, although I can't tell whether it's legitimate or not (it seems to be...). But that's by far the easiest way to fix it, so if nothing else, just go ahead and download the Windows 7 Enterprise trial and use that instead.
    – user541686
    Dec 13, 2012 at 5:39
  • Mehrdad, thank you soooo much. I got windows to boot. Unfortunately the link for the repair disk that you provided doesn't work. I found one on a popular torrent tracking site related to pirates and bays. Dec 13, 2012 at 6:53
  • @BryanGlazer: LOL sure, whatever works I guess. xD Just be careful it doesn't come along with extra baggage (spyware) lol.
    – user541686
    Dec 13, 2012 at 6:55
1

You could repair MBR to restore the windows boot loader, but then im not too sure how easy it is to add Ubuntu again, might be easy.

What you would need to do is boot to your windows install disc and run a command (bootrec /fixmbr) in its command prompt that restores the windows bootloader to its default state.

2
  • Thanks Karthik, this would probably solve my problem if I hadn't lost my installation cd. Damnit, this is why I'm never using windows again. Nov 19, 2012 at 1:52
  • I found this for your situation, it should let you fix it without windows CD, careful tho.
    – Karthik T
    Nov 19, 2012 at 2:00
1

Use the ubuntu boot repair and change you boot default to whatever you want. https://help.ubuntu.com/community/Boot-Repair

1
  • Ubuntu Boot Repair is not going to restore the Windows boot loader
    – user541686
    Dec 13, 2012 at 0:46
1

The choice of / fixmbr in MBR rewrites to show default boot Windows, so that the GRUB Bootloader is deleting installed Ubuntu, result: It will not show Dual Boot options. I recommend you reinstall GRUB or modify the timeout in / etc / defaults / grub. Then resintalas and ready, will show all installed operating systems with a longer timeout.

2
  • Reinstalling GRUB is the worst thing you'd want to do... it's just asking for trouble
    – user541686
    Dec 13, 2012 at 0:46
  • @Mehrdad why is it? Dec 15, 2012 at 3:41
1

If you are dual-booting Ubuntu, I would assume you are using the GRUB bootloader. You can hold down shift when booting and that will let you select your OS.

3
  • I'm using the windows bootloader that then chain loads grub. Dec 12, 2012 at 23:36
  • Hmmmm... I see you said you used Wubi to install Ubuntu. It must do it differently than a "normal" dual-boot install. Maybe this "How to Access Windows Boot Manager" ehow.com article will help.
    – ChrisN
    Dec 12, 2012 at 23:55
  • Tried that, and no luck. The boot manager flashes briefly on screen and then disappears and Ubuntu starts. Thanks for the help though! Any other ideas? Dec 13, 2012 at 0:09
1

It looks like most people do not understand your question ... You reminded me, I used to do something similar with Windows 2K and openSUSE a while ago, chain-loading with the Windows boot-manager upfront. I think what you're aiming for is just editing a single configuration file within the Windows system partition (or "EFI partition").

In the old days, you needed to edit a file called boot.ini, now it is some sort of a registry file called "BCD file." There is a reference by Microsoft: http://technet.microsoft.com/en-us/library/cc721886%28v=ws.10%29.aspx or http://technet.microsoft.com/en-us/library/cc731245.aspx etc

Microsoft recommends to edit this file with a Windows command line tool: "bcdedit". But all you need to do is to change the timeout, I guess. So maybe you can locate the registry file (as described my Microsoft) and edit it with a text or hex editor from Ubuntu (*). The timeout is a number, witch can be found only once in this file.

(*) I cant find a sample file on the internet and I have not touched Windows since version 2k. If you find it, you may paste it here or at some convenient place (and place a link here).

Be careful with writing into NTFS partitions ... NTFS-3G is known to do a good job.

(Your best option is really to get a Windows 7 DVD somewhere. You do have a licence, so you can maybe just order another copy. There is some documentation on using bcdedit with wine, but most of it can be found in the bug-tracker of the wine-project, so I would not even touch this option. Besides, I could not find Linux-live-systems, which include utilities for editing this stuff. There is a program called EasyPCD, which is going to be released as a life system for some 25 US bugs, but right now it is not really there. The only real alternative appears to be the successor of the ERD commander, which is only available to enterprise costumers of Microsoft. But it does in fact include something like the bcdeditor. Last but not least, BartPE is an option, theoretically. But again you need a Windows DVD, before you can [legally] create your own PartPE CD/DVD.)

1
  • Thanks, I had tried looking around for a registry file to change the timeout, but I had no luck there. So, I ended up just getting a windows disc and using that to repair the boot options. Dec 19, 2012 at 0:20
0

Maybe it's time to go to a full ubuntu install instead of wubi. Back up your wubi data, pop in an Ubuntu CD, and start fresh. That way, you'll have grub chainloading Windows.

Maybe you need to remove the wubi files before resizing the partitions, when space is an issue on the Windows partition.

I think partition resizing is even an option in the install, if not check out the partimage live cd.

You must log in to answer this question.

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