PDA

View Full Version : [ubuntu] Can't boot WinXP Pro from GRUB menu



HabsFanInOz
March 8th, 2011, 03:13 PM
I've got an old Dell Precision 670 which has a SCSI disk. I installed 10.04 and everything worked fine - I could boot into 10.04 from the GRUB menu. I later added an IDE disk and installed WinXP Pro on it.

When I ran 'sudo update-grub', Lucid discovered the IDE disk and added a WinXP Pro entry to the GRUB menu. Now, though I can still boot 10.04 from the GRUB menu, I can't boot WinXP - the screen goes blank, and I have to hit Ctrl-Alt-Del to restart.

For what it's worth, here are the results of using boot_info_script055.sh:

Boot Info Script 0.55 dated February 15th, 2010

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

=> Windows is installed in the MBR of /dev/sda
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
partition #1 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

sdb1: __________________________________________________ _______________________

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

sdb2: __________________________________________________ _______________________

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

sdb5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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 976,751,999 976,751,937 7 HPFS/NTFS


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 146.8 GB, 146815733760 bytes
255 heads, 63 sectors/track, 17849 cylinders, total 286749480 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdb1 * 2,048 275,021,823 275,019,776 83 Linux
/dev/sdb2 275,023,870 286,748,671 11,724,802 5 Extended
/dev/sdb5 275,023,872 286,748,671 11,724,800 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 F4C8EF51C8EF1122 ntfs
/dev/sda: PTTYPE="dos"
/dev/sdb1 717d5dd0-7203-451f-a329-cb3b1b1cbf7a ext4
/dev/sdb2: PTTYPE="dos"
/dev/sdb5 e13b0655-03e6-4e1b-bb08-eea4617c26d2 swap
/dev/sdb: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sdb1 / ext4 (rw,errors=remount-ro)
/dev/sda1 /mnt/Windows fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)


================================ 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 Professional" /noexecute=optin /fastdetect


=========================== sdb1/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='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
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='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
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 ###
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
insmod tga
if background_image /usr/share/images/grub/BonsaiTridentMaple.tga ; then
set color_normal=white/black
set color_highlight=magenta/black
else
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux_proxy ###
menuentry "Ubuntu, with Linux 2.6.32-29-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
linux /boot/vmlinuz-2.6.32-29-generic-pae root=UUID=717d5dd0-7203-451f-a329-cb3b1b1cbf7a ro quiet splash
initrd /boot/initrd.img-2.6.32-29-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.32-29-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
echo 'Loading Linux 2.6.32-29-generic-pae ...'
linux /boot/vmlinuz-2.6.32-29-generic-pae root=UUID=717d5dd0-7203-451f-a329-cb3b1b1cbf7a ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-29-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.32-28-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
linux /boot/vmlinuz-2.6.32-28-generic-pae root=UUID=717d5dd0-7203-451f-a329-cb3b1b1cbf7a ro quiet splash
initrd /boot/initrd.img-2.6.32-28-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.32-28-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
echo 'Loading Linux 2.6.32-28-generic-pae ...'
linux /boot/vmlinuz-2.6.32-28-generic-pae root=UUID=717d5dd0-7203-451f-a329-cb3b1b1cbf7a ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-28-generic-pae
}
### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/20_memtest86+_proxy ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 717d5dd0-7203-451f-a329-cb3b1b1cbf7a
linux16 /boot/memtest86+.bin
}
### END /etc/grub.d/20_memtest86+_proxy ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set f4c8ef51c8ef1122
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 ###

=============================== sdb1/etc/fstab: ===============================

proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda1 / ext4 errors=remount-ro 0 1
/dev/sda1 /mnt/Windows ntfs defaults 0 0
/dev/sdb5 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

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


111.8GB: boot/grub/core.img
49.9GB: boot/grub/grub.cfg
112.4GB: boot/initrd.img-2.6.32-26-generic-pae
112.6GB: boot/initrd.img-2.6.32-27-generic-pae
113.8GB: boot/initrd.img-2.6.32-28-generic-pae
51.3GB: boot/initrd.img-2.6.32-29-generic-pae
112.3GB: boot/vmlinuz-2.6.32-26-generic-pae
112.4GB: boot/vmlinuz-2.6.32-27-generic-pae
112.6GB: boot/vmlinuz-2.6.32-28-generic-pae
113.9GB: boot/vmlinuz-2.6.32-29-generic-pae
51.3GB: initrd.img
113.8GB: initrd.img.old
113.9GB: vmlinuz
112.6GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sdb2

00000000 24 33 00 00 24 33 00 00 24 33 00 00 24 33 00 00 |$3..$3..$3..$3..|
*
000001b0 24 33 00 00 24 33 00 00 24 33 00 00 24 33 00 fe |$3..$3..$3..$3..|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 e8 b2 00 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

Any suggestions? I can still boot to either OS using the boot menu that comes up when I hit F12 during boot-up, but I'd really like to be able to boot either OS from the GRUB menu. I've had a look at suggestions in previous threads on XP, SCSI, etc., but haven't any luck.

Thanks.

oldfred
March 8th, 2011, 05:49 PM
Boot script looks normal to me. But I have seen issues with mixed IDE/SATA drives where the drivemap does not seem to work. I assume your SCSI may have the same issue.

Some have found incorrect jumpers master/slave or where drive was on cable vs CD on same cable. Are you using newer cable select 80 conductor cable?

You could try a chainboot command but it may still be an issue. The boot drive is always seen by grub as hd0. Windows thinks it is on hd0 and when grub passes boot to windows the drivemap is supposed to make windows see itself as hd0 not hd1.

Add this to 40_custom just to see if it works. It may have same issue of drive order/number.
gksudo gedit /etc/grub.d/40_custom

menuentry "Chainboot sda when booting from sdb" {
set root=(hd1)
chainloader +1
}

After making changes update grub.cfg with this:
sudo update-grub

HabsFanInOz
March 10th, 2011, 01:09 AM
Thanks, I tried your suggestion of a custom entry, but that didn't work - GRUB just hangs.

oldfred
March 10th, 2011, 04:04 AM
Then I would install grub to sda and boot that drive. Then the boot drive is 0 and window is 0. I would expect that to work.