PDA

View Full Version : [ubuntu] Can't dual boot - Win xp missing from grub



LG_Auction
June 17th, 2011, 07:18 PM
My problem is I installed Natty 64 bit along side an XP 32. I tried using the "RecoveringUbuntuAfterInstallingWindows" from the community documents section. No joy.

I can only get the Natty to start. Holding the shift key does not bring up grub. Here is my boot_info_script results. Any help would be appreciated! Thanks in advance



Boot Info Script 0.60 from 17 May 2011


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

=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos5)/boot/grub on this drive.

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: /boot.ini /ntldr /NTDETECT.COM

sda2: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 * 63 253,180,789 253,180,727 7 NTFS / exFAT / HPFS
/dev/sda2 253,181,950 488,396,799 235,214,850 5 Extended
/dev/sda5 253,181,952 484,466,687 231,284,736 83 Linux
/dev/sda6 484,468,736 488,396,799 3,928,064 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda1 98BC6352BC632A48 ntfs
/dev/sda5 2b85940f-c2bb-4779-b28b-6a69e75aa3bc ext4
/dev/sda6 ee7340b3-c5ba-4f4d-85dd-cb68a6355926 swap

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/sda5 / ext4 (rw,errors=remount-ro,commit=0)


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

--------------------------------------------------------------------------------
[boot loader]
timeout=1
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Micro soft Windows XP Home Edition" /noexecute=optin /fastdetect /usepmtimer
--------------------------------------------------------------------------------

=========================== sda5/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
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
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 2b85940f-c2bb-4779-b28b-6a69e75aa3bc
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 2b85940f-c2bb-4779-b28b-6a69e75aa3bc
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
play 480 440 1
### 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
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 2b85940f-c2bb-4779-b28b-6a69e75aa3bc
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=2b85940f-c2bb-4779-b28b-6a69e75aa3bc ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 2b85940f-c2bb-4779-b28b-6a69e75aa3bc
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=2b85940f-c2bb-4779-b28b-6a69e75aa3bc ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 2b85940f-c2bb-4779-b28b-6a69e75aa3bc
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 2b85940f-c2bb-4779-b28b-6a69e75aa3bc
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)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 98BC6352BC632A48
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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda5/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/sda5 during installation
UUID=2b85940f-c2bb-4779-b28b-6a69e75aa3bc / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=ee7340b3-c5ba-4f4d-85dd-cb68a6355926 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

160.864662170 = 172.727115776 boot/grub/core.img 1
144.882915497 = 155.566845952 boot/grub/grub.cfg 1
147.296875000 = 158.158815232 boot/initrd.img-2.6.38-8-generic 2
160.859378815 = 172.721442816 boot/vmlinuz-2.6.38-8-generic 1
166.852302551 = 179.156295680 grub/core.img 1
147.296875000 = 158.158815232 initrd.img 2
160.859378815 = 172.721442816 vmlinuz 1

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda2

