PDA

View Full Version : [ubuntu] Can't get back to Windows from Grub.



Enlightened Shadow
April 13th, 2011, 03:45 AM
Hey everyone. I just did a fresh install of Windows XP Home Edition and then a fresh install of Ubuntu 10.10. I can't get Grub2 to find the Windows partition using the prober though.

Here is the output of the Boot_Info_Script005 file.



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 #6 for (,msdos6)/boot/grub.

sda1: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: Unknown
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: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders, total 312500000 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 * 16,126 306,499,583 306,483,458 f W95 Ext d (LBA)
/dev/sda5 16,128 195,896,609 195,880,482 7 HPFS/NTFS
/dev/sda6 195,897,344 306,499,583 110,602,240 83 Linux
/dev/sda2 306,499,584 312,498,175 5,998,592 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1: PTTYPE="dos"
/dev/sda2 6756a74d-b5f4-4f41-9f9a-11f9397c6ff4 swap
/dev/sda5 86FC34FBFC34E6D9 ntfs
/dev/sda6 a1bd2580-51c0-48c6-aef0-b2d4b314270b ext4
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda6 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sr0 /media/XP_HOME_SP2 iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000, iocharset=utf8,mode=0400,dmode=0500)


=========================== sda6/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 part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set a1bd2580-51c0-48c6-aef0-b2d4b314270b
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set a1bd2580-51c0-48c6-aef0-b2d4b314270b
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=20
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.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set a1bd2580-51c0-48c6-aef0-b2d4b314270b
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=a1bd2580-51c0-48c6-aef0-b2d4b314270b ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set a1bd2580-51c0-48c6-aef0-b2d4b314270b
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=a1bd2580-51c0-48c6-aef0-b2d4b314270b ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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_os-prober ###
### END /etc/grub.d/20_os-prober ###

### BEGIN /etc/grub.d/30_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/30_custom ###

### BEGIN /etc/grub.d/40_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set a1bd2580-51c0-48c6-aef0-b2d4b314270b
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set a1bd2580-51c0-48c6-aef0-b2d4b314270b
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/40_memtest86+ ###

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

=============================== sda6/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/sda6 during installation
UUID=a1bd2580-51c0-48c6-aef0-b2d4b314270b / ext4 errors=remount-ro 0 1
/dev/sda2 none swap sw 0 0

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


149.9GB: boot/grub/core.img
130.6GB: boot/grub/grub.cfg
101.1GB: boot/initrd.img-2.6.35-22-generic
149.9GB: boot/vmlinuz-2.6.35-22-generic
101.1GB: initrd.img
149.9GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda1

00000000 ed 81 00 00 84 00 00 00 a0 05 29 4b 2e 05 29 4b |..........)K..)K|
00000010 ff b5 23 4a 00 00 00 00 00 00 01 00 08 00 00 00 |..#J............|
00000020 00 00 08 00 01 00 00 00 0a f3 01 00 04 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 01 00 00 00 46 8c 04 00 |............F...|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000060 00 00 00 00 cc b4 04 19 00 00 00 00 00 00 00 00 |................|
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000080 1c 00 00 00 ec a7 f4 46 00 00 00 00 e4 fb ee c2 |.......F........|
00000090 2e 05 29 4b ec a7 f4 46 00 00 00 00 00 00 00 00 |..)K...F........|
000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 a4 81 00 00 22 00 00 00 a0 05 29 4b 2e 05 29 4b |....".....)K..)K|
00000110 d0 b5 23 4a 00 00 00 00 00 00 01 00 08 00 00 00 |..#J............|
00000120 00 00 08 00 01 00 00 00 0a f3 01 00 04 00 00 00 |................|
00000130 00 00 00 00 00 00 00 00 01 00 00 00 47 8c 04 00 |............G...|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000160 00 00 00 00 cd b4 04 19 00 00 00 00 00 00 00 00 |................|
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000180 1c 00 00 00 ec a7 f4 46 00 00 00 00 e4 fb ee c2 |.......F........|
00000190 2e 05 29 4b ec a7 f4 46 00 00 00 00 00 00 00 00 |..)K...F........|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 |................|
000001c0 01 01 07 fe ff ff 02 00 00 00 22 e6 ac 0b 00 fe |..........".....|
000001d0 ff ff 05 fe ff ff 24 e6 ac 0b de aa 97 06 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




Any help would be greatly appreciated.

Hedgehog1
April 13th, 2011, 03:57 AM
Sadly, windows will not run from a logical parttion (/dev/sd5)


sda1: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: Unknown
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:

You will need to repeat the installs, and this time take control of them.

Might I suggest the following layout:

/dev/sda1 ntfs XP (12 gigs)
/dev/sda2 ntfs shared data for Windows and Ubuntu (movies, music) - (about 140 gigs, whatever the other partitions don't use)
/dev/sda3 extended partition to the end of the drive
__/dev/eda5 ext4 '/' root partition for Ubuntu (10 gigs)
__/dev/sda6 ext4 '/home' home partition for Ubuntu (10 gigs)
__/dev/sda7 swap (Size of RAM + 10%)


The Hedge

:KS

p.s. I have a guide I can post with pictures for the Ubuntu part - would you like that?

Enlightened Shadow
April 13th, 2011, 04:40 AM
Yes please and thank you. I had a feeling that I was going to have to do this.

Hedgehog1
April 13th, 2011, 05:56 AM
NOTE: These screen shots were for a Windows 7 system, and that needs an extra little primary boot partition. So sda5-sda7 are in extended partiton sda4 on the picutres, but yours will be in /sda3 since you are running XP.

In gparted, create 4 partitions:

1) sda3 (extended partition to the end of the disk)
2) ext4 '/' (10-20 gigs)
3) Linux swap (Size of RAM + 10%)
4) ext4 '/home' (the rest of the disk space)

http://img215.imageshack.us/img215/8985/01gparted.png

Once your three partitions are laid out, you will start the install and eventually get to this screen:

http://img829.imageshack.us/img829/4196/02specifypartitons.png

Here is what the allocation screen looks like:

http://img27.imageshack.us/img27/6770/03allocdrivespace1.png

First, make /dev/sda5 your '/' (root) partition:

http://img31.imageshack.us/img31/7520/04allocdrivespace2.png

http://img130.imageshack.us/img130/9673/05allocdrivespace3.png

Next, set up the swap partition. This usually sets itself up just fine, but double check it.

http://img263.imageshack.us/img263/7656/06allocdrivespace4.png

Hedgehog1
April 13th, 2011, 05:57 AM
The last partition to setup is the '/home' one:

http://img202.imageshack.us/img202/6828/07allocdrivespace5.png

This separates your documents and 'stuff' from the system files and 'stuff' in the '/' partition.

This brings you to here:

http://img34.imageshack.us/img34/6017/08allocdrivespace6.png

Please install the Boot Loader on /dev/sda ! (not sda1 or sda5 - just sda)

Press "Install Now" and you are on your way:

http://img855.imageshack.us/img855/7153/09installbegin.png

Here is a view of the final layout of the partitions:

http://img853.imageshack.us/img853/841/10diskutility2.png


The Hedge

:KS

GopalaDasa
April 13th, 2011, 08:05 AM
Great work Hedgehog1 :-)

I am going to follow the steps as it is given by you. Much appreciated your help. :-)