Results 1 to 10 of 18

Thread: Ubuntu install with rEFIt on MacBook pro: Grub apparently messed up my Windows 7 boot

Threaded View

  1. #1
    Join Date
    Mar 2011
    Beans
    6

    Ubuntu install with rEFIt on MacBook pro: Grub apparently messed up my Windows 7 boot

    This seems to be a variant of a problem many people have had, but after several hours trawling through various forums, I haven't seen a reliable match for my situation.

    In brief:
    Adding a third boot partition (of Ubuntu) to my existing dual boot of OSX 10.6 and Windows 7 seems to have crippled the Windows boot from working, because Grub apparently takes over the process. Yet Grub does *not* appear to be on the Windows partition.

    More verbose:
    I have an older MacBook Pro (3.1, running Snow Leopard) that I recently refitted with a new 240GB SSD HD. With the extra space (it was previously only 120GB) I decided to add a dual boot with Windows 7 using bootcamp. This all went swimmingly well. Encouraged, I decided to follow this Lifehacker article's suggestion and triple-boot the machine with Ubuntu (I'd never used Linux before):

    http://lifehacker.com/#!5531037/how-...-camp-required

    So I now have the nice rEFIt boot partition selection screen, and, indeed, I'm up and running in Ubuntu, and enjoying it.

    Only one problem: I can't get into Windows any more. If I try to go in through rEFIt *or* by holding down OPT at startup and selecting the windows partition directly, the result is the same: I get thrown into Grub's selector, and selecting the Windows partition from there leads to an error message and a dead end.

    Having read through numerous postings, I get the impression that Grub is doing something or living somewhere that it ought not to be, but in most cases I've seen, people had accidentally installed Grub onto the Windows partition (or indeed onto EVERY partition). So far as I can tell, this isn't the case with me. Here's my boot summary:

    Code:
    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 283485000 
        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:       hfsplus
        Boot sector type:  -
        Boot sector info:  
        Operating System:  
        Boot files/dirs:   
    
    sda3: _________________________________________________________________________
    
        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
    
    sda4: _________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info:  
    
    sda5: _________________________________________________________________________
    
        File system:       vfat
        Boot sector type:  BSD4.4: Fat32
        Boot sector info:  According to the info in the boot sector, sda5 starts 
                           at sector 0. But according to the info from fdisk, 
                           sda5 starts at sector 314015744.
        Operating System:  
        Boot files/dirs:   
    
    sda6: _________________________________________________________________________
    
        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: 240.1 GB, 240057409536 bytes
    255 heads, 63 sectors/track, 29185 cylinders, total 468862128 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       409,639       409,639  ee GPT
    /dev/sda2    *        409,640   273,847,143   273,437,504  af HFS
    /dev/sda3         274,110,464   310,370,303    36,259,840  83 Linux
    /dev/sda4         310,370,304   314,015,743     3,645,440  82 Linux swap / Solaris
    
    
    GUID Partition Table detected.
    
    Partition           Start           End          Size System
    /dev/sda1              40       409,639       409,600 System/Boot Partition
    /dev/sda2         409,640   273,847,143   273,437,504 HFS+
    /dev/sda3     274,110,464   310,370,303    36,259,840 Linux or Data
    /dev/sda4     310,370,304   314,015,743     3,645,440 Linux Swap
    /dev/sda5     314,015,744   332,816,383    18,800,640 Linux or Data
    /dev/sda6     332,816,384   468,860,927   136,044,544 Linux or Data
    
    blkid -c /dev/null: ____________________________________________________________
    
    Device           UUID                                   TYPE       LABEL                         
    
    /dev/sda1        70D6-1701                              vfat       EFI                           
    /dev/sda2        c5bee107-051f-385e-8555-0eabcd9552b1   hfsplus    Macintosh HD                  
    /dev/sda3        4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3   ext4                                     
    /dev/sda4        17c1e3bb-f9de-4584-b43a-a8022f79b8b4   swap                                     
    /dev/sda5        71C8-1202                              vfat       SHARED                        
    /dev/sda6        CE7A834E7A83326F                       ntfs       BOOTCAMP                      
    /dev/sda: PTTYPE="gpt" 
    
    ============================ "mount | grep ^/dev  output: ===========================
    
    Device           Mount_Point              Type       Options
    
    /dev/sda3        /                        ext4       (rw,errors=remount-ro,user_xattr,commit=600)
    
    
    =========================== sda3/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,gpt3)'
    search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    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,gpt3)'
    search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    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-27-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod part_gpt
    	insmod ext2
    	set root='(hd0,gpt3)'
    	search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    	linux	/boot/vmlinuz-2.6.35-27-generic root=UUID=4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3 ro   quiet splash
    	initrd	/boot/initrd.img-2.6.35-27-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.35-27-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod part_gpt
    	insmod ext2
    	set root='(hd0,gpt3)'
    	search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    	echo	'Loading Linux 2.6.35-27-generic ...'
    	linux	/boot/vmlinuz-2.6.35-27-generic root=UUID=4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3 ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.35-27-generic
    }
    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,gpt3)'
    	search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3 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,gpt3)'
    	search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    	echo	'Loading Linux 2.6.35-22-generic ...'
    	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3 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,gpt3)'
    	search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_gpt
    	insmod ext2
    	set root='(hd0,gpt3)'
    	search --no-floppy --fs-uuid --set 4e6b4af7-35b2-46a0-bd0f-6a385e7c18a3
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Mac OS X (32-bit) (on /dev/sda2)" {
    	insmod part_gpt
    	insmod hfsplus
    	set root='(hd0,gpt2)'
    	search --no-floppy --fs-uuid --set e57c5db0b8b4f67f
            load_video
            set do_resume=0
            if [ /var/vm/sleepimage -nt10 / ]; then
               if xnu_resume /var/vm/sleepimage; then
                 set do_resume=1
               fi
            fi
            if [ $do_resume = 0 ]; then
               xnu_uuid e57c5db0b8b4f67f uuid
               if [ -f /Extra/DSDT.aml ]; then
                  acpi -e /Extra/DSDT.aml
               fi
               xnu_kernel /mach_kernel boot-uuid=${uuid} rd=*uuid
               if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
                  xnu_mkext /System/Library/Extensions.mkext
               else
                  xnu_kextdir /System/Library/Extensions
               fi
               if [ -f /Extra/Extensions.mkext ]; then
                  xnu_mkext /Extra/Extensions.mkext
               fi
               if [ -d /Extra/Extensions ]; then
                  xnu_kextdir /Extra/Extensions
               fi
               if [ -f /Extra/devprop.bin ]; then
                  xnu_devprop_load /Extra/devprop.bin
               fi
               if [ -f /Extra/splash.jpg ]; then
                  insmod jpeg
                  xnu_splash /Extra/splash.jpg
               fi
               if [ -f /Extra/splash.png ]; then
                  insmod png
                  xnu_splash /Extra/splash.png
               fi
               if [ -f /Extra/splash.tga ]; then
                  insmod tga
                  xnu_splash /Extra/splash.tga
               fi
            fi
    }
    menuentry "Mac OS X (64-bit) (on /dev/sda2)" {
    	insmod part_gpt
    	insmod hfsplus
    	set root='(hd0,gpt2)'
    	search --no-floppy --fs-uuid --set e57c5db0b8b4f67f
            load_video
            set do_resume=0
            if [ /var/vm/sleepimage -nt10 / ]; then
               if xnu_resume /var/vm/sleepimage; then
                 set do_resume=1
               fi
            fi
            if [ $do_resume = 0 ]; then
               xnu_uuid e57c5db0b8b4f67f uuid
               if [ -f /Extra/DSDT.aml ]; then
                  acpi -e /Extra/DSDT.aml
               fi
               xnu_kernel64 /mach_kernel boot-uuid=${uuid} rd=*uuid
               if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
                  xnu_mkext /System/Library/Extensions.mkext
               else
                  xnu_kextdir /System/Library/Extensions
               fi
               if [ -f /Extra/Extensions.mkext ]; then
                  xnu_mkext /Extra/Extensions.mkext
               fi
               if [ -d /Extra/Extensions ]; then
                  xnu_kextdir /Extra/Extensions
               fi
               if [ -f /Extra/devprop.bin ]; then
                  xnu_devprop_load /Extra/devprop.bin
               fi
               if [ -f /Extra/splash.jpg ]; then
                  insmod jpeg
                  xnu_splash /Extra/splash.jpg
               fi
               if [ -f /Extra/splash.png ]; then
                  insmod png
                  xnu_splash /Extra/splash.png
               fi
               if [ -f /Extra/splash.tga ]; then
                  insmod tga
                  xnu_splash /Extra/splash.tga
               fi
            fi
    }
    menuentry "Windows 7 (loader) (on /dev/sda6)" {
    	insmod part_gpt
    	insmod ntfs
    	set root='(hd0,gpt6)'
    	search --no-floppy --fs-uuid --set ce7a834e7a83326f
    	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 ###
    
    =============================== sda3/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
    # Commented out by Dropbox
    # /dev/sda3       /               ext4    errors=remount-ro 0       1
    /dev/sda4       none            swap    sw              0       0
    /dev/sda3 / ext4 errors=remount-ro,user_xattr 0 1
    
    =================== sda3: Location of files loaded by Grub: ===================
    
    
     145.1GB: boot/grub/core.img
     155.6GB: boot/grub/grub.cfg
     142.3GB: boot/initrd.img-2.6.35-22-generic
     143.0GB: boot/initrd.img-2.6.35-27-generic
     145.1GB: boot/vmlinuz-2.6.35-22-generic
     145.1GB: boot/vmlinuz-2.6.35-27-generic
     143.0GB: initrd.img
     142.3GB: initrd.img.old
     145.1GB: vmlinuz
     145.1GB: vmlinuz.old
    I was considering trying to execute a repair with my Windows 7 CD tonight, but it doesn't seem obvious to me that this would help, given that Grub isn't actually living in that partition.

    I've also wondered whether there might be a problem having Windows 7 on a later partition rather than sitting adjacent to the OSX partition. (I resized the OSX downwards so that I could create the small partition for Ubuntu, which sits in the middle and appears as the second option in the rEFIt selection screen.)

    Not sure if the boot summary's mention of the core.img file not being located where the system was expecting is of relevance.

    Any suggestions gratefully received.

    K
    Last edited by Kaitain; March 10th, 2011 at 09:04 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •