«

»

Sep 25

Triple boot Linux, Windows, Mac OSX on Mac

  • Prerequisite.
      Installed Windows using Bootcamp in 2nd partition
  1. Add 2 FAT partition for linux, swap to macintosh HD on DiskUtility.
  2. Install linux to linux partion and bootloader to there just installed linux.
  3. To boot linux, Recommend to install rEFInd. (rEFIt was stopped developing.)
    then reboot, you can select os.
  4. Try to boot windows, maybe you couldn’t boot it.
    to solve its problem, follow the belowing process.
  5. solution
        refered site : https://discussions.apple.com/thread/4144252?start=210&tstart=0

    Takatoshis-MacBook-Pro:~ nao0811ta$ sudo gpt -r -vv show disk0
    gpt show: disk0: mediasize=750156374016; sectorsize=512; blocks=1465149168
    gpt show: disk0: PMBR at sector 0
    gpt show: disk0: Pri GPT at sector 1
    gpt show: disk0: Sec GPT at sector 1465149167
    start size index contents
    0 1 PMBR
    1 1 Pri GPT header
    2 32 Pri GPT table
    34 6
    40 409600 1 GPT part – C12A7328-F81F-11D2-BA4B-00A0C93EC93B
    409640 876809040 2 GPT part – 48465300-0000-11AA-AA11-00306543ECAC
    877218680 1269536 3 GPT part – 426F6F74-0000-11AA-AA11-00306543ECAC
    878488216 1384
    878489600 292966400 4 GPT part – C12A7328-F81F-11D2-BA4B-00A0C93EC93B
    1171456000 2099200 5 GPT part – 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
    1173555200 291592192 6 GPT part – EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
    1465147392 1743
    1465149135 32 Sec GPT table
    1465149167 1 Sec GPT header

    Takatoshis-MacBook-Pro:~ nao0811ta$ sudo fdisk /dev/disk0
    Disk: /dev/disk0 geometry: 91201/255/63 [1465149168 sectors]
    Signature: 0xAA55
    Starting Ending
    #: id cyl hd sec – cyl hd sec [ start – size]
    ————————————————————————
    1: EE 0 0 1 – 1023 254 63 [ 1 – 1465149167]
    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

    Takatoshis-MacBook-Pro:~ nao0811ta$ diskutil list
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *750.2 GB disk0
    1: EFI 209.7 MB disk0s1
    2: Apple_HFS Macintosh HD 448.9 GB disk0s2
    3: Apple_Boot Recovery HD 650.0 MB disk0s3
    4: EFI 150.0 GB disk0s4
    5: Linux Swap 1.1 GB disk0s5
    6: Microsoft Basic Data BOOTCAMP 149.3 GB disk0s6
    /dev/disk1
    #: TYPE NAME SIZE IDENTIFIER
    0: Apple_partition_scheme *21.0 MB disk1
    1: Apple_partition_map 32.3 KB disk1s1
    2: Apple_HFS rEFIt 20.9 MB disk1s2
    [/code]

    Takatoshis-MacBook-Pro:~ nao0811ta$ sudo gdisk /dev/disk0
    Password:
    GPT fdisk (gdisk) version 0.8.7

    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present

    Found valid GPT with protective MBR; using GPT.

    Command (? for help): ?
    b back up GPT data to a file
    c change a partition’s name
    d delete a partition
    i show detailed information on a partition
    l list known partition types
    n add a new partition
    o create a new empty GUID partition table (GPT)
    p print the partition table
    q quit without saving changes
    r recovery and transformation options (experts only)
    s sort partitions
    t change a partition’s type code
    v verify disk
    w write table to disk and exit
    x extra functionality (experts only)
    ? print this menu

    Command (? for help): p
    Disk /dev/disk0: 1465149168 sectors, 698.6 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 00003927-6A28-0000-B672-000087240000
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1465149134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 3133 sectors (1.5 MiB)

    Number Start (sector) End (sector) Size Code Name
    1 40 409639 200.0 MiB EF00 EFI system partition
    2 409640 877218679 418.1 GiB AF00 Customer
    3 877218680 878488215 619.9 MiB AB00 Recovery HD
    4 878489600 1171455999 139.7 GiB EF00 Kali Linux
    5 1171456000 1173555199 1.0 GiB 8200
    6 1173555200 1465147391 139.0 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: 6
    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y

    Creating entry for GPT partition #6 (MBR partition #2)
    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 1465149168 sectors (698.6 GiB)
    MBR disk identifier: 0x00006301
    MBR partitions:

    Number Boot Start Sector End Sector Status Code
    1 1 1173555199 primary 0xEE
    2 * 1173555200 1465147391 primary 0x07

    Recovery/transformation command (? for help): p
    Disk /dev/disk0: 1465149168 sectors, 698.6 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 00003927-6A28-0000-B672-000087240000
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1465149134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 3133 sectors (1.5 MiB)

    Number Start (sector) End (sector) Size Code Name
    1 40 409639 200.0 MiB EF00 EFI system partition
    2 409640 877218679 418.1 GiB AF00 Customer
    3 877218680 878488215 619.9 MiB AB00 Recovery HD
    4 878489600 1171455999 139.7 GiB EF00 Kali Linux
    5 1171456000 1173555199 1.0 GiB 8200
    6 1173555200 1465147391 139.0 GiB 0700 BOOTCAMP

    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) to /dev/disk0.
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Warning: The kernel may continue to use old or deleted partitions.
    You should reboot or remove the drive.
    The operation has completed successfully