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

Notices


Reply
  Search this Thread
Old 07-19-2010, 07:07 PM   #1
Norfolk_Newbie
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
yancek
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:

http://www.dedoimedo.com/computers/g...mozTocId205199
 
Old 07-24-2010, 06:47 PM   #3
spiderbatdad
Member
 
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:
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
You would change the "GRUB_DEFAULT=N" to correspond to the entry you wanted. Obviously, after editing the file you must run
Code:
sudo update-grub

Last edited by spiderbatdad; 07-24-2010 at 06:49 PM.
 
Old 07-25-2010, 03:24 AM   #4
meridius10
Member
 
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...


Thanks
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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

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