LinuxQuestions.org
Visit Jeremy's Blog.
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 01-06-2010, 07:01 AM   #1
izzion.a
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Rep: Reputation: 0
Booting Windows before LInux in Grub


I have previously read some of the posts above and i still can't figure out a way to boot Windows FIRST before LInux.
I have therefore decided to copy past my Menu.lst file here hoping someone could tell me what to change.
_________________________________________________________________

# 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

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## 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=ecedd530-034c-467f-8586-8ab0bf010aef ro

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

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

## 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 8.04.3 LTS, kernel 2.6.24-26-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-26-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-26-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-26-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-26-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-26-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-25-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-25-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-25-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-25-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-24-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-24-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-24-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-24-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-23-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-22-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-22-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-22-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-22-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-21-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-21-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-21-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-19-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-19-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-19-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-386
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-386 root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.22-14-386
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-386 (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-386 root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.22-14-386

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 8.04.3 LTS, memtest86+
root (hd0,2)
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/sda1
title Windows 7 Ultimate
root (hd0,0)
savedefault
makeactive
chainloader +1
 
Old 01-06-2010, 07:08 AM   #2
izzion.a
LQ Newbie
 
Registered: Jan 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Booting Windows before LInux in Grub

How do i boot my WIndows partition in grub before my linux partition?
here is my menu.lst file. Can someone please tell me what to modify in order for grub to boot Windows FIRST?
_______________________________________________________________________

# 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

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## 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=ecedd530-034c-467f-8586-8ab0bf010aef ro

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

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

## 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 8.04.3 LTS, kernel 2.6.24-26-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-26-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-26-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-26-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-26-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-26-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-25-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-25-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-25-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-25-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-24-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-24-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-24-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-24-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-23-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-22-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-22-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-22-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-22-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-21-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-21-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-21-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-19-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-19-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.24-19-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-386
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-386 root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.22-14-386
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-386 (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-386 root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.22-14-386

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.22-14-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ecedd530-034c-467f-8586-8ab0bf010aef ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 8.04.3 LTS, memtest86+
root (hd0,2)
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/sda1
title Windows 7 Ultimate
root (hd0,0)
savedefault
makeactive
chainloader +1
 
Old 01-06-2010, 07:25 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
chang this line
Quote:
default n
where n is a number position of your windows entry, starting from 0.
I would also suggest to first remove the older kernels you don't use any more, using synaptic

Last edited by repo; 01-06-2010 at 07:26 AM.
 
Old 01-06-2010, 07:29 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
First, clean up your grub menu
http://www.linuxquestions.org/questi...kernel-466660/
... you want to keep the last two kernels at most.

Next, find this bit:

## 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

You can change the number after "default" to the number of the windows entry - if you keep two kernels, that will probably be 6.

default 6

OR - change the number to the word "saved"

default saved

next, boot to windows (selected by the menu), after you next restart, all subsequent boots will default to windows first.
 
Old 01-06-2010, 08:01 AM   #5
Noobish
LQ Newbie
 
Registered: Dec 2009
Location: UK
Distribution: Fedora 12
Posts: 10

Rep: Reputation: 1
Hi izzion.a,

Make a copy of menu.lst first. Open up a terminal and enter the following:
Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.original
This will make a copy of your current grub menu.

Now you can edit menu.lst...

Cut the following lines:

Quote:
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows 7 Ultimate
root (hd0,0)
savedefault
makeactive
chainloader +1
and paste it below the line:

Quote:
## ## End Default Options ##
You can then comment out:

Quote:
title Other operating systems:
root
You do this by putting "#" at the start of those lines.

Save the changes and reboot your machine. The default entry should now be windows.
 
  


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 with GRUB booting binary operating systems windows and Linux(Ubuntu) nate11120 General 1 01-27-2009 10:20 PM
GRUB not booting to windows qwert1029in Linux - Newbie 1 07-08-2006 08:00 PM
how to hide GRUB bootloader while booting a duel boot system ( linux/windows ) ? dommini Linux - General 0 12-03-2003 04:48 AM
GRUB windows xp not booting mirage Linux - Newbie 2 05-14-2003 03:10 PM
booting windows xp with grub! help!! fisch79 Linux - Software 1 02-20-2003 10:03 PM

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

All times are GMT -5. The time now is 01:48 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