Windows XP won't boot with Grub after installing Ubuntu 8.04
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Windows XP won't boot with Grub after installing Ubuntu 8.04
I am completely new to Linux as of today. I finally took the plunge and downloaded and installed Ubuntu 8.04 on my Windows XP computer (dual boot), using the Ubuntu installation wizard to "make room" on my hard drive for Ubuntu by creating a separate partition. The installation finished successfully and Linux boots just fine, but Windows XP will no longer boot at all. I have read many threads on this and other sites, giving advice of how to correct this problem. I am not at all experienced in editing and working with different ways of booting (other than Windows default). But after some frustration, I located (according to the threads) a couple places to try making changes to the boot commands and I tried various lists that were suggested. Before I changed anything, the Windows XP boot screen would appear and then it would revert right back to Grub.
*************
After I made one of the suggested changes to:
title Microsoft Windows XP Home Edition
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
the Windows XP screen did not appear, but it gave me "Error 21: Selected disk does not exist. Press any key to continue..." upon so doing, it takes me back to Grub.
*************
When I tried:
title Microsoft Windows XP Home Edition
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,1)
savedefault
chainloader +1
it gave me the message: Starting up... Disk error Press any key to restart. When I pressed a key, it gave much information very fast about my ethernet, and that the media failed and it was going to exit, but then it just repeated that process over and over while I pressed Esc, many other keys, and finally Ctrl + Alt + Del which took me back to Grub.
**************
Then I tried:
title Microsoft Windows XP Home Edition
map (hd0,0) (hd0,2)
map (hd0,2) (hd0,0)
rootnoverify (hd0,2)
makeactive
savedefault
chainloader +1
it ran my computer's brand "repair utility" and then gave me two windows error screens, then reverted back to Grub:
Windows Error Message: 1
C:\BIN\ERRORDIALOG.EXE
Windows cannot find 'C:\BIN\ERRORDIALOG.EXE'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click search.
Windows Error Message: 2
C:\BIN\BOOTPRIORITY.EXE
Windows cannot find 'C:\BIN\BOOTPRIORITY.EXE'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click search.
*********
I have no idea what drive number Ubuntu and/or Grub installed to, or assigned to the Windows partition, and I have no idea how to find out. I do not have a Windows XP installation CD (it came pre-installed on my computer), so I CANNOT wipe out that partition and simply reinstall it--I MUST be able to fix the problem without harming Windows!!! I also have data in the Windows partition that I don't want to lose. I could possibly uninstall and reinstall Ubuntu (as I saw suggested somewhere online), but I have not the slightest clue how to accomplish that task--and WHAT IF it didn't work?! I wouldn't be able to boot my computer at all in anything! ...and I really don't want to get rid of Ubuntu, because Linux has been highly recommended to me, and I would like to learn how to use it. BUT I NEED Windows too!
Can anyone PLEASE tell me something to try that I can understand?! Please remember, I have NO experience dealing with boot-up terminology!!
...in order to do the changes above, all I know is that I highlighted the Windows entry on Grub's menu, pressed e, and then I could add/remove/edit lines to make them look like the internet suggestions, then press b to try to boot from what I just typed. I can follow instructions, but I have to have every step spelled out. Help! I'm desperate!
I take it you used Wubi to install Ubuntu. I've heard a few horror stories about that. Try downloading the 'regular' Ubuntu ISO (text or live either is fine) and make sure you use manual partitioning and just overwrite the partition with Ubuntu on it. I've installed this way several times and have never had GRUB miss Windows in the boot options.
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9e779e77
Device Boot Start End Blocks Id System
/dev/sda1 1 10369 83288961 7 HPFS/NTFS
/dev/sda2 * 18479 19457 7863817+ 1c Hidden W95 FAT32 (LBA)
/dev/sda3 10370 18478 65135542+ 5 Extended
/dev/sda5 10370 18142 62436591 83 Linux
/dev/sda6 18143 18478 2698888+ 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/sdb: 1031 MB, 1031208448 bytes
32 heads, 63 sectors/track, 999 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 1004 1011912+ 6 FAT16
Thank you both for answering, I think I installed Ubuntu from a live CD. (I downloaded Ubuntu and told it to open the downloaded file with my writeable CD software--it worked, I verified it, and then installed Ubuntu upon reboot.) ...I don't know if that answers that question or not...
I tried that code, and it did the same as my third example in my first post:
It flashed the screen "RAM disk Image"
Then "Toshiba Recovery" (with a progress bar at the bottom of the screen)
Then it gave me the same two windows error messages as above: (concerning C:\BIN\ERRORDIALOG.EXE and
C:\BIN\BOOTPRIORITY.EXE).
****
Another thought - I was exploring my new Linux OS, and in File Browser I can see all the contents of my Windows partition, including My Documents, as well as all program and system folders and files.
Before I changed anything, the Windows XP boot screen would appear and then it would revert right back to Grub.
Didn't read this properly. If XP starts loading, then that seems to indicate you didn't overlay the XP partition accidentally.
Maybe @shane25119 was correct after all about wubi - I've never used it. I'm at a loss - try going to sf.net and get the bootinfo script and run it; see what it has to say about your system. Post the RESULTS.txt it generates.
============================= Boot Info Summary: ==============================
=> Grub0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #5 for /boot/grub/stage2 and /boot/grub/menu.lst.
=> No boot loader is installed in the MBR of /dev/sdb
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM
/dev/sda5 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-23-generic/volatile type tmpfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/kaylyn/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=kaylyn)
/dev/sdb1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush)
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
# 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=e7885ffa-1d90-46a0-bbf0-bf68870c5467 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
title Ubuntu 8.04.2, kernel 2.6.24-23-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=e7885ffa-1d90-46a0-bbf0-bf68870c5467 ro single
initrd /boot/initrd.img-2.6.24-23-generic
title Ubuntu 8.04.2, 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 Home Edition
chainloader (hd1,0)+1
### 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 Home Edition
chainloader (hd1,0)+1
Should look more like:
Code:
### 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 Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
Assuming windows xp is actually installed on (hd0,0) you do not need the map function. Hope this gets it for you
I changed this to match what you said and then rebooted. A screen offering the choice to start Windows in safe modes or normally comes up, but when any of them are selected, it shows the Windows XP logo screen and then reverts back to Grub. This is exactly what was in the menu.lst just after I installed Ubuntu, and this is exactly the same result as I originally had. Thanks for the advice, but it doesn't help! Can you give any other advice?
A screen offering the choice to start Windows in safe modes or normally comes up, but when any of them are selected, it shows the Windows XP logo screen and then reverts back to Grub.
This info should have been included in the original post - hard to help if you don't supply full details.
I'd be inclined to chkdsk the NTFS partition - but it has to be done from Windows. Can be done from the XP install CD (see article here), but I'd expect it to fail with your current setup. The NTFS will need to be the (only) active/bootable partition - easiest would probably be to use gparted to do that. I would expect it to be in the repositories for 8.04; use synaptic and search for gparted.
If you only have a vendor recovery CD, go find a mate with a real XP CD and use that.
The RESULTS.txt looks as o.k. other than the change(s) to menu.lst
Try un-mounting the drive in linux before shutting down and rebooting. another possibility is using the grub cd. You can have strange problems if the ntfs drive was mounted with the '-force tag'.
Previously mentioned ideas are worth a try as well.
Last edited by Hern_28; 07-09-2009 at 05:50 PM.
Reason: typo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.