grub won't show windows

Asked by Cortney Wilson

My Windows XP SP3 doesn't show up when I boot up. I've looked through the other post and none seem to help. I know windows is still on there because Ubuntu only has about 30 GB of total memory and windows is using the rest out of 60 GB. Hopefully someone can help. Thanks

cortney@cortney-desktop:~$ sudo fdisk -l
[sudo] password for cortney:

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9dc96e9e

   Device Boot Start End Blocks Id System
/dev/sda1 * 49 3946 31310685 82 Linux swap / Solaris
/dev/sda2 3947 7297 26916907+ 5 Extended
/dev/sda5 3947 7153 25760196 83 Linux
/dev/sda6 7154 7297 1156648+ 82 Linux swap / Solaris
# 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 5

## 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=e929e473-a211-46ae-af8f-e04fa08dd0a8 ro

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

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

## 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.1, kernel 2.6.24-19-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=e929e473-a211-46ae-af8f-e04fa08dd0a8 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=e929e473-a211-46ae-af8f-e04fa08dd0a8 ro single
initrd /boot/initrd.img-2.6.24-19-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Cortney Wilson
Solved:
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Okay!
Now follow the below steps

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

{title Microsoft Windows
root (hd0,1)
savedefault
makeactive
chainloader +1} <--- Add this block (within brackets) below ubuntu memtest86+ as shown here

Regards

Revision history for this message
AFarris01 (afarris01) said :
#2

Hello Cortney! sorry about your problems...hopefully this may be of some help.

From the text of your "menu.lst" file, it would seem that whenever ubuntu installed, it didn't detect the windows partition for whatever reason... however, the output from the "sudo fdisk -l" command seems to indicate that there are no NTFS or other windows partitions on the computer. Are you sure that the windows partition is still present? can you mount/access it through the 'Places>Computer" screen?

If you can still access the windows partition in this way, then chances are that it may be being mis-recognized somewhere along the line...and if this is the case, booting from it should be simple enough.

so, if you can still mount/read the contents of the windows partition, then right click on a file that's on the partition and click 'properties' which will open a window displaying the file's properties. Look for a line labeled "Location:" under the properties, (should be something like /media/sda*, where there would be a number in place of the *) For the moment i will assume that the partition in question is sda2.

Once you have that location, all you really need to pay attention to is the last bit (the sda2). to boot from this partition, you must add some lines to the end of your menu.lst file, like so:

open up a terminal, (Applications>Accessories>Terminal) and type in: sudo gedit /boot/grub/menu.lst
and enter your password where prompted. once Gedit appears with the menu.lst file open, scroll all the way to the bottom of the file, hit enter 2 or 3 times, and type in the following:

title Microsoft Windows XP Professional
root (hd0,1)
savedefault
makeactive
chainloader +1

The 'root' line is determined by the 'sda*' bit that you found earlier. the translation between the sda2 & (hd0,1) forms are fairly easy, and I'll demonstrate below, in case your partition is different than the one i've shown above.

some common harddrive names:
sda1 translates to (hd0,0)
sda2 translates to (hd0,1)
sdb1 translates to (hd1,0)
sdb2 translates to (hd1,1)
sdc3 translates to (hd2,2)
stc...

hopefully this is helpful, and if its not, or something is still wrong, then please post back, and i'll do what i can to help you out :)

Andrew

Revision history for this message
Cortney Wilson (cortneyj-wilson) said :
#3

I've tried both situations and both didn't work. I remember that when I did install Ubuntu that there wasn't an option to migrate Windows. But when I resized the partition Windows was on there to help for Ubuntu. Hopefully I still have it on there and if not then could someone show me how to dual boot with XP and Ubuntu. Thanks

Revision history for this message
Bhavani Shankar (bhavi) said :
#4

Yes, no problem - it's possible to have two operating systems on one computer. many people have a dualboot (Windows and Ubuntu).

More info:
Official Documentation: https://help.ubuntu.com/8.04/switching/installing.html
https://help.ubuntu.com/community/WindowsDualBoot
http://apcmag.com/how_to_dual_boot_windows_xp_and_linux_xp_installed_first.htm

Regards

Revision history for this message
AFarris01 (afarris01) said :
#5

I wouldnt worry too much about the option to migrate settings and such from windows not showing up... on several systems i've installed ubuntu on, that option occasionally does not show up, but windows is still there. however, in you're case, i'm still unsure about the accessibility of your windows partition.

you say that you tried both methods, but they failed to work... do you mean that it gave you an error? if so, what was the error?
were you able to mount the windows partition and view it in ubuntu? if not, do you at least see an icon for it on the desktop, or in "Places>Computer"? if it gives you any errors at all, please include those with your next post.

