Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 07-19-2010, 07:07 PM   #1
LQ Newbie
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
Changing the Default OS in GRUB...

How do I change the default operating system in Grub? I'm running Ubuntu and Windows 7. I've done it before but I've forgotten how (old age setting in....I guess).
Old 07-19-2010, 07:38 PM   #2
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,599

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
There is a line near the top that says "default" without quotes. It depends upon which Ubuntu you are using. Ubuntu before version 9.04 used Grub Legacy so counting partitions starts with zero. So if you wanted the second title entry, you would have default 1. This is in the /boot/grub/menu.lst file.

If you are using Ubuntu 9.10 or newer, you will need to modify a file callled /boot/grub/grub.cfg - same line. Note at the top of this file it states explicitly "DO not edit this file"!

Here's a link to a very good tutorial on Grub2 which should explain how to do this in Grub2:
Old 07-24-2010, 06:47 PM   #3
Registered: Nov 2009
Location: mote of dust suspended in a sunbeam
Distribution: Arch Linux / Ubuntu 10.10
Posts: 40

Rep: Reputation: 17
The correct file to edit in grub2 should be /etc/default/grub
It might look something like:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
You would change the "GRUB_DEFAULT=N" to correspond to the entry you wanted. Obviously, after editing the file you must run
sudo update-grub

Last edited by spiderbatdad; 07-24-2010 at 06:49 PM.
Old 07-25-2010, 03:24 AM   #4
Registered: Jul 2010
Distribution: Ubuntu 9.10
Posts: 52

Rep: Reputation: 1
Hi -

I've just got a question about this. What if you wanted to change only the display sequence in grub 2 (Ubuntu 9.10) and not which o/s boots first or is the deault o/s?

In previous versions of grub you could just copy & paste the lines in /boot/grub/menu.lst, but this version of grub doesn't allow you to edit /boot/grub/grub.cfg...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing default root in GRUB... zero_cool666 Linux - Software 1 04-19-2008 12:13 PM
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
changing the default in grub hari78 Linux - Newbie 2 06-03-2005 10:43 AM
Changing default OS in Grub .95 gautcha Linux - Newbie 8 05-03-2005 11:30 PM
changing grub boot default tumnus Linux - Newbie 2 02-04-2003 03:53 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration