LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-29-2007, 04:18 PM   #1
nicepen
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Rep: Reputation: 0
Unusual problem with GRUB


I'm having trouble getting my windows installation to show up in GRUB. I'm using Ubuntu 7.04 i386 desktop, and somewhere on here I have Windows XP Pro SP2. I will include my "fdisk -l" results and my "/boot/grub/menu.lst" at the bottom.

A few months ago I installed windows and knew I was going to be installing linux and maybe bsd or gentoo at some point so I made 5 partitions. forget about bsd and gentoo for now, I will deal with adding them some other day. After using windows for some time, I have decided to add Ubuntu. I installed it hoping the installer would see windows and add it to GRUB but it hasn't. I have read other forums and received help from someone and I can get GRUB to go as far as telling me "Starting up..." (when i select "windows") however it does not do anything after that, it just stalls there. (The configuration I use to get to this point will be in the menu.lst below) and ubuntu is working fine.

Thanks,
Aaron

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1020 8193118+ 83 Linux
/dev/sda2 1021 9728 69947010 f W95 Ext'd (LBA)
/dev/sda5 1021 2677 13309821 7 HPFS/NTFS
/dev/sda6 2678 9561 55295698+ e W95 FAT16 (LBA)
/dev/sda7 9562 9728 1341396 82 Linux swap / Solaris

/boot/grub/menu.lst:

# 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 change this entry to 'saved' 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 3

## 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=6660f340-10b9-4202-9f74-09a2afd56c09 ro

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

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

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

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=6660f340-10b9-4202-9f74-09a2afd56c09 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=6660f340-10b9-4202-9f74-09a2afd56c09 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=6660f340-10b9-4202-9f74-09a2afd56c09 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=6660f340-10b9-4202-9f74-09a2afd56c09 ro single
initrd /boot/initrd.img-2.6.20-15-generic

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

title windows
root (hd0,4)
chainloader +1

### END DEBIAN AUTOMAGIC KERNELS LIST
 
Old 06-29-2007, 04:27 PM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
That entry for Windows should be below the ### END DEBIAN AUTOMAGIC LIST, in the section for other operating systems.
 
Old 06-29-2007, 04:33 PM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Windows needs to be in a primary partition, preferably the first one to avoid mapping it, you have it in a logical partition.
 
Old 06-29-2007, 04:57 PM   #4
nicepen
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Junior Hacker
Windows needs to be in a primary partition, preferably the first one to avoid mapping it, you have it in a logical partition.
Thank you, how do I do that? I don't know how bad mapping is but I would like to avoid reinstalling if possible, I'm just not in the mood for that this week
 
Old 06-29-2007, 05:14 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Mapping is not bad--it works fine.

I just now stumbled into this:
http://www.faqs.org/docs/Linux-HOWTO...rub-HOWTO.html

It appears to address a situation very similar to yours--ie Windows on a logical partition.

A lot of GRUB docs only talk about mapping between two drives. In this article, they have mapping betwee partitions.
 
Old 06-29-2007, 10:13 PM   #6
nicepen
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you for that link, that is the closest thing to what I need so far. however, it's still a no go. He is explaining how to setup grub, pre windows install. I changed my menu.lst according to what he recommended and first I got an error that didn't work at all, then I changed the partition numbers from 2 to 4 (since my partition is sda5) and I got to the screen that says "Starting up..." If anyone has anymore ideas that would be nice. Since I'm getting to the "Starting up..." screen and nothing is happening is it possible that my mbr or something for windows booting has been damaged or changed, therefore causing GRUB to call windows but windows doesn't know what to do?

Here is what I put in my menu.lst to get to the "Starting up..." screen

title Windows 98
map (hd0,0) (hd0,4)
map (hd0,4) (hd0,0)
rootnoverify (hd0,4)
chainloader +1

Thank you for your help everyone!
 
Old 06-29-2007, 11:19 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by nicepen
... but I would like to avoid reinstalling if possible, I'm just not in the mood for that this week
I've got some bad news for you ...
Windows can be installed into a logical partition, however it requires a primary partition for its boot files - notably ntldr and boot.ini
That would have been sda1 ...
... which you subsequently over-wrote with Ubuntu.

Linux doesn't need a primary partition at all, but several of the distros installers seem to demand it.
Pays to be *very* careful with the automated (GUI generally) installers.
 
Old 06-30-2007, 08:29 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by syg00
I've got some bad news for you ...
Windows can be installed into a logical partition, however it requires a primary partition for its boot files - notably ntldr and boot.ini
That would have been sda1 ...
... which you subsequently over-wrote with Ubuntu.

Linux doesn't need a primary partition at all, but several of the distros installers seem to demand it.
Pays to be *very* careful with the automated (GUI generally) installers.
This doesn't appear to apply to the case in the link I found---ie I don't think they had more that one Windows partition.
 
Old 06-30-2007, 08:38 AM   #9
nicepen
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Well then, thank you all for you help with this, you have made me enjoy the Linux community even more.

The result of all this; I'm one more step away from using windows! and that sounds like a great thing to me. I will install Gentoo on here as my second os and I bet it will take me less than 3 minutes to find a good tutorial how.

Good job everyone and consider this thread a success since the world is now one more windows user down.
 
Old 06-30-2007, 05:16 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
@pixellany - that (awefully old) link describes using a single primary partition.
I was trying to explain what probably happened in the OPs case.

A good result in the end ..
 
Old 06-30-2007, 05:40 PM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by syg00
@pixellany - that (awefully old) link describes using a single primary partition.
I was trying to explain what probably happened in the OPs case.

A good result in the end ..
we'll...it did have at least on case of Windows on a logical. I WAS grabbing at straws, and was interested in the link because it was one of the few times I have seen mapping of partitions vs drives.

Data stored for next incident--glad OP found a solution.
 
Old 06-30-2007, 06:02 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by pixellany
I WAS grabbing at straws, and was interested in the link because it was one of the few times I have seen mapping of partitions vs drives.
Only needed for very old versions of the M$oft loader that demanded the first partition - the ntldr used since (er ... lemme guess) maybe NT 3.5 resolved that.

The need for partition swap in grub has passed into history for most people - win95 users might be the only exception if using some partition other than the first.
 
  


Reply

Tags
grub, multiboot, ubuntu, xp



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
Unusual problem, please help malloc84 SUSE / openSUSE 14 08-10-2009 10:24 PM
Unusual problem, please help malloc84 Linux - General 1 03-06-2007 03:05 PM
[B]A unusual grub problem[/B] snowball0916 Linux - Newbie 14 10-22-2006 04:14 AM
grub "drive geom error" (unusual) Jottt Linux - Software 1 07-10-2005 05:57 PM
Unusual Problem foxtrot0 Linux - Security 3 05-30-2004 11:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:26 AM.

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