Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I installed Precise on my friend's computer to use it, but it automatically boots into Precise. He has Xp and wants it to boot into Xp automatically.

How can I set Windows Xp to be the primary boot operating system?

share|improve this question

marked as duplicate by muru, user68186, Seth Dec 1 at 19:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
The duplicate above has a much better answer. –  prolink007 Nov 20 '12 at 3:29

3 Answers 3

up vote 0 down vote accepted

You have to edit the grub.cfg located at /boot/grub. Change the order OS menu entries in the file.

You can even set time out before the OS is chosen automatically.

Go through this https://help.ubuntu.com/community/Grub2/CustomMenus

Be very careful while editing grub.cfg

share|improve this answer
    
Sorry but editing grub.cfg is absolutely not recommended for regular usage. The next time update-grub is run, your edits are removed. One could tinker with the contents of /etc/grub.d/, but that's still not the intended way of doing it. Only when you have a non-functional grub.cfg, because you put the drive in another computer, then you can edit grub.cfg, but you'd run update-grub as soon as you can boot the OS to generate a proper grub.cfg. –  LiveWireBT Jul 22 '12 at 15:26

You can do this by editing /etc/default/grub:

sudo nano /etc/default/grub

You can change the value for GRUB_DEFAULT= to

  • a certain number, which is not recommended, because the menu entries can change,
  • a string like "Windows XP" or however the entry for Windows XP is named; or
  • save the last used entry with GRUB_DEFAULT=saved and adding GRUB_SAVEDEFAULT=true

after you have made the changes, press Ctrl+o to save and Ctrl+x to leave. Then run sudo update-grub to apply the changes.

I recommend the last option, it's the least annoying option in most cases, unless you boot into another OS each time you reboot.

See also the community documentation for Grub2 and Grub2/Setup.

share|improve this answer

I followed another forum that used a GUI called grub-customizer

How do I change the GRUB boot order?

It was simple and easy and didn't involve you accidentally messing up on the command line or in nano. This way if you install another OS and it changes the boot order again, you can quickly and easily change it to the way you want!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.