00000000 1d 91 3a 6c ee b1 4a 03 8d a1 80 11 c0 bf 7b be |..:l..J.......{.|
00000010 ce 87 d9 60 1f 64 37 80 3d d5 4b 1f ac a7 3f fa |...`.d7.=.K...?.|
00000020 cd 9e d6 bb e8 df ed e5 df 98 43 42 5e 38 03 80 |..........CB^8..|
00000030 a9 f8 9c ac c6 25 74 bd 7b d7 9c 08 87 2c 6b 5d |.....%t.{....,k]|
00000040 4f a1 13 cd af b5 77 68 0b 5d fc d6 3c a7 d1 53 |O.....wh.]..<..S|
00000050 83 9b 11 c4 c1 4f a4 60 01 0e 3a f8 f9 ad c1 36 |.....O.`..:....6|
00000060 c6 a1 fc a4 7f 0b 71 07 d8 c9 b5 77 b8 2f 6e de |......q....w./n.|
00000070 ec b6 e4 c9 cd a8 60 0d 3e 3f 24 f5 88 47 58 f0 |......`.>?$..GX.|
00000080 42 c2 7f b2 c1 e7 ce 9f 45 a6 f6 a2 6f e5 52 6c |B.......E...o.Rl|
00000090 35 63 d3 d6 cb c3 dc 9d 51 44 73 53 85 19 85 f8 |5c......QDsS....|
000000a0 6f 2e 3f 5b b8 3b 8a 95 7f 60 3f 10 b1 20 0d 3d |o.?[.;...`?.. .=|
000000b0 52 ae a6 46 3d aa 5b 4e 75 13 6f 48 63 60 27 d5 |R..F=.[Nu.oHc`'.|
000000c0 5e 90 38 ac 6a 4b 00 ef 1e 98 8d 1b 53 48 9c 2c |^.8.jK......SH.,|
000000d0 b6 99 a0 16 54 b5 5b 93 b2 c6 0b 10 ef 29 4c 81 |....T.[......)L.|
000000e0 64 e9 5e 7d 5a 86 26 d1 05 ca 90 a3 f9 8a db b3 |d.^}Z.&.........|
000000f0 14 aa 30 2d 43 b2 35 87 72 30 24 cf 97 fe 00 a8 |..0-C.5.r0$.....|
00000100 86 03 df 8f 71 bd 68 fe aa 29 bf 2e 38 7d 70 17 |....q.h..)..8}p.|
00000110 17 b5 1b 74 e3 88 5f 2f 69 01 b8 dc 53 0a b0 a7 |...t.._/i...S...|
00000120 46 e3 b6 ab 61 ac 79 ed 52 cd 20 25 49 97 94 b8 |F...a.y.R. %I...|
00000130 93 34 c8 4f 84 be 67 da 1b 1a 86 03 76 e6 f5 db |.4.O..g.....v...|
00000140 0a 7b 64 c8 e8 01 36 96 d3 8b 97 18 11 8a a7 f3 |.{d...6.........|
00000150 24 72 2d 27 75 d2 7d 6c 08 e5 61 a6 75 fc 06 af |$r-'u.}l..a.u...|
00000160 6e 6c 57 26 9a b1 d0 2b ef ed 68 90 c1 d2 73 47 |nlW&...+..h...sG|
00000170 9a 17 19 e3 4f 7b 72 d9 ef e3 9c 70 f8 8b 05 55 |....O{r....p...U|
00000180 41 f7 68 9e 20 48 aa 95 80 5a b2 ab c5 ec 38 a1 |A.h. H...Z....8.|
00000190 a1 8c 9f 49 57 d0 0a a0 e0 53 ee c7 85 e7 1e b9 |...IW....S......|
000001a0 b1 0e 4c ab a4 09 97 4a 11 48 ac c4 44 48 0d ca |..L....J.H..DH..|
000001b0 98 f7 b0 37 b7 d0 29 e8 a9 e2 b2 a6 e2 3c 00 fe |...7..)......<..|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 20 c9 0d 00 fe |........... ....|
000001d0 ff ff 05 fe ff ff 02 20 c9 0d 00 f8 3b 00 00 00 |....... ....;...|
000001e0 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


=============================== StdErr Messages: ===============================

unlzma: Decoder error

Jahid65
June 17th, 2011, 09:26 PM
did you update the grub after installing ubuntu? if not, boot into ubuntu. open the terminal (shortcut ctrl+alt+t)
then run this command


sudo update-grub
give your password (you won't see it) then reboot pc & may be this you will see xp in grub menu.

LG_Auction
June 17th, 2011, 10:27 PM
I did the sudo update-grub. This found the Windows XP, but after a restart I still only get Ubuntu. If I hold the shift key down I still do not get to grub.

I can mount the ntfs partition from Natty and it looks like Windows is still there. I just haven't figured out how to start it.

YesWeCan
June 18th, 2011, 05:11 PM
Hi there. Curious. Things look ok to me. Your grub.cfg file has a menu entry for XP and when Grub is aware of more than one OS it should show you a boot menu. The question is why don't you see a boot menu when you boot?

Would you post 'cat /etc/default/grub'?

You can add a # to the start of the line "GRUB_HIDDEN_TIMEOUT=0" to force the boot menu to appear. Then run update-grub again to invoke the changes.

It never (almost never) hurts to reinstall Grub to the MBR.
grub-install /dev/sda

Quackers
June 18th, 2011, 05:22 PM
It seems that you have a grub/core.img file and a boot/grub/core.img file in sda5. The first one looks dodgy :-) There shouldn't be 2 similar files like that. It may be that grub is using the wrong one.
I would suggest that you purge then re-install grub using the guide below.
The partition to mount first is /dev/sda5 and grub should be installed to /dev/sda
http://ubuntuforums.org/showthread.php?t=1581099

YesWeCan
June 18th, 2011, 05:56 PM
It seems that you have a grub/core.img file and a boot/grub/core.img file in sda5. The first one looks dodgy :-) There shouldn't be 2 similar files like that. It may be that grub is using the wrong one.
I would suggest that you purge then re-install grub using the guide below.
The partition to mount first is /dev/sda5 and grub should be installed to /dev/sda
http://ubuntuforums.org/showthread.php?t=1581099
Yes, it looks like Grub was installed to sda5 at one time. I don't think this matters as the MBR Grub is using the correct core.img according to:

=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos5)/boot/grub on this drive.

I'd try a simple grub-install /dev/sda before purging the thing.

LG_Auction
June 18th, 2011, 06:44 PM
As soon as I get back to the office I'll try these suggestions.

Thank you so much!

Bob

Quackers
June 18th, 2011, 06:48 PM
You're welcome!
Let us know what works please :-)

LG_Auction
June 20th, 2011, 05:49 PM
I just checked /etc/default/grub and the line "GRUB_HIDDEN_TIMEOUT=0" has the # in front of it already. I still don't see grub on boot. I think I've got too many copies competing. I'll run the cat command next.

LG_Auction
June 21st, 2011, 10:54 PM
Well...

I purged grub and installed it again. No joy!

I installed Natty, as a fresh install, erase and install new. After the update-grub, which sees XP, I still don't see grub.