Windows XP/Ubuntu Dual-Boot--XP Won't Load

Asked by Wayne Anderson

I installed Ubuntu 8.04 on my computer, and set up a dual-boot using GRUB. Ubuntu works fine, but when I select Windows XP from the GRUB list when I turn on my computer is goes to the black screen, saying "Starting up..." and hangs there.

My menu.lst is...

# 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=23aad77d-f56f-4aff-91df-c0eb0346a71a 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, kernel 2.6.24-16-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=23aad77d-f56f-4aff-91df-c0eb0346a71a ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=23aad77d-f56f-4aff-91df-c0eb0346a71a ro single
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu 8.04, memtest86+
root (hd0,4)
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 XP Media Center Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
=======================================================

My fdisk -l is

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xab42ab42

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 8645 69440931 7 HPFS/NTFS
/dev/sda2 17239 19457 17818920 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3 8646 17238 69023272+ 5 Extended
/dev/sda5 8646 16883 66171703+ 83 Linux
/dev/sda6 16884 17238 2851506 82 Linux swap / Solaris

Partition table entries are not in disk order
=======================================================

Any help would be greatly appreciated!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wayne Anderson
Solved:
Last query:
Last reply:
Revision history for this message
lucien (lucien-de-belder) said :
#1

 In the menu.lst at the very first section on default "default 0" is specified.
 There is a warning in the use of "savedefault"

 The very last entry with title "Windows XP Media Center Edition" uses the "savedefault" command.
 I would delete this command.

  http://brainstorm.ubuntu.com/idea/352/
 On this site you can read some info about "savedefault"

 I am not sure but this "savedefault" has been under fire. You can google with this command to get some more info.

 Lucien.

Revision history for this message
Wayne Anderson (rustupid41) said :
#2

No luck with that, Lucien. Thank you, though, for trying! I read up on it some, and I don't believe that the savedefault is my problem.

Hm...I was looking at it, and with the "root" parts, where all the Ubuntu choices are (hd0,4) but the Windows "root" is (hd0,0), and I was wondering if that could have anything to do with it.

What do those do? Does it have to do with which hard drive partition it boots from? If so, is (hd0,0) my /dev/sda1 hard drive partition? Both /dev/sda1 and /dev/sda2 are NTFS partitions, which means Windows right? So am I booting from the wrong NTFS partition?

And what does "Partition 2 does not end on cylinder boundary" mean?

These are just some things I got to thinking about...my thinking could be completely wrong though. I'm new to a lot of this, but I'm trying to learn all that I can! : )

Revision history for this message
lucien (lucien-de-belder) said :
#3

Hm... Hm.. learning you are trying , I think many are in our case, just not knowing enough to answer a question.

 I do know that in grub hda equals hd0 ,hda1 equals hd0,0. So instead of starting with a and 1, in grub they start with 0 and 0 . So (hd0,4) in grub is hda5 in ubuntu.

 I don't know if you have ,as you have sda1 used for SATA drives, that HD can still be used or is it maybe SD .

 You have >69GB as sda1 (windows) , than an extended area of >69GB in which you have sda5 (linux) and sda6 (swap) and then again an area of >17GB for sda2, which is again a windows partition.

 So hd(0,4) for grub is hda5 for ubuntu; is it also sda5? I don't know, it looks like we have some googling to do.

  Lucien.

Revision history for this message
Wayne Anderson (rustupid41) said :
#4

Well, I got it fixed.

I got a Windows XP Corporate Edition disk from a friend, installed it, partitioned, then installed Ubuntu, and everything runs smooth this time.

Now my Partitions look like...

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xab42ab42

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 9585 76991481 7 HPFS/NTFS
/dev/sda2 9586 19457 79296840 5 Extended
/dev/sda5 9586 19079 76260523+ 83 Linux
/dev/sda6 19080 19457 3036253+ 82 Linux swap / Solaris

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x96f7d857

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 38913 312568641 7 HPFS/NTFS
================================================
My menu.lst looks like...

# 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=fedc1f0a-3881-40bc-97af-026d94e46cc9 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, kernel 2.6.24-16-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=fedc1f0a-3881-40bc-97af-026d94e46cc9 ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=fedc1f0a-3881-40bc-97af-026d94e46cc9 ro single
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu 8.04, memtest86+
root (hd0,4)
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 Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
====================================================

So, now everything works fine!

I'm still not sure what my old problem is, so I'm still researching it.

Thanks for the help, Lucien! : )

Revision history for this message
lucien (lucien-de-belder) said :
#5

Hello Wayne ,your problem has been interesting to me.

 The partitions that you had the first time is the problem. I quote:

 My fdisk -l is

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xab42ab42

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 8645 69440931 7 HPFS/NTFS
/dev/sda2 17239 19457 17818920 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3 8646 17238 69023272+ 5 Extended
/dev/sda5 8646 16883 66171703+ 83 Linux
/dev/sda6 16884 17238 2851506 82 Linux swap / Solaris

Partition table entries are not in disk order
End of quotation.

 You see this last warning "Partition entries not in disk order" as been confusing to grub.

 You had a primary partition sda2 after an extended one sda3. ( See start and end ) For grub and also in fstab, primary partitions are from 1 to 4. Extended ones start at sda5.

 So for the future we are now aware that the message "Partition table entries are not in disk order" COULD give some problems.

 Always learning something new isn't it!

 Lucien.

Revision history for this message
Wayne Anderson (rustupid41) said :
#6

Now I understand why it wasn't cooperating the first time through. : )

Thanks!

Revision history for this message
Soumen Biswas (soumen-tuli) said :
#7

Hello Lucien,

I have installed Win XP in 1st partition. I have also installed Ubuntu 9.04 ( 32 Bit ) - in /dev/sda6 and Ubuntu 9.04(64 bit) in /dev/sda7. Now My boot loader , grub also installed in /dev/sda7. After that I am unable to start Windows XP. But Both the ubuntu is works fine.
Please help me. I am in stuck. Please help me.
My mail id : <email address hidden>
-----------
Please see my fdisk -l output.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd092d25b

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 12860 103297068 7 HPFS/NTFS
/dev/sda2 12860 25608 102398719+ 7 HPFS/NTFS
/dev/sda3 25609 62272 294503580 f W95 Ext'd (LBA)
/dev/sda5 25609 37835 98213346 83 Linux
/dev/sda6 37836 50114 98631036 83 Linux
/dev/sda7 50115 62272 97659103+ 83 Linux
-----------------------