PDA

View Full Version : [ubuntu] Dual Boot issues with Windows XP



bleach0410
February 14th, 2014, 08:06 PM
I have a 160gb hard drive and partitioned off 75gb for Ubuntu. When I restart my computer I don't have the Windows XP option on the Grub menu. When I go into System Monitor it shows me that only 75gb are set aside for /dev/sda1. I ran the os-prober and got the following results.


Boot Info Script 0.61 [1 April 2012]


============================= 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 (,msdos1)/boot/grub on this drive.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdc and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and uses an
embedded config file:

---------------------------------------------------------------------------
search.fs_uuid 27a9fcd2-b606-47c9-aba4-33165d688b00 root
set prefix=($root)/boot/grub
---------------------------------------------------------------------------
-----.

sda1: __________________________________________________ ________________________

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

sda2: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows XP: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /ntldr /ntdetect.com

sda3: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sdc1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows XP: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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 160,000,062 160,000,000 83 Linux
/dev/sda2 292,045,635 312,560,639 20,515,005 7 NTFS / exFAT / HPFS
/dev/sda3 160,002,046 292,044,799 132,042,754 5 Extended
/dev/sda5 160,002,048 292,044,799 132,042,752 82 Linux swap / Solaris


Drive: sdc __________________________________________________ ___________________

Disk /dev/sdc: 500.1 GB, 500107861504 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773167 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/sdc1 * 2,048 976,769,023 976,766,976 7 NTFS / exFAT / HPFS


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda1 27a9fcd2-b606-47c9-aba4-33165d688b00 ext4
/dev/sda2 1EE8B1BCE8B1928F ntfs HP_RECOVERY
/dev/sda5 b6112ba6-a8c5-40b8-9fcc-8f52c1e4a5ad swap
/dev/sdc1 F6C06165C0612CD5 ntfs Seagate Expansion Drive

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

Device Mount_Point Type Options

/dev/sda1 / ext4 (rw,errors=remount-ro)
/dev/sdc1 /media/Seagate Expansion Drive fuseblk (rw,nosuid,nodev,allow_other,default_permissions,b lksize=4096)


=========================== sda1/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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 27a9fcd2-b606-47c9-aba4-33165d688b00
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 27a9fcd2-b606-47c9-aba4-33165d688b00
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
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
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
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 3.11.0-15-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 27a9fcd2-b606-47c9-aba4-33165d688b00
linux /boot/vmlinuz-3.11.0-15-generic root=UUID=27a9fcd2-b606-47c9-aba4-33165d688b00 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.11.0-15-generic
}
menuentry 'Ubuntu, with Linux 3.11.0-15-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 27a9fcd2-b606-47c9-aba4-33165d688b00
echo 'Loading Linux 3.11.0-15-generic ...'
linux /boot/vmlinuz-3.11.0-15-generic root=UUID=27a9fcd2-b606-47c9-aba4-33165d688b00 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.11.0-15-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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 27a9fcd2-b606-47c9-aba4-33165d688b00
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 27a9fcd2-b606-47c9-aba4-33165d688b00
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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/sda1 during installation
UUID=27a9fcd2-b606-47c9-aba4-33165d688b00 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=b6112ba6-a8c5-40b8-9fcc-8f52c1e4a5ad none swap sw 0 0
--------------------------------------------------------------------------------

====================== sda1/boot/extlinux/extlinux.conf: =======================

--------------------------------------------------------------------------------
## /boot/extlinux/extlinux.conf
##
## IMPORTANT WARNING
##
## The configuration of this file is generated automatically.
## Do not edit this file manually, use: extlinux-update


default l0
prompt 1
timeout 50

include themes/debian/theme.cfg
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

= boot/grub/core.img 1
= boot/grub/grub.cfg 1
= boot/initrd.img-3.11.0-15-generic 1
= boot/vmlinuz-3.11.0-15-generic 1
= initrd.img 1
= vmlinuz 1

================= sda1: Location of files loaded by Syslinux: ==================

GiB - GB File Fragment(s)

= boot/extlinux/chain.c32 1
= boot/extlinux/extlinux.conf 1

============== sda1: Version of COM32(R) files used by Syslinux: ===============

boot/extlinux/chain.c32 : COM32R module (v4.xx)

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

Unknown BootLoader on sda3

