Just in case you are a Computer Multi-Boot guy like me, this might be of help, now or later. My linux box is presently dual boot: Windows-7 was installed first, then later added Ubuntu. The boot menu lists Windows-7 as the last(fifth) boot option.

While booting, my boot-menu looks like this..(below), thus, I have to use my keyboard to manually select Windows option just to boot into it.

Scenario: I needed to connect remotely to the box and boot into Windows7. Ubuntu was booted up, but I needed Windows. So I had to change the boot option, reboot and get my life running.

grub-boot-change1

Presently, Ubuntu is default, but here is how to change it.

Launch terminal, and display grubs menuentries to confirm:

Command: cat /boot/grub/grub.cfg | grep menuentry.

In the screenshot below, I cd'd into the /boot/grub directory before grepping for menuentry. Windows-7 is listed as the 5-th option, in reality, its the 4th: numbering of entries begins at 0(zero).

grub-boot-change2

Next, edit grub at /etc/default/grub.

Command: nano /etc/default/grub

In the below screenshot, I will make changes as follows:
before: GRUB_DEFAULT=0
after: GRUB_DEFAULT=4
Once the changes are made, save the file, and exit

grub-boot-change3

After file is saved, update grub as follows:

Command: update-grub

grub-boot-change5

Rebooting my box, the cursor is at the default setting: Windows-7

grub-boot-change6

ps: I took the first and last screenshots with my phone, hence the difference in sharpness

Hope you enjoyed this tutorial. Comments are welcome and your requested tutorials are welcome as well.

Add comment


Security code
Refresh