overdue-scratch

Author Topic: Multibooting different OS X versions from MBR do not work as expected  (Read 10079 times)

0 Members and 1 Guest are viewing this topic.

thorazine74

  • Member
  • Posts: 57
Chameleon installed to MBR partition where Leopard is installed too.
Snow Leopard installed to a different MBR partition.
Booting from Leo partition and choosing to start Snow Leo results in /Extra/* being read from Leopard partition and /Extra/Extensions being read from Snow Leo partition.
Using 10.5/10.6 subfolders do not work as expected, as they do when Chamleon is installed to EFI System Partition, i.e. booting Leo does not read extensions from /Extra/10.5/Extensions[.mkext] but from /Extra/Extensions[.mkext]
In my opinion this is caused by not taking to account the difference between 2 posible booting situations:
- /boot and /root partition being the same.
- /boot and /root partition not being the same.
When Chameleon is installed to ESP boot and root are never the same, however when installed to a standard partition they could be or not depending on what partition is chosen on menu.
My suggestion to fix this would be separating Chameleon configuration into 2 different groups of options and config files:
- Configuration directives that are partition or system specific (like extensions, kernel arguments...).
- Configuration directives that are generic or chameleon specific (like default partition, timeout, theme to use...). And one of these should include a new directive to tell chameleon where to look for system-specific options config file, either in boot or in root partition.
Mac OS X 10.5.6 Retail (Updated to 10.5.7) with Chameleon 2.0 RC1+BootIt NextGen 1.86 (MBR Single Drive)
Gigabyte 73PVM-S2H + C2D + 2 Gb
2 SATA HD (AppleAHCIport.kext) + 1 PATA DVD+RW (DarwinATAPort.kext)
Realtek ALC889 (VoodooHDA.kext)
Geforce 8600GTS (EFI String) PS/2 M & KB: VoodooPS2.kext

simargl

  • Entrant
  • Posts: 5
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #1 on: September 28, 2009, 10:42:42 PM »
Hi, i have similar problem.

My setup is msi ex720 laptop with MBR partitioned hd

disk0s1 - 32G FAT32 XP - Active - Boot Menu defaults chain0
disk0s2 - HFS+ - Leo 10.5.8
disk0s3 - HFS+ - SL 10.6.1

I have /Extra and /boot (RC3) on both HFS partitions.
Extensions.mkext, /Extensions, DSDT.aml, and smbios.plist are different for Leo and SL, and everything is fine with them, they are loading properly for right OS.

Now, my trouble is that com.apple.Boot.plist is completely ignored, and this is problem in SL, so now every time I have to type at boot prompt:
Code: [Select]
rd=disk0s3 arch=i386 GraphicsEnabler=Yes USBBusFix=Yes.

I need boot flags in plist because Atheros drivers are 32bit only, and customized DSDT, so I don't need many hacked extensions, but I depend on Chameleon to load settings properly. /Extra/Themes are also ignored.

All permissions are OK:
Code: [Select]
bash-3.2# ls -Rla
total 448
drwxr-xr-x   9 root  wheel     306 Sep 28 21:27 .
drwxrwxr-t  36 root  admin    1292 Sep 27 23:27 ..
-rw-r--r--@  1 root  wheel    6148 Sep 27 15:51 .DS_Store
-rw-r--r--   1 root  wheel   29578 Sep 27 15:40 DSDT.aml
drwxr-xr-x   8 root  wheel     272 Sep 27 15:56 Extensions
-rw-r--r--   1 root  wheel  178568 Sep 27 15:56 Extensions.mkext
drwxr-xr-x   3 root  wheel     102 Sep 27 15:56 Themes
-rw-r--r--@  1 root  wheel     590 Sep 28 21:26 com.apple.Boot.plist
-rw-r--r--@  1 root  wheel    1048 Sep 22 10:36 smbios.plist

./Extensions:
total 16
drwxr-xr-x  8 root  wheel   272 Sep 27 15:56 .
drwxr-xr-x  9 root  wheel   306 Sep 28 21:27 ..
-rw-r--r--@ 1 root  wheel  6148 Sep 21 21:25 .DS_Store
drwxr-xr-x@ 3 root  wheel   102 Sep 24 00:08 AppleACPIPS2Nub.kext
drwxr-xr-x@ 3 root  wheel   102 Apr  1 16:47 IOAHCIBlockStorageInjector.kext
drwxr-xr-x@ 3 root  wheel   102 Sep 24 00:08 OpenHaltRestart.kext
drwxr-xr-x@ 3 root  wheel   102 Sep 24 00:08 VoodooPS2Controller.kext
drwxr-xr-x@ 3 root  wheel   102 Sep 24 00:08 fakesmc.kext
here is my com.apple.Boot.plist:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string>arch=i386 GraphicsEnabler=Yes USBBusFix=Yes</string>
<key>Boot Graphics</key>
<string>Yes</string>
<key>Quiet Boot</key>
<string>No</string>
<key>Timeout</key>
<string>5</string>
</dict>
</plist>
How i can fix this?

Anyway, thanks to Chameleon team for all hard work and really cool software  :)

Kabyl

  • VoodooLabs
  • Posts: 158
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #2 on: September 29, 2009, 02:24:40 AM »
arch, GraphicsEnabler and USBBusFix are all booter flags not kernel flags, so add them as key/value pairs to the plist.

simargl

  • Entrant
  • Posts: 5
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #3 on: September 29, 2009, 11:58:50 AM »
arch, GraphicsEnabler and USBBusFix are all booter flags not kernel flags, so add them as key/value pairs to the plist.
Thanks, this is my com.apple.Boot.plist now:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string></string>
<key>arch</key>
<string>i386</string>
<key>GraphicsEnabler</key>
<string>Yes</string>
<key>USBBusFix</key>
<string>Yes</string>
<key>Boot Graphics</key>
<string>Yes</string>
<key>Quiet Boot</key>
<string>No</string>
<key>Timeout</key>
<string>5</string>
</dict>
</plist>
Doesn't work, unfortunately. I have same com.apple.Boot.plist in disk0s2/Extra and disk0s3/Extra,   
with same (none) effect ...

Only typing in boot loader works for now...

simargl

  • Entrant
  • Posts: 5
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #4 on: September 29, 2009, 12:58:11 PM »
It's working now :)

Solution was to make Extra folder with com.apple.Boot.plist on first partition.
My disk0s1 is FAT32, but seems that Chameleon doesn't care about that,
only looks for settings on first (or maybe active) partition regardless of fs?

zef

  • Administrator
  • Posts: 265
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #5 on: September 30, 2009, 11:56:12 AM »
Doesn't work, unfortunately. I have same com.apple.Boot.plist in disk0s2/Extra and disk0s3/Extra,   
with same (none) effect ...

Only typing in boot loader works for now...

At the moment your partition specific boot.plist will be loaded from /Library/Preferences/SystemConfiguration/com.apple.Boot.plist. This will be changed in next version.

Actually the Boot.plist file gets loaded in 2 different stages within the booter.

1. In an early stage when the booter starts, it loads its default values using the following path:

"/Library/Preferences/SystemConfiguration/com.apple.lre.Boot.plist"
"/Extra/com.apple.Boot.plist"
"bt(0,0)/Extra/com.apple.Boot.plist"
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.R/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.S/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" 

2. After you select a partition and press Enter, the booter will override the default values using another plist in this path:

"rd(0,0)/Extra/com.apple.Boot.plist"
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.R/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.S/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"

The "fix" would be easy by adding a new entry after the rd(0,0) one:

"/Extra/com.apple.Boot.plist"

Until the next release, use the ancient old de-facto standard "/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" to specify your partiton specific plist values.

Bye,
zef

ASUS P8Z68-V PRO/GEN3 | i5-2500k | 16GB RAM | GTX560 | Keyboard | Mouse | Devilsound DAC

thorazine74

  • Member
  • Posts: 57
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #6 on: October 01, 2009, 09:41:54 AM »
Hi, i have similar problem.

My setup is msi ex720 laptop with MBR partitioned hd

disk0s1 - 32G FAT32 XP - Active - Boot Menu defaults chain0
disk0s2 - HFS+ - Leo 10.5.8
disk0s3 - HFS+ - SL 10.6.1

I have /Extra and /boot (RC3) on both HFS partitions.
Extensions.mkext, /Extensions, DSDT.aml, and smbios.plist are different for Leo and SL, and everything is fine with them, they are loading properly for right OS.

Are you always booting from a single partition (i.e. only Leo or SL is the active partition) or are you switching active partitions using BIOS Boot Menu?
In my case I'm not using the BIOS Boot Menu to choose which partition to boot, just using Chameleon menu, and this results in the scenery described, the wrong config files and extensions being loaded when choosing a different boot/root partition (i.e. booting from Leo and starting up Snow).

Mac OS X 10.5.6 Retail (Updated to 10.5.7) with Chameleon 2.0 RC1+BootIt NextGen 1.86 (MBR Single Drive)
Gigabyte 73PVM-S2H + C2D + 2 Gb
2 SATA HD (AppleAHCIport.kext) + 1 PATA DVD+RW (DarwinATAPort.kext)
Realtek ALC889 (VoodooHDA.kext)
Geforce 8600GTS (EFI String) PS/2 M & KB: VoodooPS2.kext

thorazine74

  • Member
  • Posts: 57
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #7 on: October 01, 2009, 09:57:43 AM »
Doesn't work, unfortunately. I have same com.apple.Boot.plist in disk0s2/Extra and disk0s3/Extra,   
with same (none) effect ...

Only typing in boot loader works for now...

At the moment your partition specific boot.plist will be loaded from /Library/Preferences/SystemConfiguration/com.apple.Boot.plist. This will be changed in next version.

Actually the Boot.plist file gets loaded in 2 different stages within the booter.

1. In an early stage when the booter starts, it loads its default values using the following path:

"/Library/Preferences/SystemConfiguration/com.apple.lre.Boot.plist"
"/Extra/com.apple.Boot.plist"
"bt(0,0)/Extra/com.apple.Boot.plist"
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.R/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.S/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" 

2. After you select a partition and press Enter, the booter will override the default values using another plist in this path:

"rd(0,0)/Extra/com.apple.Boot.plist"
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.R/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"/com.apple.boot.S/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"

The "fix" would be easy by adding a new entry after the rd(0,0) one:

"/Extra/com.apple.Boot.plist"

Until the next release, use the ancient old de-facto standard "/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" to specify your partiton specific plist values.

Bye,
zef



This logic makes lot of sense for boot.plist files, working as a catch-it-all solution, but will it work the same for kexts and dsdt and smbios files? Kexts definitely cant be overriden I think, once they are loaded they will stay loaded right?. Say for example this situation:

Leopard partition:
/boot
/Extra/Extensions/(Extensions that are Leopard only)
/Extra/boot.plist
/Extra/DSDT.aml
/Extra/smbios.plist

SnowLeo partition:

/Extra/Extensions/(Extensions that are Snow Leo only)
/Extra/boot.plist

In this situation, booting from Leo and choosing to start Snow Leo, I understand this will happen:
- The boot.plist from SnowLeo partition will override the one from Leo (once fixed in next version)
- The extensions from Leo partition will be loaded first, and then the ones from Snow Leo.
- The DSDT.aml and smbios.plist from Leo partition will be loaded when I didnt want any dsdt or smbios for SnowLeo.

Thats why I believe it would be much better to be able to tell chameleon if you want your config files (not just plist, but extensions, dsdt, etc.) to be universal (useful for booting from usb sticks or efi partition) or partition-specific (useful for multibooting different os versions).
Or instead of loading files from all posible locations use something like this:
- Find /Extra/* from all posible locations.
- If I have just one /Extra/* go ahead and load it.
- If I have several /Extra/*, decide which one is the best to load, either automatically or based on some user settings.
« Last Edit: October 01, 2009, 10:03:00 AM by thorazine74 »
Mac OS X 10.5.6 Retail (Updated to 10.5.7) with Chameleon 2.0 RC1+BootIt NextGen 1.86 (MBR Single Drive)
Gigabyte 73PVM-S2H + C2D + 2 Gb
2 SATA HD (AppleAHCIport.kext) + 1 PATA DVD+RW (DarwinATAPort.kext)
Realtek ALC889 (VoodooHDA.kext)
Geforce 8600GTS (EFI String) PS/2 M & KB: VoodooPS2.kext

simargl

  • Entrant
  • Posts: 5
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #8 on: October 01, 2009, 12:49:55 PM »
Hi, i have similar problem.

My setup is msi ex720 laptop with MBR partitioned hd

disk0s1 - 32G FAT32 XP - Active - Boot Menu defaults chain0
disk0s2 - HFS+ - Leo 10.5.8
disk0s3 - HFS+ - SL 10.6.1

I have /Extra and /boot (RC3) on both HFS partitions.
Extensions.mkext, /Extensions, DSDT.aml, and smbios.plist are different for Leo and SL, and everything is fine with them, they are loading properly for right OS.
Are you always booting from a single partition (i.e. only Leo or SL is the active partition) or are you switching active partitions using BIOS Boot Menu?
In my case I'm not using the BIOS Boot Menu to choose which partition to boot, just using Chameleon menu, and this results in the scenery described, the wrong config files and extensions being loaded when choosing a different boot/root partition (i.e. booting from Leo and starting up Snow).
No, I'm booting XP first from fat32 disk0s1, standard xp boot menu, and default option is chain0.
Then, i have chameleon installed on other two partitions(on both), and /Extra folder with appropriate settings and kexts on each.

And after i made /Extra/com.apple.Boot.plist on my fat32 disk0s1 (actually it's C:\Extra\com.apple.Boot.plist) everything is working 100%. My Chameleon is themed now, and it's starting in 1440x900, and SL is starting up in 32 bit mode, and chameleon GraphicsEnabler is working without any kexts or injectors (with added GFX in DSDT.aml). It's needed there (on C:), because chain0 is there, and i don't have boot0 installed, using chain0 instead.
Zef was kind to explain boot load path and load order (thanks Zef :) )


zef

  • Administrator
  • Posts: 265
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #9 on: October 01, 2009, 03:45:26 PM »
This logic makes lot of sense for boot.plist files, working as a catch-it-all solution, but will it work the same for kexts and dsdt and smbios files? Kexts definitely cant be overriden I think, once they are loaded they will stay loaded right?. Say for example this situation:

Leopard partition:
/boot
/Extra/Extensions/(Extensions that are Leopard only)
/Extra/boot.plist
/Extra/DSDT.aml
/Extra/smbios.plist

SnowLeo partition:

/Extra/Extensions/(Extensions that are Snow Leo only)
/Extra/boot.plist

In this situation, booting from Leo and choosing to start Snow Leo, I understand this will happen:
- The boot.plist from SnowLeo partition will override the one from Leo (once fixed in next version)
- The extensions from Leo partition will be loaded first, and then the ones from Snow Leo.
- The DSDT.aml and smbios.plist from Leo partition will be loaded when I didnt want any dsdt or smbios for SnowLeo.

Thats why I believe it would be much better to be able to tell chameleon if you want your config files (not just plist, but extensions, dsdt, etc.) to be universal (useful for booting from usb sticks or efi partition) or partition-specific (useful for multibooting different os versions).
Or instead of loading files from all posible locations use something like this:
- Find /Extra/* from all posible locations.
- If I have just one /Extra/* go ahead and load it.
- If I have several /Extra/*, decide which one is the best to load, either automatically or based on some user settings.

Well, the extension load order is a bit similar to boot.plist, dsdt.aml and smbios.plist load order precedence.

First the selected partition's Extra stuff will be loaded by default, then comes the original booter partition only if the the previous kext loading attempt has failed. We don't load kexts from many Extra folders. The booter picks up only one Extra folder, then also loads the selected partition's S/L/E stuff. I recommend to take a look at i386/boot2/drivers.c:LoadDrivers() function to get a picture about how it works.

Also try to examine i386/libsaio/smbios_patcher.c:getSmbios(), i386/libsaio/dsdt_patcher.c:setupAcpi() functions.

ASUS P8Z68-V PRO/GEN3 | i5-2500k | 16GB RAM | GTX560 | Keyboard | Mouse | Devilsound DAC

mitchde

  • Entrant
  • Posts: 8
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #10 on: October 03, 2009, 08:49:50 AM »
Hi ZEF - first very much thanks you visit that thread and comment it !!

I believe the situation of using chameleon boot menue to select an other partition to boot as that partition it booted from is one of the major problems for users which have different (.kext, boot.plist, /extra NOT compatible between different partitions) system versions SL and L.

Would it be possible that future chameleon  works like:
1. No boot menue used = boot partition not changed > works as now
2. User uses boot menu and select an OTHER partition to boot - major changes !

2.1 If user selected an other partition (selected partition <> bootet from)  and press ENTER
2.1.1 chameleon resets/unloads/"throws away" all before read things (all .plist, all extra content,... read from the booted partition)
2.1.2 chameleon reads(all new again) in all stuff from selected partition and uses that new reads from the selected partition as it would be booted from that selected partition


« Last Edit: October 03, 2009, 08:59:56 AM by mitchde »

Infected24

  • Entrant
  • Posts: 5
Re: Multibooting different OS X versions from MBR do not work as expected
« Reply #11 on: April 06, 2010, 08:25:10 PM »
Wow guys, you are amazing, thanks for explaining this, now i can boot my boot SL and Leopard installations using MBR Scheme. My Setup is:

disk0s1 - HFS+ - Leo 10.5.8 (Active, Chameleon installed on it)
disk0s2 - Windows 7
disk0s3 - HFS+ - SL 10.6.1

Then i put the Common Kext using for booting SL and L in my /Extra/Extensions in disk0s1, put all my L only Kexts inside /dev/disk0s1/Library/Extensions folder, so when i choose to boot SL it woundt be loaded as well.

Then i put all my SL kext in disk0s3/Extra/Extensions, so i when i boot SL it will be loaded.

THANK YOU, you saved my ass. :D