LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Boot Options (https://www.linuxquestions.org/questions/linux-newbie-8/boot-options-419053/)

ubuntuuser 02-24-2006 06:53 AM

Boot Options
 
Is there any way to change which os boots up in the GRUB bootloader?
I am currently running ubuntu 5.10 and I wish to make window$ xp boot first.
Any help would be appreciated.

aus9 02-24-2006 07:04 AM

have a read of my tut or look for the line in your /boot/grub/menu.lst and counting from zero change the DEFAULT number to your preference

Ipsofacto 02-24-2006 07:09 AM

You need to change the /boot/grub/menu.lst file.

In that file will be a "default = <x>" - where x is a number. The number zero will mean it will boot the first entry, number one will mean it will boot the second.

Assuming that windows is your second entry and ubuntu is your first, then you need to change the default to 1 (as opposed to 0).

Are you familiar with editing these types of files using a text editor ?

EDIT - someone can obviously type faster than me!!!

BinJajer 02-24-2006 01:29 PM

[RULE_VIOLATION] Please, post this sticky, any of you mods![/RULE_VIOLATION]
Oh, and you can use the savedefault option. Refer to the grub's man.

pixellany 02-24-2006 01:59 PM

Quote:

Originally Posted by BinJajer
[RULE_VIOLATION] Please, post this sticky, any of you mods![/RULE_VIOLATION]

What on earth are you talking about???

Ipsofacto 02-24-2006 06:47 PM

Had I taken copious amounts of acid, I couldn't of agreed more. Hahahaha!!!

ubuntuuser 02-24-2006 10:17 PM

Quote:

Originally Posted by Ipsofacto
You need to change the /boot/grub/menu.lst file.

In that file will be a "default = <x>" - where x is a number. The number zero will mean it will boot the first entry, number one will mean it will boot the second.

Assuming that windows is your second entry and ubuntu is your first, then you need to change the default to 1 (as opposed to 0).

Are you familiar with editing these types of files using a text editor ?

EDIT - someone can obviously type faster than me!!!

No, I'm not very familiar with the text editor. I tried editing that file once but it was read only (or whatever) and it wouldn't let me change anything.

Ipsofacto 02-24-2006 10:38 PM

Ok, i'm not sure what editor comes with Ubuntu but you should try (as root) either:

pico /boot/grub/menu.lst

(or)

nano -w /boot/grub/menu.lst

Use the cursor keys and scroll down to "default" and providing Windows is your second entry change the entry to "default 1".

Then push <control> O to save (O equalling the letter, not the number), and then enter. Then reboot. You *should* be good to go.

ubuntuuser 02-25-2006 10:19 AM

I got it! This is what I did:
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
savedefault
default 5

You must add "savedefault" for it to use the default number. Thanks for all your help!

aus9 02-26-2006 02:00 AM

actually I disagree...if it works for you good but its actual function (savedefault) is for those people who do not like to edit their menu and want the last booted operating system made the default to the next boot

http://www.gnu.org/software/grub/man...vedefault.html

(2) if you deleted the savedefault line and only had the default line....eg
default 2....

then the third title down is what is booted unless you press the arrow keys or escape key at the menu stage

ubuntuuser 02-27-2006 05:54 PM

Whatever. That's what I did and it works fine for me.

pljvaldez 02-27-2006 06:05 PM

Just so you know in the future how to edit read only files in Ubuntu, from a command line type sudo gedit /path/to/filename where the /path/to/filename is the correct path. That will let you edit as root user using the gui gedit program. If you want to use an simple command line type editor, just change gedit to nano...


All times are GMT -5. The time now is 12:43 AM.