Gentoo Archives: gentoo-user

From: Andrea Conti <alyf@××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Mac Mini with Grub booting Mac OSX and Windows?!
Date: Wed, 29 May 2013 09:25:47
Message-Id: bee14129dbe08f0b5d2c8e1c194a789a@3ss.ath.cx
In Reply to: Re: [gentoo-user] Mac Mini with Grub booting Mac OSX and Windows?! by Andy Laursen
1 >> We can't have more then 4 primary partitions on a hard disk.
2 >>
3 >> Gentoo needs 2 partitions, /boot and a Virtual partition (that count's
4 >> as well as one primary) with all the other folders.
5 >>
6 >> Windows will create 2. and Mac OSX minimum 1, am I right?!
7 >>
8 >
9 > Your Windows partitions have to be in the first four, but OSX and linux
10 > partitions can be anywhere thanks to the gpt partition table.
11
12 Things are both simpler and more complex than that.
13
14 The real problem is that while rEFIt/rEFInd, OSX and Linux have no
15 problem dealing with a GPT partition table, Windows only supports MBR.
16 (Windows 7+ supports GPT partition tables but it can only boot from a
17 GPT disk in EFI mode. On a Mac OSes other than OSX must be booted in
18 BIOS emulation mode, therefore the requirement for MBR on the system
19 disk for Windows still stands).
20
21 GPT and MBR, however, are only indexing schemes: they describe how many
22 partitions are on a disk and their location, but apart from providing a
23 high level 'type' label they have nothing to do with what's inside a
24 partition.
25
26 GPT-partitioned disks traditionallly have what's called a 'protective
27 MBR', i.e. a dummy MBR which defines a single partition of type 0xEE
28 spanning the whole disk; this is intended to keep partitioning tools
29 that are not GPT-aware from considering the disk uninitialized and
30 inadvertently destroying its contents.
31 However, nothing prevents you from adding to the protective MBR regular
32 entries for some of the partitions, and have the disk look like a
33 'normal' MBR disk as far as those partitions are concerned.
34
35 The result is called a 'hybrid MBR' and it's the main trick behind Boot
36 Camp. There is really nothing special about booting (or installing)
37 Windows on a Mac: it just works, as long as you have both a properly set
38 up hybrid MBR with an entry for the Windows partition and a suitable EFI
39 boot manager.
40
41 The former can be done with a tool such as gpt-fdisk (you can easily
42 find a binary package for OSX, and there are directions for dealing with
43 hybrid MBRs on the author's site); rEFInd is your best option for the
44 latter. The standard Apple boot manager will also do, if you only need
45 to boot OSX and Windows.
46
47 Booting Linux works in a similar fashion. You don't even need a
48 GPT-aware bootloader: good old GRUB 1 is perfectly up to the task, as
49 long as there is an entry for its boot partition in the hybrid MBR. Then
50 you can load a kernel with GPT support, and from there it's just a
51 standard multiboot setup.
52
53 HTH,
54 andrea

Replies

Subject Author
Re: [gentoo-user] Mac Mini with Grub booting Mac OSX and Windows?! Andy Laursen <lists@×××××××××.cc>
Re: [gentoo-user] Mac Mini with Grub booting Mac OSX and Windows?! Tamer Higazi <th982a@××××××××××.com>