Author Topic: Provide interactive option to have the boot loader's Extra folder prevail  (Read 22955 times)

0 Members and 1 Guest are viewing this topic.

tempolo

  • Member
  • Posts: 82
    • My own Hackintosh page
For reasons, see this thread: http://forum.voodooprojects.org/index.php/topic,480.msg1949

The idea is that the user has a choice which Extra folder shall have precedence if there are two choices, i.e. when one starts up from an external drive with Chameleon and Extra folder installed, and chooses to boot from a different drive where there's also an Extra folder.

Ideally, the user should be able to choose which one takes precedence, while still having both folders used, if possible. An example:

If both Extra folders have a Boot.plist, then only the prevailing one will be used. Same for other single-loaded files, such as smbios.plist and dsdt.aml. Extensions, however, should be loaded from both (or maybe give a choice here, too).

Also, both an interactive and a programmable choice for this would be nice.


Lord Anubis

  • Member
  • Posts: 74
I like this Idea, but it may get basic users very confusing because how do you decide when to use which extra folder. Whats clear for you, me or the specialist is not clear for the average user.

I was trying to figure out this in the older Chameleon code, but there where decisions that I have to make, but could not really make it in a clear way for others users to use. It will create to much possible choices. And how do you remember the chosen settings next month. Only a few people  will create more then 1 Macosx partition, let those copy the extra folder. If you read the posts, the current options gives the people already a hard time.

My feeling is, this is a good option for a not near future release, when others things are stable, when /Extra folders kexts are working 100%.

Just my thoughts.

Quicksilver 2002 Case - GB EP45-DS3P - 8Gb Kingston mem. - Q6600 - Asus 7300GT Silent 512Mb - 6 SATA drives - 1 IDE drives ( using F12/Chameleon for booting, not visible in OSX ) - 1 external Sata Samsung DVD - OSX 10.6.8 server retail - Chameleon 2.0RC1 + Cartri Bios

tempolo

  • Member
  • Posts: 82
    • My own Hackintosh page
Just last night, on the road, still trying to fix a problem (screen size), I modified something in the Extra folder which made the PC crash on boot. And even though I had a USB stick with a _working_ Extra folder in it, I could not make it getting used in place of the broken one on the OS X partition.

So, maybe, the option to make the first Extra prevail could be called "defaults override", making it clear that something exceptional is used here.

First of all, this needs to be an interactive option. Permanent is not so important, maybe even not needed at all.

« Last Edit: June 25, 2009, 11:08:36 PM by tempolo »

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
If you make a Chameleon Boot CD you will never have this problem. Very handy in case your EFI partition becomes unreadable or if you accidentally mess it up somehow.

It doesn't have to have all the kexts and fixes you normally use, just minimal stuff to boot the system and fix things so that you can boot normally again. "safe mode Chameleon" :-)
« Last Edit: June 25, 2009, 09:26:42 PM by Beerkexd »
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

tempolo

  • Member
  • Posts: 82
    • My own Hackintosh page
If you make a Chameleon Boot CD you will never have this problem. Very handy in case your EFI partition becomes unreadable or if you accidentally mess it up somehow.

