LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-01-2008, 01:01 PM   #1
toolfan2k4
LQ Newbie
 
Registered: Apr 2008
Location: New York
Distribution: Ubuntu 7.10
Posts: 3

Rep: Reputation: 0
Need to have GRUB autoload windows instead of linux.


Hello, I am new to linux and dual booting so please forgive any ignorance on my part. My question is how do I get GRUB to auto boot windows instead of linux as it does by default. What I mean is when I start my computer GRUB loads linux if I do not tell it to load windows. I would rather it go right into windows unless I tell it to go to linux.....is this possible? I hope so as I use windows more then linux and I find it rather inconvenient to have to watch the screen during boot when I can spend the time doing other tasks. Also I have each os on separate HDs, win XP Pro and the latest Distro of Debian Linux. Any help is much appreciate thanks!!


Matt
 
Old 04-01-2008, 01:04 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Edit the file /boot/grub/menu.lst. Somewhere in the file it says "default 0". 0 corresponds to the first entry on the list, 1 to the 2nd, 2 to the 3rd, etc. So just change the 0 to whatever entry you need it to be. If you post the contents of the file, we can help you out specifically.
 
Old 04-03-2008, 10:17 AM   #3
toolfan2k4
LQ Newbie
 
Registered: Apr 2008
Location: New York
Distribution: Ubuntu 7.10
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pljvaldez View Post
Edit the file /boot/grub/menu.lst. Somewhere in the file it says "default 0". 0 corresponds to the first entry on the list, 1 to the 2nd, 2 to the 3rd, etc. So just change the 0 to whatever entry you need it to be. If you post the contents of the file, we can help you out specifically.

Well I appreciate the help as for it working or not I cannot yet say as I am having some troubles reinstalling linux. Think I may just go with two machines rather then a dual boot.....but I wanted to avoid the extra power consumption of another PC.
 
Old 04-07-2008, 10:43 AM   #4
toolfan2k4
LQ Newbie
 
Registered: Apr 2008
Location: New York
Distribution: Ubuntu 7.10
Posts: 3

Original Poster
Rep: Reputation: 0
Ok, I could not find any section marked "default 0" I have pasted the code from my file below maybe someone could show me where it is? Any help is much appreciated!



Code:
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=86905922-b749-473c-ba8a-220d8deb7294 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Ubuntu 7.10, kernel 2.6.22-14-generic
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=86905922-b749-473c-ba8a-220d8deb7294 ro quiet splash
initrd		/boot/initrd.img-2.6.22-14-generic
quiet

title		Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=86905922-b749-473c-ba8a-220d8deb7294 ro single
initrd		/boot/initrd.img-2.6.22-14-generic

title		Ubuntu 7.10, memtest86+
root		(hd1,0)
kernel		/boot/memtest86+.bin
quiet

### 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 a non-linux OS
# on /dev/hda1
title		Microsoft Windows XP Professional
root		(hd0,0)
savedefault
makeactive
chainloader	+1
 
Old 04-07-2008, 06:00 PM   #5
momist
LQ Newbie
 
Registered: Dec 2004
Location: Lancashire, UK
Posts: 17

Rep: Reputation: 1
Hi toolfan2k4,

My own menu.lst has the following very near the top of the file:
code:
Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default		0

It's that last line which determines which system gets loaded (I only have Ubuntu on mine, so it's set to 0). It looks to me like you only quoted the last part of your grub menu.lst _or_ that it has got corrupted.

There's a utility called SuperGrub which makes a live CD for rescuing broken boot systems.
 
Old 04-07-2008, 06:27 PM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Actually, you have your grub set to save the last booted option as the default (that's what the line "savedefault" does). You need to remove that line, add a line "default 0" near the top of the file, and change the line "updatedefaultentry=false" to "updatedefaultentry=true".

HTH

Forrest
 
Old 04-07-2008, 06:29 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,990

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
You might try changing this entry:

[HTML]## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,0)[/HTML]

Delete the hash mark to the left of the 'groot' and change the(hd1,0) to (hd0,0).

If you don't have a defaul entry, I believe Grub boots the first entry in the file so if the above doesn't work, you could try putting your entry for windows above your first ubuntu entry, right after the ##End Default Options##.
 
Old 04-07-2008, 06:38 PM   #8
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
DO NOT remove the hash mark from the groot entry. This is only used for grub-update, not grub itself. It may (and I'm guessing will) make your system non-bootable, if not now, then when you next update your kernel. Grub-update uses the commented options to determine what it needs to do when you update your kernel and a new menu.lst (or grub.conf) file is created.

HTH

Forrest
 
  


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
Help of GRUB, How to Linux, Windows XP and Windows 200 ERBRMN Linux - General 4 04-25-2006 09:26 PM
Help Windows and Linux (GRUB) vaneeri Red Hat 4 10-08-2004 02:56 AM
Grub, Windows 2k and Linux kaner Linux - Software 8 08-31-2003 03:47 PM
Boot windows 98,windows XP and linux by GRUB Swift&Smart Linux - General 6 02-22-2003 10:11 AM
installing Windows XP + Linux + Grub GoldenWing Linux - Software 1 02-24-2002 11:39 AM


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