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.

Enable and Disable Ubuntu Root Password

Enable and Disable Ubuntu Root Password

Ubuntu is one of the few Linux distributions out there that will not enable the root account.If you want to do something with root permission on the console you have to type sudo before the command.


sudo” means superuser do. “sudo” will prompt for “Password:”. Please specify user password

As you have noticed during the Ubuntu installation there was no question about the root password, as you might have been used to see during other Linux distribution installation process.Because of this your root accout is inactive.

If you want to enable root account (which is not recommended) enter the following command.

$sudo passwd root

This will prompt for a new root password and once you confirm it, you can start using the root account to login.

If you want to disable root account in ubuntu you need to lock the root account by using the following command

$sudo passwd -l root

If you want to work on a root console you’d better use the following command

$sudo -i
Related Posts with Thumbnails