LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2013, 11:39 PM   #1
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Rep: Reputation: 30
How to change the boot sequence in Grub ?


I am running Ubuntu 12.0.4, and would like to change the boot sequence in Grub (I believe). How can this be done ? Thank you !
 
Old 08-10-2013, 12:22 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,377

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
What do you want to change about it? They show on screen in your menu the way they are listed in the grub.cfg file. If you want to change which boots by default, change the entry in /etc/default/grub file:

Quote:
GRUB_DEFAULT=0
You will see a line like the one above. Change the 0 to whichever default you want. Counts from zero rather than one.
If that's not what you're looking for, be more specific.

Last edited by yancek; 08-10-2013 at 12:23 AM.
 
1 members found this post helpful.
Old 08-10-2013, 01:10 AM   #3
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 242

Original Poster
Rep: Reputation: 30
Thank you !I have two OS, one is Winxp and the other one is Ubuntu, I want to change the default OS to boot is WinXP instead of Ubuntu. But the way, any GUI apps that help ? I don't familiar with the OS and the path and the text editors.

Last edited by wlaw; 08-10-2013 at 01:14 AM.
 
Old 08-10-2013, 08:58 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,377

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Boot Ubuntu. Hold down the Ctrl+Alt+t keys simultaneously. This will open a terminal where you type: sudo cat /boot/grub/grub.cfg. This will open the grub.cfg file. Look at the entries which begin with 'menuentry' and count down to the one for xp. Make a note of it. At the prompt in the terminal, type: sudo gedit /etc/default/grub. This will open that file and you can edit the line I refer to above. Replace the zero (0) with whatever number you have from the xp entry. Save and close and reboot.
 
Old 08-10-2013, 09:26 AM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,910

Rep: Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999Reputation: 1999
As I understand it Ubuntu uses GRUB2 so editing grub.cfg manually isn't a good idea and won't survive an update to any packages involved in booting either. This thread on the Ubuntu forums explains how to change the default entry, amongst other things:
http://ubuntuforums.org/showthread.php?t=1302743
 
Old 08-10-2013, 10:38 AM   #6
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,214

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
sudo gedit /etc/default/grub. This will open that file and you can edit the line I refer to above. Replace the zero (0) with whatever number you have from the xp entry. Save and close and reboot
run
Code:
sudo update-grub
before rebooting for the changes to take effect.
 
  


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
[SOLVED] How to change boot sequence? kishor joshi Linux - Newbie 2 07-31-2013 04:05 AM
[SOLVED] Boot sequence change scopiansl Linux - Server 1 09-30-2011 04:44 AM
[SOLVED] Change Boot sequence cliffd7 Linux - Newbie 3 09-26-2010 06:41 AM
how can I change the boot sequence? stevendkurtz Linux - Newbie 6 01-13-2008 08:25 PM
How can I change my boot sequence chinaundead Mandriva 4 03-11-2004 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:26 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration