LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting up Wubi-installed Ubuntu to auto-select at startup (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-wubi-installed-ubuntu-to-auto-select-at-startup-773802/)

Rimbaum 12-06-2009 10:06 AM

Setting up Wubi-installed Ubuntu to auto-select at startup
 
Hi!

I know I haven't been very active around here, but I have a question that's been nagging at the back of my mind for a little while now. I installed Ubuntu 9.04 on my Acer Aspire One netbook using the Wubi installer. Now, when I turn on my computer, it allows me to choose between Windows 7 and Ubuntu, but it only gives me somewhere around 7-10 seconds to choose.

Now, a habit I got into in the early mornings while I was getting ready for work was to turn the computer on and walk away for a few minutes to fix breakfast or whatnot. However, I can't do that with my netbook, or it will automatically start up in Windows 7, when, 99% of the time, I want to start in Ubuntu.

My question is this: Is there a way, either in Windows or Ubuntu, to set up the boot menu so that Ubuntu is automatically selected instead of Windows 7? If I had installed Ubuntu normally, I know this would be less of a hassle, but I'd had various frustrating issues trying to install from my USB drive and then found out about Wubi, which made things much easier for a total Linux newbie that had never even set up a computer to dual-boot before.

I'm hoping that there is a way to do this without having to uninstall Wubi and reinstall Linux from my USB drive. It'll take me a better portion of the day, and obviously, I've gotten my settings just the way I want them. It's not that urgent of an issue, just something I'm hoping that it's possible to change.

Thanks in advance for your help!

~Rimbaum

Bratmon 12-06-2009 10:37 AM

You're asking about the Windows bootloader. This belongs in Non-*NIX-General.

Also, this would take you to this.

pixellany 12-06-2009 10:45 AM

Quote:

Originally Posted by Bratmon (Post 3781809)
You're asking about the Windows bootloader. This belongs in Non-*NIX-General.

I respectfully disagree----OP is asking how to boot Linux.

Doesn't the config file for the Windows loader (boot.ini) have an option for setting the default?

Bratmon 12-06-2009 10:55 AM

Quote:

Originally Posted by pixellany (Post 3781814)
I respectfully disagree----OP is asking how to boot Linux.

But, he's not asking ABOUT Linux. He's asking about the Windows bootloader.

Also, if you need specific instructions, please post your boot.ini.

pixellany 12-06-2009 10:57 AM

So now we've agreed to disagree.......:)

Feel free to report it---some other mod may have a different (dis)agreement.

Note that many mods regard "general" as the junk pile to which all manner of nonsense gets relegated.

Rimbaum 12-06-2009 12:06 PM

I've never played with the Windows bootloader, so I wasn't aware that was what I should be looking for. If that is the case, and if this thread belongs somewhere else, a moderator is free to move it. However, I had figured that since my question was related to the Wubi installer for Ubuntu, this was where I should put it.

Erik_FL 12-06-2009 12:41 PM

Quote:

Originally Posted by Rimbaum (Post 3781786)
Hi!

I know I haven't been very active around here, but I have a question that's been nagging at the back of my mind for a little while now. I installed Ubuntu 9.04 on my Acer Aspire One netbook using the Wubi installer. Now, when I turn on my computer, it allows me to choose between Windows 7 and Ubuntu, but it only gives me somewhere around 7-10 seconds to choose.

Now, a habit I got into in the early mornings while I was getting ready for work was to turn the computer on and walk away for a few minutes to fix breakfast or whatnot. However, I can't do that with my netbook, or it will automatically start up in Windows 7, when, 99% of the time, I want to start in Ubuntu.

My question is this: Is there a way, either in Windows or Ubuntu, to set up the boot menu so that Ubuntu is automatically selected instead of Windows 7? If I had installed Ubuntu normally, I know this would be less of a hassle, but I'd had various frustrating issues trying to install from my USB drive and then found out about Wubi, which made things much easier for a total Linux newbie that had never even set up a computer to dual-boot before.

I'm hoping that there is a way to do this without having to uninstall Wubi and reinstall Linux from my USB drive. It'll take me a better portion of the day, and obviously, I've gotten my settings just the way I want them. It's not that urgent of an issue, just something I'm hoping that it's possible to change.

Thanks in advance for your help!

~Rimbaum

You can change the default menu entry or menu timeout using the "BCDEDIT" command from a Windows command prompt. In Windows 7, click on the start button that brings up the menu. Click "All Programs" then click "Accessories". Look for "Command Prompt". Right click on "Command Prompt" and then click (the left mouse button) on "Run as administrator".

First, find out the identifier for the Ubuntu boot entry by displaying the boot database. Type in this command and then press "Enter" to display the database.

bcdedit /enum all /v

Look for the information describing the Ubuntu boot entry. You should be able to recognize it from the "description".

Note the information for "identifier". That is the information in curly braces including the curly braces. Right click anywhere in the command prompt window and click "Mark". Drag the mouse across the identifier including the curly braces to select it. Then click the right mouse button or press "Enter" to copy it to the clipboard.

Scroll the command prompt window down to the line where you can enter a new command.

Enter this command to change the Ubuntu entry to the default.

bcdedit /default {ID}

Replace "{ID}" with the ID that you noted (or copied to the clipboard) in curly braces.

To paste in the ID from the clipboard, type in the command up to that point including the space after "default". Then right click anywhere in the window and click "Paste".

To change the default back to Windows later you can use this command.

bcdedit /default {current}

To change the menu timeout you can use this command.

bcdedit /timeout nn

Replace "nn" with the time-out in seconds. For example:

bcdedit /timeout 30

That will set the menu time-out to 30 seconds. A value of 0 will make the default start immediately with no menu display and a -1 will display the menu forever until a choice is made. NOTE: If you accidentally set the default to 0 and the default choice does not boot the OS, you can press F8 to get the menu at start-up. Then choose a different menu entry.

You can get help from "bcdedit" using the /? command.

bcdedit /?
bcdedit /set /?
bcdedit /default /?


If you need further help you can send me a message or find me in the MySpace computer forums (along with other people).

Rimbaum 12-06-2009 04:00 PM

@pixellany & Bratmon: Windows 7 doesn't appear to have a boot.ini file. Might be something to keep in mind in case this question pops up again.

@Erik_FL: Thank you! That worked beautifully.

pixellany 12-06-2009 04:31 PM

Quote:

Originally Posted by Rimbaum (Post 3782040)
@pixellany & Bratmon: Windows 7 doesn't appear to have a boot.ini file. Might be something to keep in mind in case this question pops up again.

Memo to self: "Stop answering Windows questions."

Erik_FL 12-06-2009 05:38 PM

Quote:

Originally Posted by pixellany (Post 3782057)
Memo to self: "Stop answering Windows questions."

Sometimes I feel that way too. Microsoft keeps changing everything, and it never seems to get simpler, just more and more complicated. The syntax for BCDEDIT is horrible and confusing.

Like the previous "BOOT.INI" file there is also a way to "chain" to a boot sector with the Windows 7 boot loader. That can be useful as an alternative to installing "grub" in the MBR. I suspect that WUBI uses a boot sector file but I've never confirmed that. The sector has to be copied to a file first and the file has to be placed somewhere that Windows can read (like the system root directory). I won't post the details, but it involves more cryptic BCDEDIT commands.

I'm slowly becoming more comfortable using Linux and all the people who help answer my Linux questions on LQ are much appreciated.


All times are GMT -5. The time now is 07:25 AM.