Contribute
Register

ga-z77x-ud5h multi boot booting linux and windows - my findings so far

Status
Not open for further replies.
Joined
Dec 2, 2011
Messages
16
Motherboard
10.7, 10.8, 10.9
CPU
i5-3570K, i3-2105
Graphics
HD4000, NVidia 210
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
This post is to document my findings/experience which may help others (or most likely remind me, as I cannot imagine anyone else interested and it assumes knowledge of linux) in trying to get my hackintosh to handle multiple operating systems and a large hard drive.

My setup: ga-z77x-ud5h, two drives (one SSD for Mavericks; one 3TB seagate hard disk for all other OS).

My quest: I want to be able to boot to Mavericks (using clover); to Windows 7 64bit; to two linux distributions - CentOS7 and to an old installation of CentOS5, using unmodded bios. I don't mind if I need to use bios options to determine what boots up, but would rather not need to boot from a cd/usb.

Status: Not yet succeed (without booting via a rescue disk).

Questions: How does the bios decide whether or not to offer a UEFI mode of booting the hard disk? [It is not the presence of an EFI partition - I think it is looking for something in the Protective MBR]

Findings/thoughts:

(1) The F14 bios allows booting per device in UEFI or Legacy modes. With UEFI it can use CSM to provide access to the video but it does not have an Intel GOP module so without CSM there is a problem accessing the HD4000 video [there is a modded bios which provides access but I want to use stock]. Without CSM this is fatal for a Windows 7sp1 x86_64 install which boots from the DVD but then cannot display anything after a few seconds (as the stars start to appear). It does not bother the Centos7 installation which works with or without CSM enabled. So to install Windows in UEFI mode you need to have CSM on always (a bios setting).

(2) In order to use a drive greater than 2TB you need to partition it as GPT rather than msdos MBR (not sure if this is true with a 4K cluster drive). All the operating systems (Win7 64bit, Centos5, Centos7, OSX) can understand GPT. However, Windows 7 64bit can only install to GPT disks in UEFI mode and can only install to MBR disks in Bios-legacy mode.

(3) The main Windows7 "data" partition does not care how it was installed. I used partimage to drop an image of my old bios installed Windows 7 partition made on an MBR partitioned drive, on top of a UEFI installed Windows 7 partition and it worked perfectly: so all the booting/bios/UEFI specific parts of the Windows OS are in the System Reserved partition on the Bios-legacy MBR system, and in the EFI partition for the GPT system.

(4) I have been unable to find a way of booting Centos5 in UEFI mode. The UEFI centos7 grub2 bootloader can find it but when you try to boot it reports that the kernel is too old to boot. It may be that the only way to boot it is to use a rescue disk or usb stick booted in bios-legacy. For example, I have been able to do this successfully with super-grub2 booted using legacy-bios [choose manual boot, find menu.1st but then you need to edit the commandline as it usually uses the wrong partition in set root].

(5) I then thought I could be clever and install centos7 in bios-mode first (note it needs to have a small bios_grub partition because the GPT format does not have spaces between partitions like MBR does to hide the second stage of grub - I added this: you can use gparted to do it and you need to add a flag to the partition). This allowed centos grub to boot centos5 and centos7 but not Windows 7. My idea was then to install in UEFI mode so I could have the best of both worlds depending on whether you booted from the hard drive in UEFI mode (using EFI to get windows 7 and centos7) or bios-mode (using the protective MBR and second stage loader on my bios_grub partition) to get Centos7 and Centos5. That appears not to work because installing centos7 in bios mode rewrites the protective MBR to add the first stage grub2 boot loader presumably. Somehow the bios spots this and decides that this is only a bios-boot capable drive so it never offers the choice of UEFI boot for that drive. Fortunately I had used sgdisk -b backupname /dev/sda to keep a copy of the GPT partition table and protective MBR before and after installs of CentOS so I could return it to UEFI state. Using sgdisk -l backupname /dev/sda I was able to restore things.

(6) Don't add any hfs+ formatted partitions to the hard drive before you have finished the Centos7 install. There is a bug in the linux installer which crashes while trying to find hfsplus-tools (a non-existent package in centos7).

(7) Note: I have not written anything about the Clover/Mavericks install yet. I have done this before and it more or less worked.
 
Addendum:

In fact my method for point (5) has now actually worked. When I subsequently added the hfs+ partitions (I created unformatted partitions in gparted) and then erased and reformatted them in Mavericks it must have done something to the partition table. Note you need to format by erasing the volume from the command line or else the volume is converted to core storage (and that stops the windows bootcamp hfs+ file reader from reading the drive). Now I have a scenario that the large drive is recognized as a UEFI and Bios capable device. If I boot as UEFI I can boot windows 7 and centos 7. If I boot as a Bios device it uses the protected MBR record and the pc version of grub2 and I can boot cents 7 and cents 5. Now the nightmare will be when there is a kernel upgrade as I will beed to ensure that two versions of the grub2.cfg get appropriately updated...
 
Status
Not open for further replies.
Back
Top