Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
grub boot order

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
jrbuergel's Avatar
Computer Specs
Senior Member with 503 posts.
 
Join Date: Jan 2004
Location: Washington state
Experience: Intermediate
19-Mar-2007, 02:16 PM #1
Question grub boot order
How do I change the default operating system order in the Grub boot loader using the Ubuntu 6.06 LTS and dual booted with XP Home ? Now it has Ubuntu kernal as the first and the default, and so I want to have windows XP as the default O/S.
vtel57's Avatar
Computer Specs
Senior Member with 708 posts.
 
Join Date: Jul 2004
Location: Tampa, Florida, USA
Experience: Intermediate
19-Mar-2007, 02:27 PM #2
Whichever GRUB entry is first in your menu.lst is the default boot item. Just manually edit your /boot/grub/menu.lst to reflect which item you'd like to boot first. Place it first in the menu.lst. Here's what my menu.lst looks like:

Quote:
title Ubuntu --> hda1
root (hd0,0)
kernel /boot/vmlinuz-2.6.15-28-386 root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.15-28-386
savedefault
boot

title Ubuntu --> hda1 (S A F E)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15-28-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.15-28-386
boot

title Ubuntu --> memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
___________________________________________________________________________ _
# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other Operating Systems
root

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda5.
title Debian Etch --> hda5
root (hd0,4)
kernel /boot/vmlinuz-2.6.18-3-486 root=/dev/hda5
initrd /boot/initrd.img-2.6.18-3-486
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda7.
title Fedora Core 6 --> hda7
root (hd0,6)
kernel /boot/vmlinuz-2.6.19-1.2911.fc6 root=/dev/hda7
initrd /boot/initrd-2.6.19-1.2911.fc6.img
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda9.
title OpenSuSE 10.1 --> hda9
root (hd0,8)
kernel /boot/vmlinuz root=/dev/hda9 vga=0x31a resume=/dev/hda17 splash=silent showopts
initrd /boot/initrd
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda9.
title OpenSuSE 10.1 --> hda9 (S A F E)
root (hd0,8)
kernel /boot/vmlinuz root=/dev/hda9 vga=normal showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
initrd /boot/initrd
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda11.
title Slackware 11.0 --> hda11
root (hd0,10)
kernel /boot/vmlinuz root=/dev/hda11
initrd /boot/initrd.gz
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda13.
title Foresight Desktop Linux --> hda13
root (hd0,12)
kernel /boot/vmlinuz-2.6.19.2-0.2.smp.gcc3.4.x86.i686 root=/dev/hda13
initrd /boot/initrd-2.6.19.2-0.2.smp.gcc3.4.x86.i686.img
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hda15.
title Mandriva 2007 --> hda15
root (hd0,14)
kernel /boot/vmlinuz root=/dev/hda15 resume=/dev/hda17
initrd /boot/initrd.img
savedefault
boot

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows XP Pro SP2 --> sda1 (RAID 1)
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
Notice that Ubuntu is my default OS. Say, for example, I wanted OpenSuSE as my default... I'd just edit the menu.lst and place SuSE's entry first in the list.

Luck!

~Eric
__________________
~V.T. Eric Layton
***Tempus Fugits***
jrbuergel's Avatar
Computer Specs
Senior Member with 503 posts.
 
Join Date: Jan 2004
Location: Washington state
Experience: Intermediate
19-Mar-2007, 03:15 PM #3
Question edit permissions
How do I log in as a root administrator type so that I have permissions to edit the grub boot order in the menu.lst file with the text editor ?
vtel57's Avatar
Computer Specs
Senior Member with 708 posts.
 
Join Date: Jul 2004
Location: Tampa, Florida, USA
Experience: Intermediate
19-Mar-2007, 03:59 PM #4
In terminal:

Code:
 jrbuergel@Ubuntu:~$ sudo cp /boot/grub/menu.lst menu.lst.backup 
(this will create a backup of your menu.lst file)

jrbuergel@Ubuntu:~$ sudo gedit /boot/grub/menu.lst
(this will open Gnome Gedit application to allow you to edit the file)
Be very careful what you do with that file. You could corrupt it and you won't be able to boot your machine at all. Just cut the entry for Windows at the bottom and paste it just above the first entry for Ubuntu at the top. Then SAVE, close the Gedit, reboot your machine. It should boot Windows as the default.

Also, HERE's a great source for info on how GRUB works and how to manipulate it to do what you want it to do.

By the way, unlike most other distributions of Linux, Ubuntu does not have a default ROOT account. The regular users utilize the sudoers privileges to emulate the tasks normally performed by ROOT. This was probably done this way to prevent new Linux users from trashing their systems by accident. ROOT has the power to destroy... over and over again. I know. I've trashed a few systems myself as ROOT. You can activate a ROOT account in Ubuntu (I have mine set up). However, for a new Linux user, it's very dangerous.

Luck!
__________________
~V.T. Eric Layton
***Tempus Fugits***

Last edited by vtel57 : 19-Mar-2007 04:08 PM.
lotuseclat79's Avatar
Distinguished Member with 14,988 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
19-Mar-2007, 04:36 PM #5
Try inserting a default statement into the grub.conf file:
default=1 should work to make WinXP the default boot if it is listed 2nd in the file
or
default=0 should work to make Linux the default boot if it is listed 1st in the file.

-- Tom
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:13 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.