Sep 30, 2011

Modify grub loader

Modify grub loader Ubuntu

I have a dual boot pc (linux and windows 2000). By default on start up it selects linux and boots it, unless I physically change it into
windows during the specified time interval (8 seconds i guess). I want
to make windows the default os to be booted. how to achieve this
without reinstalling linux.


Solution

All that's needed is for you to modify the grub.conf file. On my system , the file is in /boot/grub/grub.conf. You will have to be su to change it, and you should make a backup of the file just in case. Note that there's a "default= " line high up in the file. In my case, it's default=0 which means that the first listing in the "title" lines that follow (since the count begins from zero) is the one that will be booted as the default, and in my case that's the Fedora kernel.

If I wanted to boot into Windows, I would change the default to a number that corresponds to the position in the list of the entry shown as Other (counting from zero). If you have only two "title" entries, one for Linux and one for Windows, just change the default to default=1, save the file, and you should automatically boot into Windows after you restart. HTH,

Another way around I just cut the loader for windows from the bottom list to the first list in the grub.cfg. Save it and restart, the grub loader now is set to Windows as default OS loader. Remember, when you are not able to save the grub.cfg, it is possible you dont have permission. You need to login as root , change the permission to read and write, modify the file save it and reboot.

*I'm using Ubuntu Distro, I guess most of the Linux command regardless the Distro there is no big differences.

0 COMMENT :

Post a Comment

Related Posts with Thumbnails