0

There are many posts here about how to boot into Windows with Ubuntu installed, can't find any about my specific scenario...

I have a ProLiant server running Ubuntu, and it's useful sometimes to be able to test things on an Ubuntu desktop, so I installed it onto my laptop as a "secondary" operating system. I only use it once a week or so, while I use Windows on the machine daily.

I'd like to boot by default into Windows, and have an option at startup to boot into Ubuntu, currently it's the other way around. I believe I have to use GRUB for this, but am not sure. Can anyone advise how I can go about this? Also, I can't reformat the machine as it's a factory installation and I don't have the Windows license key sticker. I'm waiting for Windows 10 and will install that as soon as it's available, at that point I may have the recovery options and such.

If it helps, I'm running Windows 8.1 and the latest LTS of Ubuntu (well, it was the latest 2 months ago when I bought the laptop).

Thanks in advance

XtrmJosh
  • 363

2 Answers2

2

You should edit /etc/default/grub.

Edit the file by opening a terminal and executing sudo nano /etc/default/grub. Navigate with the arrow keys. Once you have finished editing the file according the following instructions, press ctrl + o to save, and then ctrl + x to exit.

Change the line GRUB_DEFAULT=0 to 'GRUB_DEFAULT=<the description of your OS>' or 'GRUB_DEFAULT=<the index of the OS you wish to launch>.

The description of your OS is found in the grub loader at start up. For example if the first option says something like Ubuntu 64bit (on /dev/sda1), then you would change that line to GRUB_DEFAULT=Ubuntu 64bit (on /dev/sda1).

The index is n - 1 for the n'th option. So the first option is option 0. The second option is option 1. If windows is the third option, you can change it to GRUB_DEFAULT=2. If windows is the second option, you can change it to GRUB_DEFAULT=1.

After you make the change to /etc/default/grub, run sudo update-grub. Everything you do must be done as root. If you need help changing the file I can elaborate.

1

Use 'grub-customizer' as it's much more friendly then modifying text file.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

enter image description here enter image description here

You will be able to figure out how to modify it properly via this tool, because it's really intuitive - that's for sure!

You update grub with upper left corner button: Save

RiddleMeThis
  • 1,076
  • 8
  • 17