PDA

View Full Version : [SOLVED] Help needed to fix my boot



psycho5
April 22nd, 2010, 01:54 PM
Hi,

I upgraded from 9.10 to 10.04, during the update at the installation part, a window came up asking what to do with grub. I checked my ubuntu partition and my windows partition to install grub. Which now I think was a mistake. After the update and reboot, everything is fine except I can't go to windows anymore.

The grub-update command found the windows 7 loader during the installation but windows won't boot.

I tried a system rescue disk for windows and did startup repair, but no problems found. I also went to windows command prompt and ran


bootsect /nt60 C: /force /mbr

Which was successful but still Windows doesn't boot, I select it from the menu and all I see is a blank screen.

If its any use, here's my generated 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,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
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,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
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 ###
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.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=3e716f03-1dab-43c8-80f2-35e2006ab2be ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=3e716f03-1dab-43c8-80f2-35e2006ab2be ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=3e716f03-1dab-43c8-80f2-35e2006ab2be ro quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
echo 'Loading Linux 2.6.31-20-generic ...'
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=3e716f03-1dab-43c8-80f2-35e2006ab2be ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-20-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 3e716f03-1dab-43c8-80f2-35e2006ab2be
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

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


I know the grub menu is pointing to the right partition.

So, anything else I can try to get my boot back up?

The Ubuntu partition is on a separate disk and the windows is on a separate disk also.

Neill_R
April 22nd, 2010, 02:14 PM
Okay i have done similar (twice) I found that by using the windows repair disk I could boot from that CD/DVD and get to a commend prompt and issue the command

BOOTREC /FixMbr



suggest you might like to unplug the ubuntu drive first just so that you don't write to that drive's MBR

edit this post to Solved if my suggestion works please

psycho5
April 22nd, 2010, 02:24 PM
Yeah your suggestion did work, I just had to

A) Reorder my disks in BIOS so windows is the first at boot order

B) Use the rescue disk and bootrec /Fixmbr

C) Revert back to original boot order and now my grub2 boots win 7 again =D



Also thanks to this post:

http://ubuntuforums.org/showthread.php?t=1459441