partitioning - extending a triple boot system: quad boot and beyond?

04
2013-08
  • prusswan

    I have a working triple boot system using Refit, that is modeled closely after the steps detailed in https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation, except that I'm using OSX Lion, Ubuntu 12.04 and Windows 7.

    EFI + HFS + Linux + swap (hidden from MBR) + NTFS

    I am contemplating the creation of more logical partitions (by carving them out of the extended partition) so that I can potentially install newer OSes such as Windows 8 on them while keeping the current ones. I know Linux variants wouldn't have a problem on logical partitions; I'm more concerned about Mountain Lion and Windows 8 and how their presence will affect the current hybrid GPT-MBR tables.

    I understand that repartitioning the extended partition in Ubuntu partitions in the working setup, would possibly break the partition tables. Would I have better luck if I were to create all the desired partitions in a fresh system with only Lion installed?

    Update:

    Right now it looks like I have no choice but to stuff the Windows installations onto the MBRs, and sort out the partition tables after the Macs and Linuxes have been installed. Installation of the second OSX while not a problem, actually changes the numbering of the existing partitions, so those have to be sorted out using gdisk. It was unfortunate that none of the Windows could be put into GPT on such a system, and having two Windows on MBR mean that files cannot be exchanged easily across the three OS families, since there is only one MBR slot left for either OSX or Linux, so this is really a step back from the triple boot. Maybe this is not such a good idea after all.

  • Answers
  • Rod Smith

    DO NOT, UNDER ANY CIRCUMSTANCES, CREATE AN EXTENDED PARTITION ON A DISK THAT USES A HYBRID MBR!!

    Hybrid MBRs are used on most Macs that dual-boot with Windows, and frequently on Macs that dual-boot with Linux. It's virtually certain that you've got a hybrid MBR. Hybrid MBRs cause a lot of pain even when used just with primary partitions on the MBR side, which is the only configuration that Apple's tools will create. If you already have a setup with an extended partition on a hybrid MBR disk, then your configuration is at risk of serious partition table corruption, and I recommend you read the entirety of the hybrid MBR page to which I've just linked, figure out what your partition layout really is, and reconfigure it to be safer. If you don't already have an extended partition on a hybrid MBR, then don't create one.

    In fact, in a hybrid MBR configuration, neither Linux nor OS X uses the MBR side of the table; only Windows uses the hybrid MBR. Linux and OS X both use the GPT side of the hybrid MBR, so for their purposes, you can create as many GPT partitions as you like. If you need more partitions in Windows, you can use gdisk to create a hybrid MBR that places up to three partitions in the primary MBR positions. More than that on one disk is not possible without creating an extended partition, which as I say is inadvisable in the extreme.

  • prusswan

    Turns out that I could install up to 6 operating systems (2 from each major family) on such a setup:

    (EFI)
    Snow Leopard
    Mountain Lion
    * Ubuntu 12.04
    Arch 
    (Linux Swap)
    * Windows 7
    * Windows 8
    

    The asterisks indicate the systems that had to be placed on the MBR. The key is that while the OSX systems can boot on their own, the same cannot be said for the Arch; it relies on the grub2 bootloader on Ubuntu, which means a MBR partition can be used to boot another GPT partition that is not on the MBR! Going by this reasoning, probably more Linux systems can be installed on top of this setup.

    PS: It is also a good idea to install gdisk onto the primary operating system (usually OSX, via homebrew) so that it is easily accessible for fixing up the other operating systems if needed.


  • Related Question

    partitioning - Can a hard drive using a GPT partition table be booted in an AMD computer?
  • Phenom

    I have a 64-bit AMD Phenom II and I'm installing a new hard drive on it. One of the options when formatting the drive is to use a GPT partition table instead of an MBR. I read somewhere that only Itaniums can boot disks formatted with GPT. What about AMDs?

    Also, are there any advantages of using GPT instead of MBR for a partition table? Is it more secure?


  • Related Answers
  • William Hilsum

    I read somewhere that only Itaniums can boot disks formatted with GPT. What about AMDs?

    AMD Opteron server CPUs certainly do support GUID Partition Tables.

    are there any advantages of using GPT instead of MBR for a partition table? Is it more secure?

    1. What is a GPT disk? The GUID Partition Table (GPT) was introduced as part of the Extensible Firmware Interface (EFI) initiative. GPT provides a more flexible mechanism for partitioning disks than the older Master Boot Record (MBR) partitioning scheme that has been common to PCs.

    A partition is a contiguous space of storage on a physical or logical disk that functions as though it were a physically separate disk. Partitions are visible to the system firmware and the installed operating systems. Access to a partition is controlled by the system firmware before the system boots the operating system, and then by the operating system after it starts.

    1. What is wrong with MBR partitioning? MBR disks support only four partition table entries. If more partitions are wanted, a secondary structure known as an extended partition is necessary. Extended partitions can then be subdivided into one or more logical disks. By convention, Windows creates MBR disk partitions and logical drives on cylinder boundaries based on the reported geometry, although this information no longer has any relationship to the physical characteristics of the hardware (disk driver or RAID controller)., For Windows Vista and Windows Server 2008, more logical boundaries will be selected when the hardware provides better hints at the true cache or physical alignment. Because this partition information is stored on the drive itself, the operating system is not dependent on the alignment. MBR partitioning rules are complex and poorly specified. For example, does cylinder alignment mean that each partition must be at least one cylinder in length? An MBR partition is identified by a two-byte field, and coordination is necessary to avoid collision. IBM originally provided that coordination; today there is no single authoritative list of partition identifiers.

    Another common practice is to use partitioned or "hidden" sectors to hold specific information. That practice is undocumented and results in severe system problems that are difficult to debug. Over the years, vendor-specific implementations and tools have been released to the public, making support difficult.

    1. Why do we need GPT? GPT disks can grow to a very large size. The number of partitions on a GPT disk is not constrained by temporary schemes such as container partitions as defined by the MBR Extended Boot Record (EBR).

    The GPT disk partition format is well defined and fully self-identifying. Data critical to platform operation is located in partitions and not in unpartitioned or "hidden" sectors. GPT disks use primary and backup partition tables for redundancy and CRC32 fields for improved partition data structure integrity. The GPT partition format uses version number and size fields for future expansion.

    Each GPT partition has a unique identification GUID and a partition content type, so no coordination is necessary to prevent partition identifier collision. Each GPT partition has a 36-character Unicode name, which means that any software can present a human-readable name for the partition without any additional understanding of the partition.

    1. Where can I find the specification for GPT disk partitioning? Chapter 16 of the Extensible Firmware Interface (EFI) specification defines the GPT format. This document is available at http://www.Intel.com/technology/efi/

    2. Is EFI required for a GPT disk? No. GPT disks are self-identifying. All the information needed to interpret the partitioning scheme of a GPT disk is completely contained in structures in specified locations on the physical media.

    3. How big can a GPT disk be? In theory, a GPT disk can be up to 2^64 logical blocks in length. Logical blocks are commonly 512 bytes in size.

    The maximum partition (and disk) size is a function of the operating system version. Windows XP and the original release of Windows Server 2003 have a limit of 2TB per physical disk, including all partitions. For Windows Server 2003 SP1 Windows XP x64 edition, and later versions, the maximum raw partition of 18 exabytes can be supported. (Windows file systems currently are limited to 256 terabytes each.)

    1. How many partitions can a GPT disk have? The specification allows an almost unlimited number of partitions, but the Windows implementation restricts this to 128 partitions. The number of partitions is limited by the amount of space reserved for partition entries in the GPT.

    2. Can a disk be both GPT and MBR? No. However, all GPT disks contain a Protective MBR.

    3. What is a Protective MBR? The Protective MBR, beginning in sector 0, precedes the GPT partition table on the disk. The MBR contains one type 0xEE partition that spans the disk.

    4. Why does the GPT have a Protective MBR? The Protective MBR protects GPT disks from previously released MBR disk tools such as Microsoft MS-DOS FDISK or Microsoft Windows NT Disk Administrator. These tools are not aware of GPT and do not know how to properly access a GPT disk. Legacy software that does not know about GPT interprets only the Protected MBR when it accesses a GPT disk. These tools will view a GPT disk as having a single encompassing (possibly unrecognized) partition by interpreting the Protected MBR, rather than mistaking the disk for one that is unpartitioned.

    5. Why would a GPT-partitioned disk appear to have an MBR on it? If this occurred, you must have used an MBR-only-aware disk tool to access the GPT disk. See answers #8 through #10, earlier.

    6. If the disk is larger than the maximum size an MBR can report, will the entire disk contents be protected? The EE partition in the Protective MBR is specified to be the maximum size allowable in an MBR.

    Source