On my system I have Ubuntu 9.10 – the Karmic Koala, and Windows 7. I use Ubuntu 9.1 mostly and my dad and sister uses Windows. By default, Grub loads Ubuntu and it gives us only 10 seconds to choose Windows if we want to. My dad don’t know much about Linux, so whenever Ubuntu loads by default he faces a problem and I am the only one who uses linux in my house, so I decided to change the way how bootloader works. I decided to load Windows 7 by default and increase the timeout to 30 seconds. I changed the Grub bootloader in the following way…
The Grub bootloader configuration is saved in the file called grub.cfg. The location of grub.cfg is /boot/grub/grub.cfg. By default, grub.cfg is write protected. We cannot change the configuration just by merely opening it with gedit or other text editing software. The first thing I did is to make grub.cfg writable. To make it writable I used the following command.
sudo chmod +w /boot/grub/grub.cfg
Grub.cfg is now writable. Open grub.cfg with text editing software like gedit. Search for the line
set default=”0″
Now change the value “0″ to “4″.
Is there any logic behind this?
Yes. there is logic in this. Whenever I start my system, grub shows me Ubuntu 1st, 2nd is Ubuntu recovery, 3rd and 4th places are also related to Ubuntu and 5th option is Windows 7. In the line set default=”0″ 0 indicates the first option, that is Ubuntu. I want Windows 7 that is 5th option to be default, so I changed that default value 4 (since the value starts from 0, the 5th value will be 4). After changing the value to 4, just save the file (ctrl+S).
Note : If Windows has different position in your bootloader, then change “0″ to that respective value.
Changing the timeout duration :
By default, the timeout duration for grub is 10 seconds. Now I want to increase the duration to 30 seconds. This is what I’ve done, I searched for the line
set timeout=10
Just changed it to 30. Now grubs waits 30 seconds to timeout. You can set your own time duration, but in seconds only. If you want grub to wait 5 minutes, then you have change the value “10″ to “300″, i.e. 300 seconds (5 mins). I tried it and it worked like a charm.
Like this post! you may want to subscribe to my RSS feed or through email. You can become our fan on Facebook. Follow us on Twitter. Thanks for visiting!





Recent Comments