PDA

View Full Version : [SOLVED] XP will not boot after installing 10.04



barkes
June 5th, 2010, 03:26 AM
I just installed 10.04 in dual boot with XP. During the install I opted to manually set disk partitions so I could do a separate /home.

10.04 works fine but when I select XP from grub list I get the black screen with fast blinking cursor. I can see my files in XP from 10.04. Boot.ini etc are still there. Here are the results of the "boot info script".

Thank-you:)


Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #2 for /boot/grub.

sda1: __________________________________________________ _______________________

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

sda2: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda3: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: Unknown
Boot sector info:

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 63 68,425,844 68,425,782 7 HPFS/NTFS
/dev/sda2 68,427,776 84,049,919 15,622,144 83 Linux
/dev/sda3 84,051,966 234,440,703 150,388,738 5 Extended
/dev/sda5 84,051,968 234,440,703 150,388,736 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 4AF07062F07055E3 ntfs HP_PAVILION
/dev/sda2 be6c37c1-97cf-4625-aac6-1b52bf8c5676 ext4
/dev/sda3: PTTYPE="dos"
/dev/sda5 42e0ee08-9d38-4b72-9195-a691388d2456 ext4
/dev/sda: PTTYPE="dos"
error: /dev/sdb: No medium found
error: /dev/sdc: No medium found
error: /dev/sdd: No medium found
error: /dev/sde: No medium found

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda2 / ext4 (rw,errors=remount-ro)
/dev/sda5 /home ext4 (rw)


================================ sda1/boot.ini: ================================

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn


=========================== sda2/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set be6c37c1-97cf-4625-aac6-1b52bf8c5676
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set be6c37c1-97cf-4625-aac6-1b52bf8c5676
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set be6c37c1-97cf-4625-aac6-1b52bf8c5676
linux /boot/vmlinuz-2.6.32-22-generic-pae root=UUID=be6c37c1-97cf-4625-aac6-1b52bf8c5676 ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-22-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set be6c37c1-97cf-4625-aac6-1b52bf8c5676
echo 'Loading Linux 2.6.32-22-generic-pae ...'
linux /boot/vmlinuz-2.6.32-22-generic-pae root=UUID=be6c37c1-97cf-4625-aac6-1b52bf8c5676 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-22-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set be6c37c1-97cf-4625-aac6-1b52bf8c5676
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set be6c37c1-97cf-4625-aac6-1b52bf8c5676
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 4af07062f07055e3
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

=============================== sda2/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda2 during installation
UUID=be6c37c1-97cf-4625-aac6-1b52bf8c5676 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda5 during installation
UUID=42e0ee08-9d38-4b72-9195-a691388d2456 /home ext4 defaults 0 2
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

=================== sda2: Location of files loaded by Grub: ===================


37.4GB: boot/grub/core.img
40.1GB: boot/grub/grub.cfg
37.9GB: boot/initrd.img-2.6.32-22-generic-pae
38.5GB: boot/vmlinuz-2.6.32-22-generic-pae
37.9GB: initrd.img
38.5GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda3

00000000 98 a4 7e d7 ca 90 ec fa 34 23 8c 80 63 84 e5 49 |..~.....4#..c..I|
00000010 5b 6d b0 d5 c3 31 99 2f 33 87 19 f6 cc 96 34 ce |[m...1./3.....4.|
00000020 6a 2b 3e 5b 40 42 9c 4a f0 aa f8 9d 03 dd 48 8d |j+>[@B.J......H.|
00000030 1c dd 82 df eb 21 71 4c ee c9 38 8a 58 f9 94 18 |.....!qL..8.X...|
00000040 33 cb 10 40 4e 4e 09 e2 47 e9 5f e1 4f 64 df d9 |3..@NN..G._.Od..|
00000050 99 d8 97 10 0b 9f c3 64 f6 eb d4 03 dd fd 01 4a |.......d.......J|
00000060 ba cf f1 58 0f 92 11 6f da d5 be 30 5f 1d 63 66 |...X...o...0_.cf|
00000070 ca 78 4e 47 7a b2 67 fa 8e 0e f6 17 6f 76 eb 12 |.xNGz.g.....ov..|
00000080 e3 35 e2 29 1e cd 8b db b5 34 61 93 e3 3d b7 bb |.5.).....4a..=..|
00000090 74 da bf 18 03 13 9b 62 b1 68 e3 0a f0 c7 15 21 |t......b.h.....!|
000000a0 f5 c7 0e a9 f9 26 47 8d 32 01 f4 13 5f d7 a1 cf |.....&G.2..._...|
000000b0 f2 59 fc de 42 a6 18 5d 89 19 2c cf 09 5f 78 54 |.Y..B..]..,.._xT|
000000c0 4b 3b 8b f3 7d df 48 2b 52 66 f1 b5 a4 aa 5e 73 |K;..}.H+Rf....^s|
000000d0 24 c2 21 96 64 a5 6f ba 13 3f 07 46 7f a9 d2 e0 |$.!.d.o..?.F....|
000000e0 96 7e a6 8f 8b 8d bb a7 bd 20 09 68 cf 51 05 64 |.~....... .h.Q.d|
000000f0 92 2a f9 e9 cb a6 0f 31 0e 17 a8 db 70 e3 9f 8c |.*.....1....p...|
00000100 c7 94 3d 90 2f 07 91 06 15 31 70 9f bb 32 a9 b0 |..=./....1p..2..|
00000110 b4 f9 e1 dd 58 96 4c 2c 86 4d 3c 56 09 3f 84 16 |....X.L,.M<V.?..|
00000120 fa 80 7f 41 a0 9e 59 a2 2f ba 5a 19 05 46 ec 5b |...A..Y./.Z..F.[|
00000130 22 7c 81 a7 54 ed aa ff 53 08 7e 98 29 ba 0d e1 |"|..T...S.~.)...|
00000140 66 cc ae 43 d8 ad 5b 88 de 91 c3 98 38 50 d2 c8 |f..C..[.....8P..|
00000150 7e 85 1a d8 7f 4f 50 df 59 1a 0a e0 5c 08 ba 4e |~....OP.Y...\..N|
00000160 87 2e 94 5a 00 f0 80 08 95 5d c8 2d 81 2d b5 01 |...Z.....].-.-..|
00000170 55 8f 23 2a 2e f3 9e 9e 85 01 54 af 44 5a 1d c3 |U.#*......T.DZ..|
00000180 13 23 35 e4 f8 9d 4c 46 1b 5d c9 57 f0 49 1a d9 |.#5...LF.].W.I..|
00000190 86 38 6b 38 e8 52 4a a0 78 07 41 40 4d 53 da 78 |.8k8.RJ.x.A@MS.x|
000001a0 3c 9d fa ae d7 84 7b b1 60 80 b7 06 2a e7 75 4b |<.....{.`...*.uK|
000001b0 87 cc b8 a2 38 4d 5e 1d 8b 3c e1 8b d0 65 00 fe |....8M^..<...e..|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 c0 f6 08 00 00 |................|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200


=======Devices which don't seem to have a corresponding hard drive==============

sdb sdc sdd sde

oldfred
June 5th, 2010, 05:42 AM
Welcome to the forum.

I do not seen anything wrong with your windows install.

One thing to try may be to edit out the entire search line in the boot of the windows stanza. There have been a few issues with floppy drives.

Follow step 1 in this even if you currently do not get the error message.

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search

remove this and manually boot as trial.
search --no-floppy --fs-uuid --set 4af07062f07055e3

barkes
June 5th, 2010, 04:18 PM
oops #1

barkes
June 5th, 2010, 04:22 PM
oops #2 (yup I accidentally posted the same reply 3 times, damn XP laptop!!)

barkes
June 5th, 2010, 04:23 PM
Thanks oldfred. I tried removing the line in the windows boot stanza but got the same results.

I also tried "sudo update-grub2" (I had done an update-grub) it completed normally and I tried to boot to XP once normally, and then after deleting the "search --no-floppy --fs-uuid......" line.

Same results.

Before I did the 10.04 install I defraged my XP (it was a clean install from recovery disk). XP is fully up to date (SP3). I had been running dual boot with XP and 8.04 for two years but blew it all away in order to refresh my XP install.

XP was using 24 gig and I resized its partition down to 35 gig (120 GB HD), since we do everything in Ubuntu except xp only software. My whole family uses ubuntu. We have a netbook with XP and 10.04 on it. No problems but for that computer I went NBR 9.04->9.10->10.04 using the simple update through update manager.

Thanks for your help. I am going to keep reading other posts for clues, any additional ideas would be greatly appreciated.

barkes
June 5th, 2010, 04:56 PM
So I ran testdisk utility that was suggested in another post and got to this screen:


Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 120 GB / 111 GiB - CHS 14593 255 63
Partition Start End Size in sectors
1 * HPFS - NTFS 0 1 1 4259 79 33 68425782 [HP_PAVILION]

Boot sector
Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
Status: OK

Backup boot sector
Status: Bad

Sectors are not identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.



[ Quit ] [ List ] [Org. BS ] [Rebuild BS] [ Dump ]
Copy boot sector over backup sector


I am not sure what this is telling me except that it appears that testdisk has found the problem. Question: Which of the options ([ List ] [Org. BS ] [Rebuild BS] [ Dump ]) should I choose?

Thanks!

barkes
June 5th, 2010, 05:02 PM
....and here is the testdisk logfile


Sat Jun 5 11:57:42 2010
Command line: TestDisk

TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 2.6.32-22-generic-pae (#36-Ubuntu SMP Thu Jun 3 23:14:23 UTC 2010)
Compiler: GCC 4.4 - Jun 23 2009 17:11:34
ext2fs lib: 1.41.11, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 234441648 sectors
/dev/sda: user_max 234441648 sectors
/dev/sda: native_max 16337840 sectors
/dev/sda: dco 234441648 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 120 GB / 111 GiB - CHS 14593 255 63, sector size=512 - ATA WDC WD1200AB-22D

Partition table type (auto): Intel
/dev/sda: Device Configuration Overlay (DCO) present.
Disk /dev/sda - 120 GB / 111 GiB - ATA WDC WD1200AB-22D
Partition table type: Intel

Interface Advanced
Geometry from i386 MBR: head=255 sector=63
NTFS at 0/1/1
heads/cylinder 240 (NTFS) != 255 (HD)
Info: size boot_sector 68425769, partition 68425782
get_geometry_from_list_part_aux head=255 nbr=1
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=1
get_geometry_from_list_part_aux head=255 nbr=1
1 * HPFS - NTFS 0 1 1 4259 79 33 68425782 [HP_PAVILION]
NTFS, 35 GB / 32 GiB
2 P Linux 4259 110 12 5231 220 45 15622144
EXT4 Large file Sparse superblock Recover, 7998 MB / 7628 MiB
3 E extended 5231 253 13 14593 66 1 150388738
5 L Linux 5231 253 15 14593 66 1 150388736
EXT4 Large file Sparse superblock Recover, 76 GB / 71 GiB

ntfs_boot_sector
1 * HPFS - NTFS 0 1 1 4259 79 33 68425782 [HP_PAVILION]
NTFS, 35 GB / 32 GiB
NTFS at 0/1/1
heads/cylinder 240 (NTFS) != 255 (HD)
Info: size boot_sector 68425769, partition 68425782
filesystem size 68425769 6280585033767359157
sectors_per_cluster 8 164
mft_lcn 786432 4220789805
mftmirr_lcn 1791716 1538743225
clusters_per_mft_record -10 -15
clusters_per_index_record 1 -2
Boot sector
Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
Status: OK

Backup boot sector
Status: Bad

Sectors are not identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.

Thanks.

oldfred
June 5th, 2010, 05:37 PM
I have not had to use tesdisk so I do not know. It is saying your backup boot sector is bad and your main is inconsistent. I would probalby try the rebuild. If that does not work then I might try the windows CD and run its repairs (fixboot). But I think the windows just copies the backup boot sector. It may have an advanced rebuild somewhere also.

Boot sector - First sector of bootable partition that stores information about the layout of the volume and the file system structures, as well as the boot code that loads Ntdlr.

This also has some info on the test disk repairs.
If Microsoft's Checkdisk (chkdsk) failed to repair the MFT, run TestDisk, also rebuild boot sector
http://www.cgsecurity.org/wiki/Advanced_NTFS_Boot_and_MFT_Repair

sherifkadry
June 5th, 2010, 06:06 PM
The same exact thing happened to me, and when I tried to do a recovery with the Windows XP disk I got a BSOD with a 007xb error. Any one have any ideas how to fix this, I'm starting to dislike 10.04 very much.

oldfred
June 5th, 2010, 06:24 PM
sherifkadry Welcome to the forums.

We do like to keep a thread on one topic but your problem does not seem like barkes. You should start your own tread if you have a Ubuntu problem but the error you are getting is a windows error. Check your BIOS setting for IDE compatibily.

contessa2007
June 5th, 2010, 06:39 PM
barkes, I am having the same problem as you - the only difference is that I upgraded from 9.10 Karmic Koala to 10.04 Lucid Lynx. I have also tried some of the same fixes as you with no success.

I dual boot Ubuntu and WinXP (SP3). Each OS is installed on a separate HDD.

EDITING TO ADD:

Gave up on the upgrade thinking that the issue was with 10.04 (since I had zero issues booting into either 9.10 or WinXP from grub); decided to reinstall 9.10 from disk onto its original partition to see if that would take care of the issue. After install was complete, still can't boot into WinXP!!

barkes
June 5th, 2010, 08:12 PM
oldfred, Its all good now!

Per your suggestions I chose the "Rebuild BS" option inside testdisk. testdisk calculated what the boot sector should be and showed where the current and calculated were different. I then chose the "write" option in testdisk to make the change.

Upon reboot into windows, XP did its own disk checking and then all was well.

Here is what I did to solve my problem.

1. got testdisk from Ubuntu Software Center
2. sudo testdisk
3. enter password
4. inside testkdisk select [CREATE]
5. then select the drive that has your windows on it and [PROCEED]
6. then [CONTINUE]
7. then [INTEL]
8. select Advanced
9. select your windows partition and then [BOOT]. If you have a problem it will tell you here. See my previous post in this thread to see what the output looked like for my system.
10. I chose [Rebuild BS] at this point.
11. This will calculate what your Boot sector should look like
12. If you trust the results, select [write] to write the calculated boot sector to your drive.

Thanks oldfred and the author of another post that suggested using testdisk.

oldfred
June 5th, 2010, 08:27 PM
Again.
contessa2007 welcome to the forums but you issue is not barkes.

It is most likely this, but if not start a new thread and post your boot info script.

Fix for most, a few have other issues, better than windows fix in many cases as it also fixes other parameters:
This has instructions on using testdisk to repair the install of grub to the boot sector for windows from Ubuntu or Linux LiveCD.
http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector
Also check for /boot/grub in addition to /Boot
Since ntfs partitions are case insensitive this leads to confusions between "/boot" and the already existing folder "/Boot"
http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Core_On_Windows


Boot Info Script courtesy of forum member meierfra
Page with instructions and download:
http://bootinfoscript.sourceforge.net/
Be sure to highlight and use code tags (# in edit panel) to make it easier to read when you post the results.txt.

contessa2007
June 5th, 2010, 08:39 PM
oldfred: my apologies. The solution you suggested for me (testdisk repair of grub) worked!! I'm now booted into XP. From now on I'll be much more careful about my upgrades. Many many thanks!

oldfred
June 9th, 2010, 11:51 PM
Barkes,

I think in your post you mean testdisk not checkdisk as testdisk is the program you can download

tns09
July 2nd, 2010, 11:50 PM
Just wanted to say I had the same problem of not booting into xp after install of Lucid but using testdisk solved my problems. I had tried many other solutions unsuccessfully before I stumbled upon this thread. Thanks.

linux-beginner
June 23rd, 2011, 08:27 AM
@barkes: Thank you!