Installed Ubuntu 7.04 but now can't boot Windows XP

Asked by Ed

Just installed Ubuntu 7.04 and seems to be working fine. However when I select the bootloader to boot off the original Windows XP installation I get the following error:

Starting up...

A disk read error occurred
Press CTRL+ALT+DEL to restart.

I installed Ubuntu via its live CD and used the default partitioning. Other postings ask for the contents of "menu.lst" and "fdisk -l" which follow below. What am I doing wrong? I'd rather use GRUB to dual-boot; also would hate to reinstall Windows.

Please help. Thanks.

-----------------------------------------------------
Results of "cat /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 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=720d03b9-a29e-47a8-bbd8-d195b078a09d ro

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

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

## 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,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=720d03b9-a29e-47a8-bbd8-d195b078a09d 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,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=720d03b9-a29e-47a8-bbd8-d195b078a09d ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=720d03b9-a29e-47a8-bbd8-d195b078a09d 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,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=720d03b9-a29e-47a8-bbd8-d195b078a09d ro single
initrd /boot/initrd.img-2.6.20-15-generic

title Ubuntu, memtest86+
root (hd0,1)
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

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Windows NT/2000/XP
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb2
title Windows NT/2000/XP
root (hd1,1)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

----------------------------------------------
Results of "sudo fdisk -l"

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 15057 120945321 7 HPFS/NTFS
/dev/sda2 15058 30026 120238492+ 83 Linux
/dev/sda3 30027 30401 3012187+ 5 Extended
/dev/sda5 30027 30401 3012156 82 Linux swap / Solaris

Disk /dev/sdb: 81.9 GB, 81964302336 bytes
240 heads, 63 sectors/track, 10587 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 1 867 6554488+ b W95 FAT32
/dev/sdb2 * 868 10586 73475640 7 HPFS/NTFS

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Francesco Conti (madmoose) said :
#1

It seems the right job for "Super Grub Disk" (http://supergrub.forjamari.linex.org/)

Quoting from supergrub web site:

"Super Grub Disk is a bootable cdrom, usb or floppy specially designed for the restore of boot.

    * GNU/Linux is installed in your pc, you reinstall Windows and GNU/Linux no longer boots as Grub menu no longer appears on boot. You can restore Grub on your MBR automatically.
    * You have Windows installed in a second hard disk and it does not want to boot. If you swap it from Super Grub Disk you will be able to boot it.
    * You can not boot Windows because your MBR is corrupt or Grub installation is not well done or whatever. With Super Grub Disk you will be able to boot the partition where Windows reside.
    * No Active Partition Found message appears. With Super Grub Disk you can activate partitions."

Revision history for this message
Ed (estrella) said :
#2

Thanks for your reply. Unfortunately it still does not boot Windows XP. I tried each of the following SuperGrub menu options:
    1. "Boot Windows" (I didn't try the "Fix" version as I did not want to lose the OS that boots (Linux) by overwriting the MBR!)
    2. "Boot Partition" (SG does see the original XP/NTFS partition)
    3. "Advanced" -> "Boot Windows" -> "Boot Partition"

None was able to boot WinXP. Using the GRUB console to type the "menu.lst" entry for WinXP (above) failed to boot as well.

Under WinXP, the "boot.ini" file contains the entry
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

so I'm guessing that both GRUB and the WinXP loader are pointing to the same partition. Is the message

A disk read error occurred
Press CTRL+ALT+DEL to restart.

printed by the Windows loader or by GRUB?

Revision history for this message
Cesare Tirabassi (norsetto) said :
#3

Do you get this error from any of your Win installations (you have 3)?
I guess you installed grub in sda1?

Revision history for this message
Ed (estrella) said :
#4

Yes, I installed GRUB on sda1. The other Win installations are from the disk that originally came with the computer, one being the original WinXP installation and the other the recovery installation. I never removed them, but kept using the disk for backing up files. I intend to repartition it and use it for backups as soon as we get the dual boot working and are able to restore the data files.

Interestingly enough, I can boot to those installations (one asks me to re-register, the other asks whether to repair the original WinXP installation); I don't get the "A disk read error occurred..." message on those.

I just remembered that when I installed WinXP on sda, Windows assigned the drive as drive "G:".

Revision history for this message
Cesare Tirabassi (norsetto) said :
#5

OK, can you then access that disk from the other win installation?
I'm asking since that error is a win error, grub/linux have nothing to do with it.

Revision history for this message
Ed (estrella) said :
#6

Yes, I can access it (Read/Write), as well as with Ubuntu (Read only).

Revision history for this message
Cesare Tirabassi (norsetto) said :
#7

You just confirmed it has nothing to do with your HD (not surprising since Linux is quite happy with it), as a matter of fact even if you reformat it and install win anew this error will most probably pop up again.
Really, you should ask to a Win forum or support site, it is a win specific error.
I myself found reports of users that have solved this by resetting their bios to the safe-default setting or disabling IDE bus mastering.

Revision history for this message
Ed (estrella) said :
#8

I tried your ideas above, unfortunately with no success.

Thanks for your help. I will ask around at a Win forum. Is the question to ask more like "how to start Windows XP from GRUB?"

Revision history for this message
Cesare Tirabassi (norsetto) said :
#9

No,

your WinXP entries in GRUB are correct and you have confirmed that you can boot from the other partitions.
WinXP starts just fine, but then stumble against what is reporting as an HD error; the problem seems that Windows doesn't find the partitions where it thinks they are.
You can try to manually solving it by looking at boot.ini, and/or trying to remake the partition table by using an utility, like this one:

http://www.cgsecurity.org/wiki/TestDisk

If you know what you are doing, you can also use sfdisk from Ubuntu and check/restore the correct number of cylinders/heads/sectors (the CHS table).

Can you help with this problem?

Provide an answer of your own, or ask Ed for more information if necessary.

To post a message you must log in.