LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 10:39 PM   #1
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 245

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-09-2013, 11:22 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
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-09-2013 at 11:23 PM.
 
1 members found this post helpful.
Old 08-10-2013, 12:10 AM   #3
wlaw
Member
 
Registered: Jun 2004
Location: HK
Distribution: Ubuntu
Posts: 245

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 12:14 AM.
 
Old 08-10-2013, 07:58 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
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, 08:26 AM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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, 09:38 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
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



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

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

All times are GMT -5. The time now is 04:17 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
Open Source Consulting | Domain Registration