PDA

View Full Version : [SOLVED] XP partition is NOT recognized - Cannot dual boot



dannybones
February 22nd, 2010, 01:39 PM
Absolute newbie to Linux (assume I'm a complete dummyhead. I don't understand anything about Linux.)

Just bought 500GB HDD. Made 3 partitions, 1 for Linux, 1 for Windows, and 1 for data.

1st, installed Win XP on 2nd partition (NTFS)
Then installed 64-Bit Ubuntu on 1st partition (Ext4)
(Created a 2 GB partition and for the swap file.)

Not sure which partition is primary, extended, etc., never really understood all that stuff anyways.

XP was working perfectly, till I installed Ubuntu. Now, it just boots straight into Ubuntu, doesn't give the option to boot into XP. :( Tried everything I know, but it will not give the option to go into XP. Help!!!!

darkod
February 22nd, 2010, 02:10 PM
Follow the instructions here and post the content of your results file:
http://ubuntuforums.org/showpost.php?p=8844901&postcount=4

It will show us more.

dannybones
February 22nd, 2010, 02:56 PM
Wow! That is so incredibly cool!!!! Here it is:


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 #1 for /boot/grub.
=> No boot loader? is installed in the MBR of /dev/sdc

sda1: __________________________________________________ _______________________

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

sda2: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System: Windows XP
Boot files/dirs:

sda6: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files/dirs:

sdc1: __________________________________________________ _______________________

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
Disk identifier: 0x20222021

Partition Boot Start End Size Id System

/dev/sda1 * 63 35,198,414 35,198,352 83 Linux
/dev/sda2 35,198,415 976,751,999 941,553,585 f W95 Ext d (LBA)
/dev/sda5 * 35,198,478 96,630,974 61,432,497 7 HPFS/NTFS
/dev/sda6 96,631,038 976,751,999 880,120,962 7 HPFS/NTFS


Drive: sdc ___________________ __________________________________________________ ___

Disk /dev/sdc: 2062 MB, 2062548992 bytes
16 heads, 32 sectors/track, 7868 cylinders, total 4028416 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xe1ead172

Partition Boot Start End Size Id System

/dev/sdc1 32 4,028,415 4,028,384 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 0b3b622f-ee67-4420-a973-0ea4321fc39d ext4
/dev/sda5 2E283D3E283D05FD ntfs Win XP
/dev/sda6 C254D8E154D8D96D ntfs Data
/dev/sdc1 ca3c1331-b04f-4109-8033-ffdd2c475c2d swap

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

Device Mount_Point Type Options

/dev/sda1 / ext4 (rw,errors=remount-ro)


=========================== sda1/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 /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 0b3b622f-ee67-4420-a973-0ea4321fc39d
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
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/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 0b3b622f-ee67-4420-a973-0ea4321fc39d
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=0b3b622f-ee67-4420-a973-0ea4321fc39d ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 0b3b622f-ee67-4420-a973-0ea4321fc39d
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=0b3b622f-ee67-4420-a973-0ea4321fc39d ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###

=============================== sda1/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 defaults 0 0
# / was on /dev/sda1 during installation
UUID=0b3b622f-ee67-4420-a973-0ea4321fc39d / ext4 errors=remount-ro 0 1
# swap was on /dev/sdc1 during installation
UUID=ca3c1331-b04f-4109-8033-ffdd2c475c2d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

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


2.5GB: boot/grub/core.img
2.1GB: boot/grub/grub.cfg
.7GB: boot/initrd.img-2.6.31-14-generic
2.5GB: boot/vmlinuz-2.6.31-14-generic
.7GB: initrd.img
2.5GB: vmlinuz
=======Devices which don't seem to have a corresponding hard drive==============

sdb

DrMelon
February 22nd, 2010, 03:01 PM
Your file quite clearly shows that Windows XP is being detected.

Therefore, all that needs to be done is get GRUB to let you boot to it.

presence1960
February 22nd, 2010, 03:13 PM
Your XP is on a logical partition (sda5). It is important to know the differences between logical and primary as you can see in this case you have XP on a logical partition. Theoretically you can get XP to boot from a logical partition, I have the how-to (https://www.linuxquestions.org/questions/linux-software-2/grub-windows-on-logical-partition-607114/) but have not yet tried it myself.

But in your particular case you are also missing the XP boot files. See the red:


sda5: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System: Windows XP
Boot files/dirs:

I would boot into Ubuntu and use gparted to delete the sda5 & sda6 partitions (after saving any data you don't want to lose), then delete the extended partition. After that all that space will show as unallocated. Create a primary NTFS partition for windows. Install XP again to that new primary NTFS partition. After the install boot into XP to make sure XP boots ok. If it does then all you need to do is restore GRUB2. Boot from the ubuntu Live CD & choose "try ubuntu without any changes", when the desktop loads open a terminal (Applications > Accessories > Terminal) and run
sudo mount /dev/sda1 /mntThat will mount your ubuntu root partition. next in terminal run
sudo grub-install --root-directory=/mnt/ /dev/sdaThis will put GRUB back on MBR of your disk. Reboot without the CD and boot into Ubuntu. Open a terminal and run
sudo update-grubto refresh grub.cfg & thus your GRUB menu. When completed reboot and try booting to windows.

here is some reading for partitioning: https://help.ubuntu.com/community/HowtoPartition

P.S. why is your swap on a flash disk? You can put it on the internal disk and eliminate the booting with the flash disk- no need for that.

presence1960
February 22nd, 2010, 03:17 PM
Your file quite clearly shows that Windows XP is being detected.

Therefore, all that needs to be done is get GRUB to let you boot to it.

XP does not have the files necessary to boot such as boot.ini, NTDETECT,NTLDR, etc


sda5: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System: Windows XP
Boot files/dirs:

As such GRUB will never detect XP because it looks for boot files in order to add an OS to the GRUB menu. Also XP is on a logical partition (sda5)

darkod
February 22nd, 2010, 03:33 PM
I see presence jumped in, thanks. Just follow his advice, he's spot on.

dannybones
February 22nd, 2010, 03:37 PM
OK... thanks so much! It's now 6:35am Arizona time... better get to bed.... will try it in the "morning"

viper250
February 22nd, 2010, 04:28 PM
your no dummyhead if you are seeking help
because the only stupid question is the one not asked.
we are pleased to help

dannybones
February 23rd, 2010, 01:24 AM
Took me half the morning and all afternoon, but...
IT WORKED IT WORKED IT WORKED!!!!! :popcorn:
Thank you ALL SO MUCH!!!!

And I must say, 64-bit Ubuntu is soooo much faster than my 32-bit Windows XP.... The Web pages just pop up there! Can't wait to explore more!

Not sure if I need to somehow mark this one as solved?

darkod
February 23rd, 2010, 01:27 AM
Took me half the morning and all afternoon, but...
IT WORKED IT WORKED IT WORKED!!!!! :popcorn:
Thank you ALL SO MUCH!!!!

And I must say, 64-bit Ubuntu is soooo much faster than my 32-bit Windows XP.... The Web pages just pop up there! Can't wait to explore more!

Not sure if I need to somehow mark this one as solved?

Excellent. Enjoy it now.
Above the first post on any page, Thread Tools, Mark as solved.

presence1960
February 23rd, 2010, 01:34 AM
Glad you got it working. Enjoy your dual boot!