LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 07-29-2005, 05:02 PM   #1
sall
Member
 
Registered: Apr 2005
Posts: 50

Rep: Reputation: 15
Unhappy add windows install to GRUB menu


I have an 80 gig External Hardrive partitoned twice. I want to Install windows xp on one of the partitons and then be able to boot windows if I want through GRUB. I am not sure how to go about telling GRUB to see the Windows OS when booting GRUB. Any information is appreciated.
 
Old 07-29-2005, 05:09 PM   #2
bushidozen
Member
 
Registered: Oct 2004
Posts: 215

Rep: Reputation: 30
I got this from another forum:

First you need to figure out on what partition/drive your Windows install is. If you don't know this already, a realtively easy way to find out is to run, in a terminal, as root fdisk -l. That should print a lot of stuff, you're interested in the line that says "W95", "NTFS", anything relating to Windows, or something that has * on the second column, line thats hould look something like this:

/dev/hda2 * 7 898 7164990 7 HPFS/NTFSThe magic string you're looking for is of the form: (hdX,Y)
X is the number of the drive, counted from 0. So, if you only have one drive, or the one you have Windows installed on is the first, X is 0. If it's the second, it's 1 and so on.
Y is the number of the partition, taken from above (/dev/hda2), minus 1.
So, in our case, the magic string is (hd0,1).

Edit your /boot/grub/menu.lst file, either by typing file:///boot/grub/menu.lst in your favourite browser (either Nautius, or Konqueror), which should, theoretically, spawn an editor. Failing that, in a terminal, run vi /boot/grub/menu.lst. Don't worry, I'll also tell you how to work vi. :-)

If in vi, press i to enter insert mode. Then add the following, under a similar entry:


title Windows install
rootnoverify (hd0,1)
makeactive
chainloader +1
bootIf in vi, press Escape, to go into command mode, then type :wq and press enter to save and quit. Then reboot and enjoy.
 
Old 07-29-2005, 05:35 PM   #3
sall
Member
 
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Bushidozen,
I tried both ways u suggested, neither worked to edit the file. So i used this command in terminal:

sudo gedit /boot/grub/menu.lst

This is what is produced:


#
# 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 optons 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 specifiv 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=root=/dev/hda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,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

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

## nonaltoption boot targets option
## This option controls options to pass to only the
## primary kernel menu item.
## You can have ONLY one nonaltoptions line
# nonaltoptions=quiet splash

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

## ## End Default Options ##

title Ubuntu, kernel 2.6.10-5-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot

title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Where do I insert the:

title Windows install
rootnoverify (hd0,1)
makeactive
chainloader +1

Do I insert it after the mem test? or does it matter?
 
Old 07-29-2005, 05:39 PM   #4
bushidozen
Member
 
Registered: Oct 2004
Posts: 215

Rep: Reputation: 30
It does not matter.
 
Old 07-29-2005, 05:41 PM   #5
bushidozen
Member
 
Registered: Oct 2004
Posts: 215

Rep: Reputation: 30
Make sure you add "boot" after "chainloader +1" so that it looks like:

chainloader +1
boot
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add Windows XP to Grub boot loader? LUB997 Linux - Software 29 10-17-2009 11:11 AM
Add "Boot CD" to GRUB menu Napalm Llama Linux - General 7 06-10-2005 08:56 AM
GRUB - How to add Windows to boot menu? geekgyrrrl Linux - Newbie 4 06-04-2005 10:02 PM
syntax for grub.conf to add win98 to bootloader menu 7689mich Linux - Newbie 3 08-26-2004 12:13 AM
GRUB Boot menu with SuSE9.0 and Windows 2000 Advanced Server SteveK1979 Linux - Newbie 4 02-19-2004 04:05 AM


All times are GMT -5. The time now is 07:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration