PDA

View Full Version : [SOLVED] Install ubuntu next to Win7 cannot boot



FLCL
April 14th, 2011, 05:55 PM
Hey everyone, I just installed Ubuntu next to windows 7 (because for some reason I couldn't get it to work on a separate partition, kept saying could not find root directory or something).

Anyway, after I successfully complete the install, I am given the options in the boot screen for Ubuntu or Windows 7(loader), but Windows 7 doesn't boot.

It just sits there with a black screen and a blinking cursor. I can mount the Windows side in Ubuntu and see all the files? I really need to get Windows up and booting, can you please help?

Here is the bootscript result:

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 411648 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: Bios Boot Partition
Boot sector type: Unknown
Boot sector info:

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 /grldr

sda4: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 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 1,250,263,727 1,250,263,727 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 413,695 2,048 Bios Boot Partition
/dev/sda3 937,547,776 1,171,862,754 234,314,979 Linux or Data
/dev/sda4 413,696 912,973,823 912,560,128 Linux or Data
/dev/sda5 912,973,824 937,547,775 24,573,952 Linux Swap

blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 70D6-1701 vfat EFI
/dev/sda3 36E2B95AE2B91ED5 ntfs
/dev/sda4 ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9 ext4
/dev/sda5 05236d84-7657-4454-8008-99714f62e587 swap
/dev/sda: PTTYPE="gpt"

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

Device Mount_Point Type Options

/dev/sda4 / ext4 (rw,errors=remount-ro,commit=0)


=========================== sda4/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,gpt4)'
search --no-floppy --fs-uuid --set ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9
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,gpt4)'
search --no-floppy --fs-uuid --set ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9
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,gpt4)'
search --no-floppy --fs-uuid --set ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9 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,gpt4)'
search --no-floppy --fs-uuid --set ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9 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,gpt4)'
search --no-floppy --fs-uuid --set ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_gpt
insmod ext2
set root='(hd0,gpt4)'
search --no-floppy --fs-uuid --set ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9
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 36e2b95ae2b91ed5
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 ###

=============================== sda4/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/sda4 during installation
UUID=ea53aa13-06c6-4e4b-b845-7cd4c39c1fc9 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=05236d84-7657-4454-8008-99714f62e587 none swap sw 0 0

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


339.6GB: boot/grub/core.img
58.4GB: boot/grub/grub.cfg
56.3GB: boot/initrd.img-2.6.35-22-generic
339.6GB: boot/vmlinuz-2.6.35-22-generic
56.3GB: initrd.img
339.6GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda2

00000000 52 e8 28 01 74 08 56 be 33 81 e8 4c 01 5e bf f4 |R.(.t.V.3..L.^..|
00000010 81 66 8b 2d 83 7d 08 00 0f 84 e9 00 80 7c ff 00 |.f.-.}.......|..|
00000020 74 46 66 8b 1d 66 8b 4d 04 66 31 c0 b0 7f 39 45 |tFf..f.M.f1...9E|
00000030 08 7f 03 8b 45 08 29 45 08 66 01 05 66 83 55 04 |....E.)E.f..f.U.|
00000040 00 c7 04 10 00 89 44 02 66 89 5c 08 66 89 4c 0c |......D.f.\.f.L.|
00000050 c7 44 06 00 70 50 c7 44 04 00 00 b4 42 cd 13 0f |.D..pP.D....B...|
00000060 82 bb 00 bb 00 70 eb 68 66 8b 45 04 66 09 c0 0f |.....p.hf.E.f...|
00000070 85 a3 00 66 8b 05 66 31 d2 66 f7 34 88 54 0a 66 |...f..f1.f.4.T.f|
00000080 31 d2 66 f7 74 04 88 54 0b 89 44 0c 3b 44 08 0f |1.f.t..T..D.;D..|
00000090 8d 83 00 8b 04 2a 44 0a 39 45 08 7f 03 8b 45 08 |.....*D.9E....E.|
000000a0 29 45 08 66 01 05 66 83 55 04 00 8a 54 0d c0 e2 |)E.f..f.U...T...|
000000b0 06 8a 4c 0a fe c1 08 d1 8a 6c 0c 5a 52 8a 74 0b |..L......l.ZR.t.|
000000c0 50 bb 00 70 8e c3 31 db b4 02 cd 13 72 50 8c c3 |P..p..1.....rP..|
000000d0 8e 45 0a 58 c1 e0 05 01 45 0a 60 1e c1 e0 03 89 |.E.X....E.`.....|
000000e0 c1 31 ff 31 f6 8e db fc f3 a5 1f e8 3e 00 74 06 |.1.1........>.t.|
000000f0 be 3b 81 e8 63 00 61 83 7d 08 00 0f 85 1d ff 83 |.;..c.a.}.......|
00000100 ef 0c e9 0f ff e8 24 00 74 06 be 3d 81 e8 49 00 |......$.t..=..I.|
00000110 5a ea 00 82 00 00 be 40 81 e8 3d 00 eb 06 be 45 |Z......@..=....E|
00000120 81 e8 35 00 be 4a 81 e8 2f 00 eb fe bb 17 04 80 |..5..J../.......|
00000130 27 03 c3 6c 6f 61 64 69 6e 67 00 2e 00 0d 0a 00 |'..loading......|
00000140 47 65 6f 6d 00 52 65 61 64 00 20 45 72 72 6f 72 |Geom.Read. Error|
00000150 00 bb 01 00 b4 0e cd 10 46 8a 04 3c 00 75 f2 c3 |........F..<.u..|
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 01 48 06 00 00 00 00 00 2e 00 20 08 |.....H........ .|
00000200

FLCL
April 14th, 2011, 08:59 PM
bump. Nobody?

*Edit* Okay, I have converted to MBR using gdisk, and have successfully booted up into windows (using a iBoot disc, have yet to test without it). Now that I have Widows running, how do I get it so I can get dual boot again? Do I need to reinstall Grub2? Will that cause a repeat of this issue again or can I just add ubuntu to windows bootloader?

oldfred
April 14th, 2011, 10:37 PM
How did you ever get gpt, windows 7 64bit only works with gpt if you do not use BIOS but use UEFI.

So are you booting with BIOS or UEFI? I have gpt with my Ubuntu drive and boot with BIOS and grub2 without issue. But my XP is still on another drive with MBR(msdos),

Long thread - real issue of UEFI not apparent until later in thread.
Dual boot UEFI & windows UEFI post 76
http://ubuntuforums.org/showthread.php?t=1719851&page=8

FLCL
April 15th, 2011, 05:06 AM
I'm not entirely sure myself how this all happened lol. The partition Windows was on didn't have GPT but somehow my Windows drive would not boot and I could not use my install disc to fix it either.

I had to convert all the partitions to MBR and then it let me use the repair disc that I was able to use fixmbr and set the partition to primary active. I havent gotten around to reinstalling Grub2 yet..kinda afraid to mess things up.

During this process one of my storage partitions got corrupt and I lost around 300GB of data..so not fun. As for the BIOS of UEFI, I'm on BIOS

oldfred
April 15th, 2011, 05:15 AM
Well the sda1 is the efi partition and sda2 is a bios_grub partition. Windows often wants sda2 in efi mode to be another (hidden) boot partition.


Boot script is still showing drive as gpt, but windows will not boot if BIOS and gpt. Linux works fine with gpt and BIOS and is just starting to work with UEFI boots.

You may still be better with UEFI if your motherboard supports that.
Windows 7 64bit UEFI 2.x boot:
http://www.insanelymac.com/forum/index.php?showtopic=186440

We did not know OP has UEFI issues until many posts.
Dual boot UEFI & windows UEFI post 76
http://ubuntuforums.org/showthread.php?t=1719851&page=8


I have never converted. Not sure how gdisk will handle 5 partitions. It should make one extended and put a couple in as logical, but do not know if it has the logic to do that. srs5694 regularly posts and may be able to tell you details.

Converting:
http://ubuntuforums.org/showthread.php?t=1454252
Windows convert from gpt to MBR. Besure to have good backups - srs5694
http://ubuntuforums.org/showthread.php?t=1718966
Use parted or gparted to remove gpt if no data to save:
http://ubuntuforums.org/showthread.php?t=1719851&page=2 post #20
GPT fdisk Tutorial -srs5694 in forums
http://ubuntuforums.org/showthread.php?t=1439794
http://www.rodsbooks.com/gdisk/

oldfred
April 15th, 2011, 05:30 AM
Boot script does not parse efi partition.

http://ubuntuforums.org/showthread.php?t=1719851&page=8
Do you have this file in your sda1? From post 81 of link above.
efi\Microsoft\Boot\bootmgfw.efi

If so I would definitely consider UEFI. But you have to install grub.efi not the standard grub2. Install should have seen efi, in link above we were not sure if there is a bug in grub's installer that overwrote the efi partition. If windows is set up to UEFI boot I would back up partition before installing grub2 to make sure it does not erase your windows boot file(s) in the efi partition.

srs5694
April 15th, 2011, 04:14 PM
I have never converted. Not sure how gdisk will handle 5 partitions. It should make one extended and put a couple in as logical, but do not know if it has the logic to do that. srs5694 regularly posts and may be able to tell you details.

Ideally, gdisk will convert all the partitions, making some of them logical; however, logical partitions require at least one unallocated sector before each partition, and they must be contiguous, so it's not always possible to convert them all. Given the partitions listed in the first post, gdisk would probably make 1 and 2 logical and 3, 4, and 5 primary, unless you manually deleted one or more partitions. If you did that, you could turn some or all of those logicals into primaries.

My suspicion about what happened is this:



Computer originally had Windows in an MBR configuration.
FLCL installed OS X in a Hackintosh configuration with a hybrid MBR (http://www.rodsbooks.com/gdisk/hybrid.html) (evidence: EFI System Partition is exactly the size and location that OS X uses; mention of iBoot; the fact that Windows was booting from a GPT disk on a BIOS-based computer).
FLCL deleted OS X and installed Linux. The Linux installer saw GPT and converted the hybrid MBR to a conventional protective MBR, thus rendering Windows unbootable. It was in this state for post #1 of this thread.



Whether this is accurate or not is largely academic.


The partition Windows was on didn't have GPT but somehow my Windows drive would not boot and I could not use my install disc to fix it either.

I just want to clear up a misconception here: Individual partitions dont "have GPT;" the GUID Partition Table (GPT) is a whole-disk partitioning scheme. The entire disk is either GPT or not GPT. Ordinarily, the same is true of the Master Boot Record (MBR); however, somebody (I think Apple) invented a hideous hack known as a hybrid MBR, (http://www.rodsbooks.com/gdisk/hybrid.html) which Apple uses to allow Windows to boot from a GPT disk on Macs, and which the Hackintosh community has (largely unknowingly) embraced as well. In a hybrid MBR, MBR partition table structures are added to a GPT disk, making a "hybrid" partitioning system in which all the partitions have GPT descriptions and up to three of them have MBR entries. This achieves its intended goal of enabling Windows to boot from a GPT disk, but it's extremely dangerous and can cause problems down the road. (You ran straight into one of them, if my hypothesis is correct.) If I'm right about all this, your Windows partition might originally have been an MBR partition, but was converted to GPT with a hybrid MBR entry (or maybe you started your partitions from scratch and re-installed Windows to a hybrid MBR partition at some point).

As to the question of booting Linux, GRUB must be re-installed at this point. The early boot code for GRUB on GPT vs. MBR is very different, and the only option after a GPT-to-MBR conversion (or an MBR-to-GPT conversion) is to re-install GRUB. There is of course a risk that this will go badly, but chances are it will work. You might want to check your GRUB configuration files (in /boot/grub/grub.cfg) for references to partitions by number (/dev/sda3 or (hd0,3) or whatever), and edit them as necessary for the new partitioning scheme. (You might not need to change anything; Ubuntu tends to use UUIDs rather than conventional device IDs.)

FLCL, if you need more advice, I suggest you boot up Ubuntu's installer into live CD mode, re-run the Boot Info Script, and post the new results; or at least post the output of "sudo fdisk -lu /dev/sda". That will tell us how your partitions are currently set up.

FLCL
April 15th, 2011, 09:42 PM
Wow, thanks for all the information guys, I'll boot up into the live environment and re run the boot info script. Also you Srs is correct in his suspicious of a hackintosh install. I did previously have a hackintosh installed and deleted the partition to install linux.

Right now I'm not entirely sure the state of Ubuntu, as Acronis Disk Director doesn't support ext4,however I will boot up and post back.

*Edit* I cannot boot into ubuntu from the disc. The first time i got blocks of white halfway up the screen right after the load, I rebooted and then it just hung at the load screen and if i pressed a key it would go another dot, but not actually load :/

srs5694
April 16th, 2011, 03:43 PM
*Edit* I cannot boot into ubuntu from the disc. The first time i got blocks of white halfway up the screen right after the load, I rebooted and then it just hung at the load screen and if i pressed a key it would go another dot, but not actually load :/

It's not clear what you mean by "the disc" -- is this the Ubuntu installation disc in "live CD" mode, the hard disk, some of CD or DVD, or something else?

You should be able to boot the Ubuntu CD into "live CD" mode and run Boot Info Script from there. It's also possible to re-install GRUB from that disc, but I don't recall the precise commands to do so. (I generally use Super GRUB 2 Disk (http://www.supergrubdisk.org/) to boot the original installation and re-install GRUB from that.)

oldfred
April 16th, 2011, 03:45 PM
If you are getting some dots you may have "booted" grub, but are having video issues with Ubuntu.

To install Ubuntu, boot from the cd press any key at accessibility circle and keyboard, press F6 and then select the nomodeset option.
USB boot - At the menu press tab on the first option to edit the boot options and replaced the 'splash' option with 'nomodeset'.
then
On first boot after install, press e on getting the GRUB bootloader.
Hold shift from BIOS boot to get menu if only one system installed.
Using arrow keys navigate to and delete quiet and splash and type the word nomodeset in their place
Press Ctrl and X to boot (low graphics mode)


How to set NOMODESET and other kernel boot options in grub2
http://ubuntuforums.org/showthread.php?t=1613132

Some other settings:
http://ubuntu-tutorials.com/2010/05/06/ubuntu-10-04-lucid-blank-screen-at-startup-workaround/
* Older Intel video card: i915.modeset=1 or i915.modeset=0
* nVidia: nomodeset
* Generic: xforcevesa or nouveau.modeset=0
* Radeon: radeon.modeset=0

FLCL
April 20th, 2011, 07:15 AM
Sorry for the late reply, just getting around to this again. I should have clarified, sorry guys. What I meant is with the installation/live CD it will finish loading up ubuntu but right before it goes to the keyboard/language screen(or whatever immediately follows the Ubuntu loading splash) I get bars coming up on a black screen, as oldfred said this is most likely a video issue..though I'm really not sure why its doing it now or how to fix this.

I will most likely be wiping my entire drive and starting fresh here soon anyway. One problem that is bound to re-occur though is when I last selected a partition to install to it said there was no root and couldnt install, which is what really got me into this mess(it was a mix of things to be fair lol)I formatted the unallocated space for ext4 and still received that error. Any ideas?

Mark Phelps
April 20th, 2011, 02:33 PM
My own experience (with both Ubuntu and MS Windows) has been to NOT format a partition in advance, but let the installer do the formatting of an unallocated space.

You should try that instead of installing to an existing partition. It might work better.

srs5694
April 20th, 2011, 02:39 PM
If you're doing manual partitioning, you need to specify mount points for your filesystem partitions. One of these must be the "root" (aka "/"). If you haven't set a partition as the root (/) partition, you won't be able to install. Your error message sounds like this is what's happening.

FLCL
April 20th, 2011, 11:20 PM
Awesome you all have been a ton of help. I have the partition all set up for install the only part I'm not certain about is where to install the loader. Do I want to install it on the same partition as Windows 7 loader or some other place?

srs5694
April 20th, 2011, 11:32 PM
Do not install GRUB to the Windows 7 partition! In most cases, you should install it to the MBR of the boot drive (normally /dev/sda). Sometimes installing it to the Linux root (/) partition or, if you've got one, a /boot partition, is in order. This works best if you're relying on a third-party boot loader as your primary boot loader and want to use GRUB only to boot Linux. If you want to use GRUB to select which OS to boot, putting in the MBR is usually best.

FLCL
April 21st, 2011, 03:46 AM
Okay thanks, as far as swap space goes, how do I assign the partition for swap? I have unallocated space left after the partition for ubuntu but all options are grayed out. It's about 6.3GB of space.

Edit: i figured out the swap, was a partitioning issue, reached max primary

FLCL
April 21st, 2011, 06:43 AM
Successfully installed and working with dual boot :). Thanks for all the help srs and oldfred as well as the imput from Mark, much appreciated.