PDA

View Full Version : Dual-booting Win7 and Ubuntu.....but what's up with GRUB?!?!?!



Bubblz4evr
July 17th, 2010, 11:11 PM
Hi all....I'm relatively new to Ubuntu; however, I previously had it working well with Vista and version 9.10. But then I bought a new hard disk and decided to upgrade Windows to Version 7 and wanted to run Ubuntu 10.04. THAT's when my troubles began. I put Windows on first and then Ubuntu, but I haven't been able to get Ubuntu to load ever since.

I've been trying EVERYTHING and I do mean everything I could find to make this blasted thing work and play well with Windows for the last 3 weeks. I now have a fresh install of Windows 7, then I installed Ubuntu 9.10...after trying 2.5 weeks to get Grub to work and play well, I decided to upgrade to Ubuntu 10.04 in hopes that Grub2 would fix my woes.....it didn't. Here's where I am....my devicemap looks like this:

Device hd0: Partition Table
Partition hd0,6 FileSystem type ext2 -- UUID a6c17b1e-3ef4-414e-b69e-b-d8120c0b6a
Partition hd0,5 Unknown FileSystem
Partition hd0,2 FileSystem type ntfs, UUID C25C56255C56150f
Partition hd0,1 FileSystem type ntfs, Label "System Reserved" UUID 3ad8b03bd8afee77
Device 2 hd2: FileSystem type iso 9660 Label "CDROM" UUID 2010-05-16-23-41-07-00"

If I use the Grub SuperDisk and tell it to locate a Grub2 grub.cfg file anywhere, it locates it on hd0,6 and will boot into linux without a problem, but it doesn't copy anything to the hard disk and I have NO CLUE what to do. I tried creating a grub.cfg file but I must've done something wrong since the system won't boot Ubuntu. It will still boot Win7 though. Here's the grub.cfg file:

#
# 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,6)
search --no-floppy --fs-uuid --set a6c17b1e-3ef4-414e-b69e-b0d8120c0b6a
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,6)
search --no-floppy --fs-uuid --set a6c17b1e-3ef4-414e-b69e-b0d8120c0b6a
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=a6c17b1e-3ef4-414e-b69e-b0d8120c0b6a 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,6)
search --no-floppy --fs-uuid --set a6c17b1e-3ef4-414e-b69e-b0d8120c0b6a
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=a6c17b1e-3ef4-414e-b69e-b0d8120c0b6a 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 ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 3ad8b036d8afee77
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 have also tried a program called "wubildr" that runs from Windows, but it didn't work either. I tried it prior to upgrading to Ubuntu 10.04.

I thought of a couple more things.....If i open a terminal window and type:

sudo grub
find /boot/grub/grubenv

it returns this: (hd0,5) <---- This is a problem since it's making me boot from hd0,6...but how do I copy it from hd0,6 to here?????

find /boot/grub/stage1 <-------Why am I looking for stage 1?? I haven't seen anything in anything I've read that talks about stage 1
Error 15: file not found

If I try to boot without the Grub SuperDisk, it gives me the error:

error: no such device
failed to boot default entries
It's going to GNU GRUB 1.97~beta4 window

If I have the SuperDisk in, it boots to a Grub 1.98 menu...when I tell it to find a Grub2 grub.cfg file anywhere it can and it finds it on hd0,6, it says 10.04 LTS. In both booting scenarios, Win7 is coming from /dev/sda1).

************************************************** ***********
************************************************** ***********

I'm desperately hoping that someone can make heads or tails out of this mess because I'm in way over my head. I have read forums and manuals and every other thing I can find for weeks now.

Any help is greatly appreciated. :)

Thanks......Bubblz4evr

bumanie
July 17th, 2010, 11:53 PM
Read this here (http://ubuntuforums.org/showthread.php?t=1195275) and go to section 13 - "reinstalling grub 2 from a live cd" Hope that helps, if not post back any errors etc.