00000000 6e 77 dc 97 84 d0 85 a1 9d 98 ec cf 35 99 9d 3f |nw..........5..?|
00000010 2d 85 35 0b 83 77 7d 6c 9c 15 e9 87 d5 6f 36 1c |-.5..w}l.....o6.|
00000020 59 c4 47 f3 cd aa a1 f3 a6 23 30 f3 f8 b2 f3 94 |Y.G......#0.....|
00000030 27 68 f6 e7 c5 52 b9 5b 97 a8 ce 2b 79 0d 9d 46 |'h...R.[...+y..F|
00000040 f1 40 af b6 22 74 b4 99 b2 dc 84 35 bc 43 8e 53 |.@.."t.....5.C.S|
00000050 d5 4d 5c c4 b3 98 eb ce 44 7c 27 58 0e 84 cd 9d |.M\.....D|'X....|
00000060 4a 99 4a e6 0c 80 63 3f 2c 0f 85 a5 2e 1f 55 85 |J.J...c?,.....U.|
00000070 0d 36 02 3e 44 5d ec 7d 42 4c 1b c4 62 5a 48 b9 |.6.>D].}BL..bZH.|
00000080 18 5d 03 a3 c5 ed 8e 16 2b f2 96 04 c1 74 43 4d |.]......+....tCM|
00000090 36 19 5a b5 3c 73 46 43 60 76 67 db ea 40 34 4d |6.Z.<sFC`vg..@4M|
000000a0 fe 7f b5 e4 02 18 fb 7c de f0 c0 e3 94 f9 ed 6a |.......|.......j|
000000b0 8e 20 3a 43 38 85 19 f6 c6 22 52 78 f1 47 50 f2 |. :C8...."Rx.GP.|
000000c0 9e 1c 08 4c c4 47 c2 b3 1f b6 48 7c 4f bd 5c 8c |...L.G....H|O.\.|
000000d0 66 13 36 3e 1f 2b 1c 37 1e d2 37 89 40 28 d5 97 |f.6>.+.7..7.@(..|
000000e0 b2 b8 7a 08 43 fb dc f1 92 a8 4d 69 c0 cc a7 b8 |..z.C.....Mi....|
000000f0 56 02 ab fe 05 a0 5a 1d a6 2d 50 d9 83 47 db b6 |V.....Z..-P..G..|
00000100 df 22 45 7a 48 4f 73 64 88 fb 50 47 30 76 36 04 |."EzHOsd..PG0v6.|
00000110 9c 93 3d 76 28 b9 11 f1 15 80 b9 bd 43 68 98 37 |..=v(.......Ch.7|
00000120 4e 53 cf 9d 7e 51 d2 2c 7a d4 7c 52 33 3d 3a 48 |NS..~Q.,z.|R3=:H|
00000130 15 b7 5c 3b ce ec 51 48 6b 63 bc d7 e7 5b 4f 5a |..\;..QHkc...[OZ|
00000140 e9 e7 9c 89 8f 5d 90 e5 63 17 42 e9 f8 54 50 7d |.....]..c.B..TP}|
00000150 e6 f1 62 52 30 dd 3f 6b bf bc 27 45 5f 0c 22 dc |..bR0.?k..'E_.".|
00000160 b2 d7 5a 7c af 91 78 7a f9 e1 b1 34 ba 02 29 ab |..Z|..xz...4..).|
00000170 aa 78 72 95 a2 01 33 e5 1d 15 cf 5e 5e 2d 56 bd |.xr...3....^^-V.|
00000180 7a ec ee 57 b5 cc b1 b3 39 4f 6b bd 04 9a cc c2 |z..W....9Ok.....|
00000190 a3 d6 2d d1 47 7b 4f 06 f7 e0 f5 55 87 a2 48 08 |..-.G{O....U..H.|
000001a0 bc 0d df 92 2e c2 d4 9f 6c e1 78 13 7f 93 87 61 |........l.x....a|
000001b0 90 da 5d 5a 6c 6b de d0 5a af c8 4c fe 1d 00 fe |..]Zlk..Z..L....|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 d0 de 07 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

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

xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in

I am new Ubuntu, but not Unix illiterate. Any help would be greatly appreciated.

mikewhatever
February 14th, 2014, 08:15 PM
Looks like XP is on /dev/sda2. How did you menage to get the Linux partition as /dev/sda1?

bleach0410
February 14th, 2014, 08:28 PM
I just followed the instructions from this link.
http://askubuntu.com/questions/148881/dual-boot-windows-xp-and-ubuntu-12-04
(http://askubuntu.com/questions/148881/dual-boot-windows-xp-and-ubuntu-12-04)
Is there anyway I can get Grub to recognize XP?

mikewhatever
February 14th, 2014, 08:50 PM
That doen't show any dealings with existing Windows partitions. Usually, you'd shrink a Windows partition from right to left, and get the space for Ubuntu behind it. Shringking it from the front is not supposed to work at all.

...anyway, have you tried updating grub with sudo update-grub?

bleach0410
February 14th, 2014, 09:32 PM
yes, i have run that. originally i could not even get to the Grub window - ubuntu would start automatically. i ran that script and was then able to see the Grub window upon startup. i ran it again just now (results below) rebooted and still the same thing - No XP.

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-15-generic
Found initrd image: /boot/initrd.img-3.11.0-15-generic
Found memtest86+ image: /boot/memtest86+.bin
done

Also...the above information is from the bootinfo script (not os-prober - my mistake). when i run os-prober nothing is returned.

when i run sudo fdisk -l - i get the following

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x43c4e8b6

Device Boot Start End Blocks Id System
/dev/sda1 * 63 160000062 80000000 83 Linux
/dev/sda2 292045635 312560639 10257502+ 7 HPFS/NTFS/exFAT
/dev/sda3 160002046 292044799 66021377 5 Extended
/dev/sda5 160002048 292044799 66021376 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 500.1 GB, 500107861504 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773167 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00084489

Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 976769023 488383488 7 HPFS/NTFS/exFAT

oldfred
February 15th, 2014, 05:35 PM
You show boot flag on sda1, grub does not use boot flag, but Windows does.
You should move boot flag to sda2 and run Windows repairs.

You seem to have only 2 of the three required Windows boot files and are missing boot.ini.
You can manually create a boot.ini as it is just a text file or run Windows repairs.
Windows repairs will only work on the NTFS partition with the boot flag, so use gparted to move boot from from sda1 to sda2.

Then sudo update-grub should find your Windows install.

Did you have another Windows install in sda1? That would have had all the boot files for all installs of Windows.