Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

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

  1. #11
    Join Date
    Mar 2011
    Beans
    3

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

    I had this exact same issue. I was able to resolve it by booting to the Windows install CD and running the repair options (on Windows 7). It fixed all of the boot entries and now booting to Mac, Windows and Linux all works perfectly via rEFIt.

  2. #12
    Join Date
    Mar 2011
    Location
    The real U
    Beans
    4
    Distro
    Ubuntu

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

    Hopefully someone from this thread can help me. I was having the exact same issue as the first poster. I initially tried to use the win7 repair disc and use the repair options to fix the boot but it said that it was unable to fix the problems. I then turned to the poster who had the command line fix. I initially tried in Linux but after that neither the windows nor the ubuntu partition would boot. So now I am forced to do it in OSX. Here is what I am doing so perhaps someone can find my error:

    Code:
    Steve$ sudo gdisk /dev/disk0
    Password:
    GPT fdisk (gdisk) version 0.7.0
    
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with hybrid MBR; using GPT.
    
    Command (? for help): p
    Disk /dev/disk0: 976773168 sectors, 465.8 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 2E89F786-A1C8-4B7E-8B4A-21E2244E7F5A
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 976773134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 268197 sectors (131.0 MiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System Partition
       2          409640       624470127   297.6 GiB   AF00  CWKS Legia
       3       624734208       640356351   7.4 GiB     8200  Untitled
       4       640358400       786841599   69.8 GiB    0700  Untitled
       5       786843648       976773119   90.6 GiB    0700  BOOTCAMP
    
    Command (? for help): r
    
    Recovery/transformation command (? for help): h
    
    WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
    just hit the Enter key at the below prompt and your MBR partition table will
    be untouched.
    
    Type from one to three GPT partition numbers, separated by spaces, to be
    added to the hybrid MBR, in sequence: 4 5
    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
    
    Creating entry for GPT partition #4 (MBR partition #2)
    Enter an MBR hex code (default 07): 0c
    Set the bootable flag? (Y/N): y
    
    Creating entry for GPT partition #5 (MBR partition #3)
    Enter an MBR hex code (default 07): 
    Set the bootable flag? (Y/N): y
    
    Unused partition space(s) found. Use one to protect more partitions? (Y/N): n
    
    Recovery/transformation command (? for help): o
    
    Disk size is 976773168 sectors (465.8 GiB)
    MBR disk identifier: 0x00000000
    MBR partitions:
    
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1    640358399   primary     0xEE
       2      *      640358400    786841599   primary     0x0C
       3      *      786843648    976773119   primary     0x07
    
    Recovery/transformation command (? for help): w
    
    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
    PARTITIONS!!
    
    Do you want to proceed? (Y/N): y
    OK; writing new GUID partition table (GPT).
    Warning: The kernel may continue to use old or deleted partitions.
    You should reboot or remove the drive.
    The operation has completed successfully.
    Thanks for any help.

  3. #13
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

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

    Danipo,

    Please be more precise in describing how you're attempting to boot both Windows and Linux and what happens when you do so. For instance, are you selecting the OSes from rEFIt or from GRUB, and what error messages or other displays do you get? If necessary, use a digital camera to photograph the screen and post the images here so we can see them. It might also be worth running the Boot Info Script and posting the RESULTS.txt file it creates here, although they may not be 100% reliable since rEFIt is an EFI boot loader that (AFAIK) Boot Info Script ignores. (You'll need to boot with a Linux emergency disc to run the Boot Info Script.)

  4. #14
    Join Date
    Mar 2011
    Location
    The real U
    Beans
    4
    Distro
    Ubuntu

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

    Quote Originally Posted by srs5694 View Post
    Danipo,

    Please be more precise in describing how you're attempting to boot both Windows and Linux and what happens when you do so. For instance, are you selecting the OSes from rEFIt or from GRUB, and what error messages or other displays do you get? If necessary, use a digital camera to photograph the screen and post the images here so we can see them. It might also be worth running the Boot Info Script and posting the RESULTS.txt file it creates here, although they may not be 100% reliable since rEFIt is an EFI boot loader that (AFAIK) Boot Info Script ignores. (You'll need to boot with a Linux emergency disc to run the Boot Info Script.)
    My apologies for not being precise enough. My problem initially was exactly as described in the very first post and so I assumed that my problem was that I was running the hybrid boot script incorrectly and thus just posted that output. OSX boots up just fine. Before when I would select Linux it would bring me to the GRUB menu and and I had a number of choices. Selecting Ubuntu it would boot up just fine. If I selected Windows it would show a curser for a second, flash blue really quickly then come up with the message of "no bootable device found....insert bootable disc". This same thing would happen if I selected Windows. Reading the first post it sounded like my problem to a T and so I followed your instructions, I am not sure if I did follow them correctly but exactly what I did is posted above. Once I did that when I selected either Linux or Windows I would get the "no bootable device found" message. OSX still boots up just fine though.

    I checked out the boot info script and as I read it I need Linux to run it. Since I cannot currently boot into Linux and I do not have a live CD with me it is not an option at the moment, perhaps later tonight I can run that if it comes down to it. Thank you very much for you reply.

  5. #15
    Join Date
    Sep 2010
    Beans
    36

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

    Quote Originally Posted by srs5694 View Post
    Your problem is that your Windows partition no longer appears in your hybrid MBR. Presumably it's been "bumped out" by your Linux partition(s) when you repartitioned for Linux.

    Fortunately, the fix is fairly easy (although detail-oriented), but I recommend you read the hybrid MBR page to which I just linked before proceeding:


    1. Download my GPT fdisk (gdisk) from its Sourceforge download page. (Do not install the version in the Ubuntu repositories; that version is ancient and has known bugs.) You can download either the OS X or the Linux version (a .deb file for your architecture, either i386 or amd64); either will work.
    2. Install the GPT fdisk package that you downloaded. Double-clicking should do the job in either OS X or Linux.
    3. Open a Terminal window.
    4. Type "sudo gdisk /dev/sda" (in Ubuntu) or "sudo gdisk /dev/disk0" (in OS X). This will launch gdisk
    5. Type "p" to view your partition table, just as a sanity check. It should show the same partitions that GParted or other utilities show. (Note that OS X's Disk Utility omits the EFI System Partition, though.) If your table looks wrong, exit by typing "q" and investigate further before proceeding.
    6. Type "r" to enter the recovery & transformation menu. The gdisk prompt will change.
    7. Type "h" to create a new hybrid MBR. You'll be prompted to type up to three partition numbers. It looks like you'll want to type either "5 6" or "6 5" -- your Windows and shared-data partitions. You'll be prompted for more information. Tell it to put the 0xEE partition first in the table. Change the type code of the FAT partition to 0c and answer "Y" to the prompt about setting the Windows partition's boot/active flag. There's no point in creating a second protective partition in your case, so tell it not to do so.
    8. When it's done and you get back to the main gdisk prompt, type "o" to view the MBR partition table. It should include the Windows and shared-data partitions (identifiable by their start and end sectors; compare to the "p" output) and a partition of type 0xEE that covers most of the rest of the disk. If this looks wrong, either type "h" to try again or type "q" to quit, research it more, and try again when you better understand it.
    9. Type "w" to save your changes.



    There's a good chance that Windows will boot from the rEFIt menu at this point, but I can't guarantee that. If it doesn't, see if there's a Windows option in the GRUB menu and, if there is, try to boot using that. Post back with details about what's going wrong. It's possible that adjusting the partitions you include in the hybrid MBR will help Windows boot (Windows is very finicky about its boot partition!); or you might need to use the Windows recovery CD/DVD to restore Windows to bootability.
    I did this, and it worked great. I can now boot Windows from refit.

    But now when I boot Linux (which was working perfectly fine earlier), it boots Windows instead. I did exactly what you said here. Any ideas?

  6. #16
    Join Date
    Sep 2010
    Beans
    36

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

    http://refit.sourceforge.net/help/li...s_windows.html

    I found this page which may sort of answer my question, but I'm not really clear on what exactly I do to fix GRUB. What do I need to use to install GRUB? Can I do it from Mac or Windows? Will this be a problem when GRUB receives updates through Linux (which happens, I believe)?

    Thanks

  7. #17
    Join Date
    Mar 2009
    Beans
    24

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

    This happened to me as well. i discovered that the problem is because i was creating 4 partitions; 1 for Mac OS X, 1 for Windows, 1 for the Swap partition, and 1 for Ubuntu. now what i did to fix it and actually get the refit menu to work like it is supposed to is to create 3 partitions. 1 partition is Mac OS X, 1 Windows, and the last is the Ubuntu partition. the swap partition can be made as you install Ubuntu. this worked for me i hope it will work for others as well. here is a link to directions on how to install a triple boot on a macbook pro.
    rEFIt Triple boot
    Last edited by pbhound; February 7th, 2012 at 02:36 PM.

  8. #18
    Join Date
    Oct 2009
    Location
    Macau SAR
    Beans
    7
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    I noticed rEFlt was out of sync started trying to fix MRB and have and GPT with no luck so can some help me out with gsync


    Not sure what happened on my macbook white triple boot using rEFlt lastest version windows 7 says MBR is damaged repair with setup disk and that fails also ever since the Lion upgrade have had lots of problems getting this to triple boot again it would launch grub when I clicked the widows 7 logo but no big deal scroll and launch now I get an error not sure what changed reading above here is my drive wnabted to ask before I changed anything please help

    Disk /dev/disk0: 976773168 sectors, 465.8 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 3B18ADDE-44EE-449A-BFC6-CD3880728B0E
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 976773134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 526333 sectors (257.0 MiB)

    Number Start (sector) End (sector) Size Code Name
    1 40 409639 200.0 MiB 0700 EFI System Partition
    2 409640 154845431 73.6 GiB AF00 CRAIGMAC
    3 155107576 156377103 619.9 MiB AF00 Recovery HD
    4 156379136 320219135 78.1 GiB 0700
    5 381659136 386017279 2.1 GiB 8200
    6 320219136 381659135 29.3 GiB 0700
    12 386017280 976510983 281.6 GiB AF00 Storage


    Now I'm really messed up here is some more info


    *** Report for internal hard disk ***

    Current GPT partition table:
    # Start LBA End LBA Type
    1 40 409639 Basic Data
    2 409640 154845431 Mac OS X HFS+
    3 155107576 156377103 Mac OS X HFS+
    4 156379136 320219135 EFI System (FAT)
    5 381659136 386017279 Linux Swap
    6 320219136 381659135 Basic Data
    12 386017280 976510983 Mac OS X HFS+

    Current MBR partition table:
    # A Start LBA End LBA Type
    1 40 409639 0b FAT32 (CHS)
    2 * 409640 154845431 af Mac OS X HFS+
    3 155107576 156377103 af Mac OS X HFS+
    4 156379136 320219135 07 NTFS/HPFS

    MBR contents:
    Boot Code: Unknown, but bootable

    Partition at LBA 40:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 1, type Basic Data
    Listed in MBR as partition 1, type 0b FAT32 (CHS)

    Partition at LBA 409640:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 2, type Mac OS X HFS+
    Listed in MBR as partition 2, type af Mac OS X HFS+, active

    Partition at LBA 155107576:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 3, type Mac OS X HFS+
    Listed in MBR as partition 3, type af Mac OS X HFS+

    Partition at LBA 156379136:
    Boot Code: Windows BOOTMGR (Vista)
    File System: NTFS
    Listed in GPT as partition 4, type EFI System (FAT)
    Listed in MBR as partition 4, type 07 NTFS/HPFS

    Partition at LBA 381659136:
    Boot Code: None
    File System: Unknown
    Listed in GPT as partition 5, type Linux Swap

    Partition at LBA 320219136:
    Boot Code: None
    File System: ext4
    Listed in GPT as partition 6, type Basic Data

    Partition at LBA 386017280:
    Boot Code: None
    File System: Unknown
    Listed in GPT as partition 7, type Mac OS X HFS+
    Last edited by jettechfsr; March 22nd, 2012 at 05:36 AM. Reason: more info

Page 2 of 2 FirstFirst 12

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
  •