PDA

View Full Version : [SOLVED] Any other way out?



simcom86
February 4th, 2011, 07:51 AM
I have been reading threads after threads and still find myself going no where at this moment. My condition is like this. I am new to Ubuntu and have install Ubuntu in a separate drive in the same HDD where my Win 7 is located. Same and usual with everyone out there, I cannot boot Win 7 after installing Ubuntu. I have tried many method by to no avail.

Below is some info on my comp.


Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks at sector 109980776
of the same hard drive for core.img, but core.img can not be found at this
location.

sda1: __________________________________________________ _______________________

File system: vfat
Boot sector type: BSD4.4: Fat32
Boot sector info: According to the info in the boot sector, sda1 starts
at sector 0. But according to the info from fdisk,
sda1 starts at sector 40.
Operating System:
Boot files/dirs:

sda2: __________________________________________________ _______________________

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

sda3: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /bootmgr /Boot/BCD /Windows/System32/winload.exe

=========================== 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
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 1 976,773,167 976,773,167 ee GPT


GUID Partition Table detected.

Partition Start End Size System
/dev/sda1 40 409,639 409,600 System/Boot Partition
/dev/sda2 411,648 315,244,543 314,832,896 Linux or Data
/dev/sda3 315,244,584 976,508,871 661,264,288 Linux or Data

blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 3F3C-1AF6 vfat EFI
/dev/sda2 6002b205-6fb1-4a46-a3a1-512d42e0b94d ext4
/dev/sda3 7830DB8730DB4AB0 ntfs
/dev/sda: PTTYPE="gpt"

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

Device Mount_Point Type Options
http://iforce.co.nz/i/ykjjhye4.wxy.jpg
/dev/sda2 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sr0 /media/UDF Volume udf (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000, iocharset=utf8,umask=0077)
/dev/sda3 /media/7830DB8730DB4AB0 fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_ permissions)


=========================== sda2/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_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set 6002b205-6fb1-4a46-a3a1-512d42e0b94d
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set 6002b205-6fb1-4a46-a3a1-512d42e0b94d
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.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set 6002b205-6fb1-4a46-a3a1-512d42e0b94d
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=6002b205-6fb1-4a46-a3a1-512d42e0b94d 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_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set 6002b205-6fb1-4a46-a3a1-512d42e0b94d
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=6002b205-6fb1-4a46-a3a1-512d42e0b94d 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_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set 6002b205-6fb1-4a46-a3a1-512d42e0b94d
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set 6002b205-6fb1-4a46-a3a1-512d42e0b94d
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/sda3)" {
insmod part_gpt
insmod ntfs
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set 7830db8730db4ab0
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 ###

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

=============================== sda2/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
/dev/sda2 / ext4 errors=remount-ro 0 1

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


56.3GB: boot/grub/core.img
56.2GB: boot/grub/grub.cfg
.9GB: boot/initrd.img-2.6.35-22-generic
.5GB: boot/vmlinuz-2.6.35-22-generic
.9GB: initrd.img
.5GB: vmlinuz

I would very love not to reformat my Win 7 and I have tried to repair Windows but it keep saying that my dics isnot compatible with the Windows I installed. So I am very frustrated now.

PLEASE HELP ME!!!!!!!!!!!!

Quackers
February 4th, 2011, 11:09 AM
Your problems are likely to be caused by the fact that you have a GUID partition table - is this on a Mac?
See the thread below or visit the Apple users section of the forum for help, if that is the case.

http://ubuntuforums.org/showthread.php?t=1633353&highlight=GUID

srs5694
February 4th, 2011, 06:17 PM
The partition table layout looks like a pure-EFI configuration with Windows and Ubuntu, which you'd find mostly on a handful of (mostly very new) motherboards. If that's the case, then dual-booting Windows and Ubuntu on such a system really is living on the "bleeding edge." You might need to look into your EFI's boot loader options or third-party boot selectors, like rEFIt (http://refit.sourceforge.net/) (which is used mostly on Macs; I'm not sure if it would work on a UEFI-based PC).

If it's a Mac, it looks as if the hybrid MBR, (http://www.rodsbooks.com/gdisk/hybrid.html) which Macs use to boot Windows, has been replaced by a more conventional protective MBR. If it's a Mac, switching to a pure-MBR (no GPT) configuration makes sense, unless you plan to re-install OS X.

So to sum up, you need to post back with more information on your system: What type of hardware is it (Mac or PC; and if the latter, what brand and model of computer or motherboard do you have, and if you know, say whether it uses a BIOS or an EFI), what's the history of OS installations and removals, and what have you used in the past in the way of boot loaders and partitioning tools?

simcom86
February 5th, 2011, 02:58 AM
Thank you so much for all your replies. Well the stories goes like this

1) PC with AMD processor was 1st install with Windows 7
2) later I played with Hackintosh and install it in another partition, lets name it partition H. Everything was fine until 1 day i updated it the OSX and could not access it because the graphic card wasnt updated. Thus I left it alone for a while
3) I install ubuntu 10.10 over partition H. During ubuntu installation, I formatted H drive and install with ubuntu.

My CPU is as below:
Gigabyte M61PME-S2P
Bios Version - F5
AMD Athon(tm) 7750 Dual-Core Processor
4GB DDR2 Corsair Gaming RAM
NVIDIA GeForce 9600 GT
500GB SATA WD Caviar

I am not so familiar with EFI and hybrid MBR. I will do some reading on it soon. If you would like to know more info, please let me know and thanks to all of you once again. =)

Pillars of Creation
February 5th, 2011, 08:15 PM
Can you try using a Windows 7 recovery disk to see if you can fix the MBR and get back in the window seven.

When the seven recovery disk:
http://neosmart.net/forums/showthread.php?t=7805

then you can reinstall Ubuntu.

http://en.wikipedia.org/wiki/GUID_Partition_Table

http://en.wikipedia.org/wiki/Extensible_Firmware_Interface#Implementation_and_a doption

srs5694
February 5th, 2011, 08:38 PM
My suspicion is that your Hackintosh experiments created a GPT with a hybrid MBR configuration, and the Ubuntu installer then replaced the hybrid MBR with a conventional protective MBR. This is actually a superior configuration from all points of view except for the fact that Windows is too stupid to boot from a GPT disk on a BIOS-based computer.

Edit: See my next post....

debd
February 5th, 2011, 08:59 PM
try using EasyBCD

