LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-19-2005, 08:06 AM   #1
Greebstreebling
Member
 
Registered: Nov 2005
Location: Swansea, Wales, UK
Distribution: debian
Posts: 235

Rep: Reputation: 30
grub configuration didn't work


I followed the instructions in a Linux book to configure Grub but the boot hangs and does nothing.

I have two hard drives one with linux kernel 2.6 k7 (amd processor) and another with windows 98.

Linux will boot ok on its own and I can access the windows disc from Linux but how do I configure grub successfully so that I can choose to boot Linux or Windows 98 at startup?

Thanks for your help on this,
Greeb
 
Old 12-19-2005, 08:09 AM   #2
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
...what does it look like now?
 
Old 12-19-2005, 08:23 AM   #3
coralsaw
Member
 
Registered: Dec 2005
Posts: 35

Rep: Reputation: 15
Also, key in the following command and let us know the output
(assuming you have 2 IDE drives):
Code:
fdisk -l /dev/hda /dev/hdb
/coralsaw
 
Old 12-20-2005, 02:39 AM   #4
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Of course I don't know what is wrong, but GRUB can't boot Windows from a logical partition. So unless WinXP resides on partition 1, 2, 3 or 4 of its hard-disk, I think you'll have to get more creative.
 
Old 12-20-2005, 11:09 AM   #5
Greebstreebling
Member
 
Registered: Nov 2005
Location: Swansea, Wales, UK
Distribution: debian
Posts: 235

Original Poster
Rep: Reputation: 30
Dear all this is what grub looks like so far - my windows bit is at the bottom - everything before that is system generated.

When I pick the windows option at startup, the system just hangs there...

# 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'.
default 0

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

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

## 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 Debian GNU/Linux, kernel 2.6.8-2-k7
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.8-2-k7
savedefault
boot

title Debian GNU/Linux, kernel 2.6.8-2-k7 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.8-2-k7
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27-2-386
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hda1 ro
initrd /boot/initrd.img-2.4.27-2-386
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.4.27-2-386
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# my widows 98 entry follows now
#
title Windows 98
root (hd1,0)
makeactive
chainloader +1
boot

# end of my windows 98 stanza
#
 
Old 12-20-2005, 05:35 PM   #6
jhigz
Member
 
Registered: Jul 2005
Location: Northern California
Distribution: Debian GNU/Linux
Posts: 32

Rep: Reputation: 15
Try removing the 5th line of instruction from the windows portion of the menu.list file.

It should look as follows:

title Windows 98
root (hd1,0)
makeactive
chainloader +1
 
Old 12-21-2005, 07:51 AM   #7
Greebstreebling
Member
 
Registered: Nov 2005
Location: Swansea, Wales, UK
Distribution: debian
Posts: 235

Original Poster
Rep: Reputation: 30
Thanks

Thanks - I tried this but no difference. The system does however recognise it as FAT filesystem, then hangs.

I know that if I take out the disk drives and replace just the windows 98 drive the system does actually boot into windows.

Thanks again for help,
Greeb
 
Old 12-21-2005, 08:19 AM   #8
cuiq
Member
 
Registered: Aug 2004
Location: Philly
Distribution: Debian Lenny, FreeBSD
Posts: 577

Rep: Reputation: 30
try changing this line:

root (hd1,0)

to

root (hd0,0)

Remember that grub starts counting at 0 (zero). So if you have two hard drives hda and hdb grub will count this as (hd0 first drive)and (hd1 second drive). If windows is on the first drive then your grub file should say, (hd0,0)

NOTE: the second 0 is the first partition.


Peace V

Last edited by cuiq; 12-21-2005 at 08:28 AM.
 
Old 12-21-2005, 09:28 AM   #9
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Windows wants to be on the first hard-drive. You are trying to load Win98 from the second hard-drive (that is, root (hd1,0)) without virtual drive swapping. See the GRUB manual:

Quote:
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)

This performs a virtual swap between your first and second hard drive.
http://www.gnu.org/software/grub/man...OS_002fWindows

Of course, in menu.lst, you don't need to type in grub>.
 
Old 12-21-2005, 04:54 PM   #10
Greebstreebling
Member
 
Registered: Nov 2005
Location: Swansea, Wales, UK
Distribution: debian
Posts: 235

Original Poster
Rep: Reputation: 30
Thanks

Thanks I'm sure that will be it. I must have a new years resolution to read more manuals....

Greeb.
 
  


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
grub configuration using yast does not work fremder Linux - Newbie 10 10-07-2005 05:02 AM
GRUB splashimage configuration / update GRUB rudL Linux - Software 1 05-10-2004 07:16 AM
Grub configuration ekoome Red Hat 1 02-14-2004 03:00 AM
commands work with interactive grub, but not in grub.conf richardg Linux - Newbie 2 11-23-2003 04:36 AM
GRUB Configuration Help CletusJones Linux - Newbie 3 10-28-2003 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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