#184 Partitioning tool

open
nobody
5
2010-11-26
2010-11-26
Anonymous
No

I pressed “Partitioning Tool” button in rEFIt menu and now I see a Bootcamp Windows pic when holding option key during boot. But I didn't install it. Could you please tell why did this happen and how to delete it? Can I install bootcamp? I really afraid to experiment because all my work is on HDD. Thank you!

Discussion

  • Joe van Tunen

    Joe van Tunen - 2010-11-26

    The Partitioning Tool modifies your MBR partition table so that it includes the partitions of the GUID partition table (GPT). This allows BIOS and Windows to see and use the partitions. You need to use a utility like fdisk, gdisk, or iPartition to change the MBR back to it's original state.

    What do the following commands say about your disk's partitions?

    diskutil list /dev/disk0
    sudo gpt -r show /dev/disk0
    sudo fdisk /dev/rdisk0

     
  • d0ke

    d0ke - 2010-11-30

    joevt, thank you, here what i got:

    Last login: Mon Nov 29 18:51:46 on console
    MBP-15:~ anatolylvovich$ diskutil list /dev/disk0
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *500.1 GB disk0
    1: EFI 209.7 MB disk0s1
    2: Apple_HFS Mac HD 499.8 GB disk0s2
    MBP-15:~ anatolylvovich$ sudo gpt -r show /dev/disk0
    Password:
    gpt show: /dev/disk0: Suspicious MBR at sector 0
    start size index contents
    0 1 MBR
    1 1 Pri GPT header
    2 32 Pri GPT table
    34 6
    40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
    409640 976101344 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
    976510984 262151
    976773135 32 Sec GPT table
    976773167 1 Sec GPT header
    MBP-15:~ anatolylvovich$ sudo fdisk /dev/rdisk0
    Disk: /dev/rdisk0 geometry: 60801/255/63 [976773168 sectors]
    Signature: 0xAA55
    Starting Ending
    #: id cyl hd sec - cyl hd sec [ start - size]
    ------------------------------------------------------------------------
    1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
    *2: AF 1023 254 63 - 1023 254 63 [ 409640 - 976101344] HFS+
    3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
    4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
    MBP-15:~ anatolylvovich$

     
  • Joe van Tunen

    Joe van Tunen - 2010-11-30

    Partition Tool put your Mac partition in the MBR (partition 2). You don't have Boot Camp installed so there's no Windows partition in the GPT or the MBR.

    To restore the MBR to it's original state (removes the Mac partition from the MBR), use the following command:

    sudo fdisk -e /dev/rdisk0

    Type ? for a list of commands, p to print the current contents of the MBR. Note that changes to the contents of the MBR are not saved to disk unless you use the w command (write) or q command (quite and save).

    You want to use the r command (reinit) to set the MBR back to the defaults. Use the p command (print) to verify the changes. It should look like this:

    Disk: /dev/rdisk0 geometry: 60801/255/63 [976773168 sectors]
    Offset: 0 Signature: 0xAA55
    Starting Ending
    #: id cyl hd sec - cyl hd sec [ start - size]
    ------------------------------------------------------------------------
    1: EE 1023 254 63 - 1023 254 63 [ 1 - 976773167] <Unknown ID>
    2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
    3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
    4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

    Once you're satisfied with the changes, use the q command (quit) to save and quit. If you don't want to save then use the exit command instead.

    If the Windows option still appears at boot time, then you probably also need to erase the boot code in the MBR. I believe the update command in fdisk will do that (unless Apple fixed it to actually add boot code). The following command will display the hex bytes of the boot code:

    sudo dd if=/dev/disk0 skip=0 count=1 | xxd

    If it's all mostly zeros (except for the last 4 lines where the partition info is stored) then it means there's no boot code in the MBR. If you see stuff like "Invalid Partition Table" or "Error loading operating system" or similar then it means there is boot code in the MBR.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks