# grub boot order



## jrbuergel (Jan 17, 2004)

How do I change the default operating system order in the Grub boot loader using the Ubuntu 6.06 LTS and dual booted with XP Home ? Now it has Ubuntu kernal as the first and the default, and so I want to have windows XP as the default O/S.


----------



## vtel57 (Jul 12, 2004)

Whichever GRUB entry is first in your menu.lst is the default boot item. Just manually edit your /boot/grub/menu.lst to reflect which item you'd like to boot first. Place it first in the menu.lst. Here's what my menu.lst looks like:



> title Ubuntu --> hda1
> root (hd0,0)
> kernel /boot/vmlinuz-2.6.15-28-386 root=/dev/hda1 ro quiet splash
> initrd /boot/initrd.img-2.6.15-28-386
> ...


Notice that Ubuntu is my default OS. Say, for example, I wanted OpenSuSE as my default... I'd just edit the menu.lst and place SuSE's entry first in the list.

Luck!

~Eric


----------



## jrbuergel (Jan 17, 2004)

How do I log in as a root administrator type so that I have permissions to edit the grub boot order in the menu.lst file with the text editor ?


----------



## vtel57 (Jul 12, 2004)

In terminal:


```
[email protected]:~$ sudo cp /boot/grub/menu.lst menu.lst.backup 
(this will create a backup of your menu.lst file)

[email protected]:~$ sudo gedit /boot/grub/menu.lst
(this will open Gnome Gedit application to allow you to edit the file)
```
*Be very careful what you do with that file. You could corrupt it and you won't be able to boot your machine at all. Just cut the entry for Windows at the bottom and paste it just above the first entry for Ubuntu at the top. Then SAVE, close the Gedit, reboot your machine. It should boot Windows as the default.*

Also, HERE's a great source for info on how GRUB works and how to manipulate it to do what you want it to do.

By the way, unlike most other distributions of Linux, Ubuntu does not have a default ROOT account. The regular users utilize the sudoers privileges to emulate the tasks normally performed by ROOT. This was probably done this way to prevent new Linux users from trashing their systems by accident. *ROOT has the power to destroy... over and over again.* I know. I've trashed a few systems myself as ROOT. You can activate a ROOT account in Ubuntu (I have mine set up). However, for a new Linux user, it's very dangerous.

Luck!


----------



## lotuseclat79 (Sep 12, 2003)

Try inserting a default statement into the grub.conf file:
default=1 should work to make WinXP the default boot if it is listed 2nd in the file
or
default=0 should work to make Linux the default boot if it is listed 1st in the file.

-- Tom


----------