if you can't tell, didnt see any icons, or you're just not sure, download the program called gparted (go to "Applications>Add/Remove," search for 'gparted,' and click the checkbox next to it and 'Apply') and run it from "System>Administration>Partition Editor." This program scans your harddrive(s) and gives you a nice graphical readout of how the partitions are laid out.

If you only have 1 hard drive, then interpretation should be easy. in the main window, there are some colored bars representing your partitions, and right below that are some labeled columns. under the one labeled 'filesystem' you should see at least 1 that says 'ntfs' or 'fat32.' If you do, then this is good. this means that the partition was simply being mis-recognized before. it also gives you the partition label right next to the filesystem, which will allow you to set up you're menu.lst file correctly in case that was the problem before.

if you see anything else in the 'filesystem' column besides 'ext3' 'swap' 'ntfs' or 'fat32' then there could be a problem, and you will need to post back with what exactly it says.

If you're still unsure, or something is unclear, please post back with your questions so i can clarify as best as i can. I'm very sorry that you are having this issue with your ubuntu installation, and i hope i can help you resolve the problem so you can go on and enjoy the experience, without having to worry!

hope thats helpful!

Andrew

Revision history for this message
Cortney Wilson (cortneyj-wilson) said :
#6

Thanks Andrew I went ahead to formatted the hard drive and made the partition into one and I'll do a clean install of XP and Ubuntu. Thanks all for your help.

Revision history for this message
AFarris01 (afarris01) said :
#7

No problem! sorry i couldnt help you sort out the problem short of a fresh start...but i think in this case, that was probably the best course of action anyway... Best of luck, and happy ubuntu-ing!

Andrew

Revision history for this message
dthawk (dthawk) said :
#8

I am having the same problem. I went through a seemingly trouble free process of installing Ubuntu 8.04 and it ran fine. When I reboot now, it takes me directly to Ubuntu without allowing md to choose between Windows XP and Ubuntu. I downloaded Gparted and I see no reference to Windows, but the disk size is only 35 GB on an 80GB hard drive.

I installed Ubuntu on my son's home school computer which was having stability issues with Windows XP but I am not sure I want go all the way with Ubuntu yet. Now I am sure I don't. Among the things he wants assurance of is that he will be able to have access to his MP3 files, (which we can't find now) and will be able to watch the flash videos on NFL.com. I figured the flash videos out but another problem I am having is that the menus don't show when inserting his school videos.

Anyway, first things first. How to get windows to reappear or am I doomed to start all over?

Gparted shows:
dev/sda1 ext3 36.6 GB
dev/sda2 extended 1.5
    /dev/sda5 linux-swap 1.57

THanks for any help for this first time Ubuntu User.

David

Revision history for this message
AFarris01 (afarris01) said :
#9

First of all, i'd like to say that i'm sorry you're having problems with your installation, and i'd like to help. second though, and possibly more importantly, posting a comment on the tail-end of someone else's problem isnt always the best way to get noticed (and subsequently helped) by others... therefore, if the steps i post here dont help, id recommend posting a new problem here on launchpad, and possibly in the ubuntu forums (www.ubuntuforums.org) to try and get help from other knowledgeable people in the community.

back to your issue...

first question: when you installed ubuntu, which option did you choose from the partitioning menu? (i.e. guided-whole disk, largest contiguous free space, resize windows partition, manual etc...) Some people have reported being unable to boot to windows after installing ubuntu using the 'resize partition' option, which can happen for various reasons... so if this was you're install mode, then that may explain the issue a little bit.

if you didnt do this, and you used a second hard disk, or a seperate existing partition, or whatever other method, then please run this command:

sudo fdisk -l

and it will spit out a partition list for your computer. below is a sample 'sudo fdisk -l' output from my friend's computer that i'm on right now:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd9fcd9fc

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 14156 113708038+ 7 HPFS/NTFS
/dev/sda2 14157 30400 130479930 f W95 Ext'd (LBA)
/dev/sda5 14157 16646 20000862 83 Linux
/dev/sda6 16647 28312 93707113+ 83 Linux
/dev/sda7 28313 29356 8385898+ 7 HPFS/NTFS
/dev/sda8 29357 30400 8385898+ 82 Linux swap / Solaris

note the lines that end with "HPFS/NTFS." if you run fdisk, and you see lines listed that list "HPFS/NTFS" as the filesystem, then you're in good shape. just follow the steps in the thread above to add the appropriate entry to your menu.lst file, and reboot.

If this is not helpful, or doesnt answer your question, i'd recommend starting your own thread so you can get better, more personalized help from the other awesome people here. if that still doesnt work, or you dont get any responses for a while on either launchpad or the ubuntu forums, then please send me an email, and i'll see if i can help more. for right now though, i am experiencing a brief period of extreme business, and must depart. good luck, and remember...google is your friend!

Andrew