How? This thread is about this situation you seem to describe: I have a bad extension in "Extra" of the OS X volume I want to boot. I have a separate disk (whether it's on CD or a USB stick should make no difference) on which I have a working set of extensions in Extra. Yet, the boot loader will keep loading the bad ones from the OSX volume, preventing a good boot.

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Okay here we go - all credit for this guide goes to Superhai, Zef and Sonotone, I'm just a typing monkey.

Make a folder called newiso on your desktop.

Download the Chameleon archive attached here:
http://forum.voodooprojects.org/index.php/topic,649
Get the default theme as well if you want to use it.

Copy the file cdboot from the Chameleon archive to the newiso folder.
In the newiso folder, create a folder named extra.

Inside the extra folder, place:

-your smbios.plist and DSDT.aml if you need it
-your org.chameleon.Boot.plist (empty Boot.plist attached below) with whatever switches and kernel flags you need

If you'll be booting an install DVD add a Timeout (or Instant Menu) and Rescan Prompt:

    <key>Timeout</key>
    <string>5</string>
    <key>Rescan Prompt</key>
    <string>yes</string>

-the themes folder with the theme you want, you can use the default theme or specify one in the boot.plist as you would normally.
-the attached preboot.dmg.

Open preboot.dmg (attached below) and create a folder named extra inside. In the extra folder, create a folder named extensions and place fakesmc.kext and whatever other kernel extensions you need in it.
If you like you can also use an extensions.mkext - this must be in the extra folder - not inside the extensions folder. You can use cVad's Kext Utility (google) to make an mkext. It's not really necessary for a boot CD though.

Now for the magic incantation.
Fire up terminal, go to ~/desktop and type

sudo hdiutil makehybrid -o new.iso newiso/ -iso -hfs -joliet -eltorito-boot newiso/cdboot -no-emul-boot -hfs-volume-name "My Boot CD" -joliet-volume-name "My Boot CD"

Burn the resulting CD image, preferably to a CD-RW, so that you can easily make modifications later.

Now you have a boot CD that you can use to..

Boot the Retail DVD:
When the bootloader ask you for rescan, press ENTER.
Go to boot options (F8), Swap disks, then press ESC to rescan drive. When the name of the DVD appears, press ENTER.
Boot Partitions:
When the bootloader ask you for rescan, press any key (except ENTER).
Go to Boot options (F8), then choose your partition.

If you didn't add the Rescan Prompt key/string in Boot.plist, your boot CD will work just like any other Chameleon installation, i.e. display the GUI or a list of bootable partitions on your system.

If you get an instant reboot, set your SATA controller to AHCI mode.
« Last Edit: February 04, 2013, 01:36:14 AM by Gringo Vermelho »
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

tempolo

  • Member
  • Posts: 82
    • My own Hackintosh page
Well, yes, that's all obvious. That's how a Chameleon boot loader on a separate disk is made. But that does not solve the problem I'm talking about.

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Well, it should. I don't understand why it isn't working for you.

If you boot from the Chameleon boot CD, it loads all patches and extensions from the boot CD, not from the drive or partition that you are booting into. In theory you can even use it to boot a drive that's fresh out of a real mac.

If your chameleon boot CD doesn't work like that there must be something wrong with your com.apple.Boot.plist, or your preboot.dmg image.
« Last Edit: June 01, 2011, 08:24:21 PM by Gringo Vermelho »
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

Blackosx

  • Forum Moderator
  • Posts: 1150
Thanks for the guide Beerkexd. I'll make a bootCD from your guide see if I get the same problems that tempolo is having.
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

Blackosx

  • Forum Moderator
  • Posts: 1150
Well I have done some testing with the boot CD.

Note to Beerkexd, Your guide stated:
Open preboot.dmg, create a folder named extensions inside and place the kernel extensions you need there.

But for me I had to place my kernel extensions in a folder named extensions inside the extra folder on the preboot.dmg.

But after a good testing session I can confirm that the boot CD will take precedence over anything on the system where Chameleon is installed in the boot partition. I don't have Chameleon installed on EFI so I can't comment about that.

The boot CD takes precedence regardless if a kext is missing from /Extra/Extensions or damaged from /Extra/Extensions.


EDIT: I will have to wait until I get home to verify, but I have just been thinking about the com.apple.Boot.plist and I need to double check if QE/CI was working. Because if it was then the EFI string is in the com.apple.Boot.plist on the partition, not on the bootCD. I will report back on this!


Funny thing is, after all my testing I have somehow managed to get IntelCPUPowerManagement.kext running so no need for a Disabler or to remove it now? I am so happy about this that I have attached a screen grab of a section of my kextstat result :)

EDIT: Now I know why.... I have been playing with DSDT.aml, thanks to another discussion with Beerkexd, and had added it to Root / on my boot partition and had not tried removing IntelCPUPowerManagement from Disabler.kext. It was only by going through this exercise and removing Disabler.kext that I have now found this out :)
« Last Edit: June 26, 2009, 03:47:14 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

tempolo

  • Member
  • Posts: 82
    • My own Hackintosh page
I don't need Disabler, either. At least, OS X (10.5.7) boots fine without it. Although I don't know what it's for, so maybe there's still a reason to have it installed?

On my problems about the precedence - maybe it has to do with the fact that my USB disk had the extensions only in a folder, not in an mkext - or vice versa (stick has mkext, booting OSX has no mkext in Extra). Got to double check that. I am pretty sure that the mix of mkext in one and none in the other Extra led to the problem that some kexts got loaded from each, causing havoc if one was broken.

Oh, in any way: beerkexd's guide on making a boot CD should definetely be re-posted in a dedicated thread so people can find it (provided a good thread title is used). No one will look for it here.
« Last Edit: June 26, 2009, 10:37:20 AM by tempolo »

Blackosx

  • Forum Moderator
  • Posts: 1150
I don't need Disabler, either. At least, OS X (10.5.7) boots fine without it. Although I don't know what it's for, so maybe there's still a reason to have it installed?
It describes a list of kexts to block when OSX loads. Otherwise the option is to remove problem extensions, but this is not an option if you want a vanilla system.

my USB disk had the extensions only in a folder, not in an mkext
Might be worth trying with extensions.mkext

beerkexd's guide on making a boot CD should definetely be re-posted in a dedicated thread so people can find it
I second that!
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Blackosx - thanks, I fixed my mistake. Nice that you could get rid of the disabler.
The CPU can get too hot and start to throttle on some systems when using IntelCPUPM. Keep an eye on your temps until you're sure everything is fine. I use this:
http://www.bresink.com/osx/TemperatureMonitor.html

tempolo - try using the attached empty preboot.dmg instead of making one yourself. I don't know what's so special about it, but I could not get it to work with any preboot.dmg I made. The attached one is from the guide on IM that I copied and it's the only that would ever work for me. Thank god for CDRWs.
« Last Edit: January 30, 2010, 07:06:01 PM by Gringo Vermelho »
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

Blackosx

  • Forum Moderator
  • Posts: 1150
The CPU can get too hot and start to throttle on some systems when using IntelCPUPM. Keep an eye on your temps until you're sure everything is fine. I use this:
http://www.bresink.com/osx/TemperatureMonitor.html
Thanks for the tip, I will monitor my temps
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

tempolo

  • Member
  • Posts: 82
    • My own Hackintosh page
@Berkexd - My netbook doesn't have a CD/DVD drive ;)

But I'll have a look at the contents anyways...
The dmg contains a MBR in the first block, with no boot code, then a HFS+ partition beginning at block 1.
« Last Edit: June 26, 2009, 07:14:24 PM by tempolo »