this page (http://apcmag.com/how_to_dual_boot_windows_xp_and_windows_7_xp_insta lled_first.htm?page=5) may help a bit..

srs5694
February 5th, 2011, 09:14 PM
I'd asked for some information that I realized after posting was already in the Boot Info Script output, so I've edited my earlier post...

Anyhow, my suspicion seems to be correct; Windows won't boot from a GPT disk unless it's got a hybrid MBR, and you no longer have one. Chances are the Ubuntu installer wiped it out when it did its work. (If Ubuntu had to resize any partitions, preserving the hybrid MBR would have been tricky and potentially very dangerous, so wiping out the non-standard hybrid MBR is actually the safest course of action.)

There are four ways to proceed:



Convert to plain MBR -- You can use my GPT fdisk (gdisk) (http://www.rodsbooks.com/gdisk/) program to convert your GPT setup to a plain MBR setup. If you do this, be sure to use the latest version from its Sourceforge download page; (http://sourceforge.net/projects/gptfdisk/files/) the version in the Ubuntu repositories (through 10.10) is hopelessly out of date and has bugs that will damage your installation if you make this attempts. Follow the instructions in the "Converting from GPT to MBR" section of this page. (http://www.rodsbooks.com/gdisk/mbr2gpt.html) Note that you'll have to re-install GRUB if you do this. The Super GRUB 2 Disk (http://www.supergrubdisk.org) will help you get booted back into Ubuntu to do this after you make the conversion, so download it and burn it before you make the conversion.
Restore the hybrid MBR -- You can also use gdisk to create a fresh hybrid MBR. I recommend using the latest version of gdisk, but follow the instructions on my hybrid MBR page. (http://www.rodsbooks.com/gdisk/hybrid.html) This approach has the advantage that you probably won't have to re-install GRUB; however, hybrid MBRs are ugly and dangerous, so in the long run you're better off without one.
UEFI DUET -- If you want to live on the "bleeding edge," you can follow instructions here (http://www.insanelymac.com/forum/index.php?showtopic=186440) and use the UEFI DUET system to get Windows booting using an add-on UEFI, which will enable it to boot from GPT. I mention this mainly just to be complete; unless you want to experiment with UEFI, this approach offers no advantages over the preceding two options, and it's likely to be much harder to set up. (I've been experimenting with this to get some experience with EFI, and it's hard to use this system.) Also, you may not be able to use your Windows recovery tools to deal with future problems if you've got a pre-installed version of Windows (a retail Windows disc should have the necessary EFI recovery tools, though).
Wipe and re-install -- You can completely wipe the hard disk and re-install everything. If you do this, though, be sure to use a utility that will completely wipe the GPT data. (Tools like fdisk, and I believe the Windows installer, will leave GPT traces behind, which will cause problems in the future.) GParted will do this job when you create a new partition table. GPT fdisk can also do it, using the "z" option on the experts' menu.



Overall, I recommend option #1; however, if re-installing GRUB scares you or if you have future plans that might make GPT preferable to MBR, option #2 might make sense.

Note that any of these recovery options poses some risk of data loss; thus, you should back up all your important data before you do anything else.

Good luck!

srs5694
February 5th, 2011, 09:17 PM
try using EasyBCD

this page (http://apcmag.com/how_to_dual_boot_windows_xp_and_windows_7_xp_insta lled_first.htm?page=5) may help a bit..

Easy BCD will be useless in this situation; Windows is super-glued to MBR when booting on BIOS-based computers, and AFAIK EasyBCD doesn't break that bond. Since the computer has only GPT, not MBR, partitions, EasyBCD will not help.

jungledude
February 6th, 2011, 05:28 AM
hey simcom, it looks like i may have had something similar happen to me.
Take a look at my thread here. (http://ubuntuforums.org/showthread.php?p=10432103#post10432103) All I did to fix was run gptsync from ubuntu:
run "sudo apt-get install gptsync" in terminal
go through that, let it install
then type "gptsync /dev/sda"
let it do it's thing, then type "update-grub2"
hopefully that will help. let us know how it goes.

simcom86
February 6th, 2011, 07:13 AM
Can you try using a Windows 7 recovery disk to see if you can fix the MBR and get back in the window seven.

When the seven recovery disk:
http://neosmart.net/forums/showthread.php?t=7805

then you can reinstall Ubuntu.

http://en.wikipedia.org/wiki/GUID_Partition_Table

http://en.wikipedia.org/wiki/Extensible_Firmware_Interface#Implementation_and_a doption

Tried it many times, but got error message saying that the recovery disc is not compatible with the current version of the window.

simcom86
February 6th, 2011, 07:14 AM
hey simcom, it looks like i may have had something similar happen to me.
Take a look at my thread here. (http://ubuntuforums.org/showthread.php?p=10432103#post10432103) All I did to fix was run gptsync from ubuntu:
run "sudo apt-get install gptsync" in terminal
go through that, let it install
then type "gptsync /dev/sda"
let it do it's thing, then type "update-grub2"
hopefully that will help. let us know how it goes.

Tried but got error message saying permission denied. Thanx.

simcom86
February 6th, 2011, 07:30 AM
Overall, I recommend option #1; however, if re-installing GRUB scares you or if you have future plans that might make GPT preferable to MBR, option #2 might make sense.

Note that any of these recovery options poses some risk of data loss; thus, you should back up all your important data before you do anything else.

Good luck!

Thank you for your help and advise but I am very sorry as I do not know how to perform the conversion in step 1 nor in step 2. I could use some help on the instructions and the coding. Thank you again in advance.

srs5694
February 6th, 2011, 06:32 PM
Thank you for your help and advise but I am very sorry as I do not know how to perform the conversion in step 1 nor in step 2. I could use some help on the instructions and the coding. Thank you again in advance.

From my earlier post:





Convert to plain MBR -- You can use my GPT fdisk (gdisk) (http://www.rodsbooks.com/gdisk/) program to convert your GPT setup to a plain MBR setup. If you do this, be sure to use the latest version from its Sourceforge download page; (http://sourceforge.net/projects/gptfdisk/files/) the version in the Ubuntu repositories (through 10.10) is hopelessly out of date and has bugs that will damage your installation if you make this attempts. Follow the instructions in the "Converting from GPT to MBR" section of this page. (http://www.rodsbooks.com/gdisk/mbr2gpt.html) Note that you'll have to re-install GRUB if you do this. The Super GRUB 2 Disk (http://www.supergrubdisk.org/) will help you get booted back into Ubuntu to do this after you make the conversion, so download it and burn it before you make the conversion.
Restore the hybrid MBR -- You can also use gdisk to create a fresh hybrid MBR. I recommend using the latest version of gdisk, but follow the instructions on my hybrid MBR page. (http://www.rodsbooks.com/gdisk/hybrid.html) This approach has the advantage that you probably won't have to re-install GRUB; however, hybrid MBRs are ugly and dangerous, so in the long run you're better off without one.


Emphasis added. Follow the links. If you have problems after reading the links, post back.

simcom86
February 8th, 2011, 12:37 PM
hey simcom, it looks like i may have had something similar happen to me.
Take a look at my thread here. (http://ubuntuforums.org/showthread.php?p=10432103#post10432103) All I did to fix was run gptsync from ubuntu:
run "sudo apt-get install gptsync" in terminal
go through that, let it install
then type "gptsync /dev/sda"
let it do it's thing, then type "update-grub2"
hopefully that will help. let us know how it goes.

I have tried again today with your solution with sudo in front so as to have full admin rights and VOLA.... The problem is solve. I want to thank you so much for saving my life.

Below is what I did to solve my problem all thanks to jungledude.
1) Open Terminal
2) type "sudo apt-get install gptsync"
3) type "sudo gptsync /dev/sda"
4) select yes to allow changes
5) type "update-grub2"
6) again approve the action
7) restart and boot with windows 7 installation DVD / recovery CD and run repair windows
8) windows found error with my boot manager and propose to repair and restart
9) click "Repair & Restart"
10) Now I am using Windows to post this thank you note.

Once again a big thank you to all you who have responded to my thread and to you, jungledude.

srs5694
February 8th, 2011, 08:11 PM
Note that the gptsync utility creates a hybrid MBR. This works for now, but as I've written in my earlier posts, hybrid MBRs are ugly and dangerous. You must be very cautious when creating or modifying partitions. If you do it wrong (and there are many ways to do it wrong), you can end up badly trashing your system.