blackosx Posted January 18, 2010 Share Posted January 18, 2010 Thanks for this feedback blackosx, if it does not change anything at reboot, and you dont have an alert message saying that there's a pb with your boot config, it might be because you have more than one boot config file from your boot config.the current seek order for com.apple.plist is: / /E /L/P/S /V/EFI/E /V/Cham/E We should improve this and also probably permit to provide an option BootConfig key in the panel properties ... Thanks rekursor. I can confirm it now works But I had to remove com.apple.Boot.plist from /L/P/S for it to happen and to be honest I don't like doing that purely for the reason that I don't want to change the default retail installation. So can I ask if you could search /L/P/S last? Secondly about the issue I posted earlier, where I use 2 HDD's. Disk Utility, and your code, shows my SnowLeopard drive as disk1, but as I select the 2nd HDD as the default boot drive in BIOS, Chameleon sees my SnowLeopard drive as disk0. So to boot my SnowLeopard partition I have to enter <key>Default Partition</key> <string>hd(0,3)</string> But your code, I guess quite rightly, sets it as <key>Default Partition</key> <string>hd(1,3)</string> which ends up booting my Macintosh partition.. Here's my screengrabs list for reference. So is this something that can be taken into account in the code, or shall I just swap my cables over and make my SnowLeopard HDD disk0? But well done and good work Link to comment Share on other sites More sharing options...
rekursor Posted January 18, 2010 Share Posted January 18, 2010 Thanks rekursor. I can confirm it now works But I had to remove com.apple.Boot.plist from /L/P/S for it to happen and to be honest I don't like doing that purely for the reason that I don't want to change the default retail installation. So can I ask if you could search /L/P/S last? ... Disk id are swapped ... But well done and good work Thanks, consider the L/P/S swap to bottom done, will appear in the next beta. Concerning the disk swapping, you should not need to swap your disk so this is not acceptable After analysis, It comes from OSX deciding to change/ignore the disk order from the original bios override. So I believe I am going to change my strategy by using a 'helper' in chameleon booter ... Meanwhile, ignore the part names which thus dont point the good part. Thanks folks for the precious feedback and listings, A better way would be too use osascript -e 'tell application "System Events" to restart' instead of sudo reboot This allows gui apps to intervene in case they need more time, have unsaved files etc. Consider this as done ... Thanks! I don't have L, so can't test for it. Just SL.Here's my diskutil list: /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *250.1 GB disk0 1: Windows_NTFS WIN_7 250.1 GB disk0s1 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk1 1: Apple_Free 209.7 MB disk1s1 2: EFI 209.7 MB disk1s2 3: Apple_HFS Macalem_i7 999.7 GB disk1s3 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *640.1 GB disk2 1: Apple_HFS EFI 209.7 MB disk2s1 2: EFI 209.7 MB disk2s2 3: Apple_HFS Doctor_Mac 31.8 GB disk2s3 4: Apple_HFS Time Machine 607.7 GB disk2s4 /dev/disk3 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.1 GB disk3 1: Apple_Free 209.7 MB disk3s1 2: Apple_RAID 499.8 GB disk3s2 3: Apple_Boot Boot OSX 134.2 MB disk3s3 /dev/disk4 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk4 1: Apple_Free 209.7 MB disk4s1 2: Apple_RAID 999.9 GB disk4s2 3: Apple_Boot Boot OSX 134.2 MB disk4s3 /dev/disk5 #: TYPE NAME SIZE IDENTIFIER 0: Apple_HFS MacRAID *499.8 GB disk5 Now, you'll notice a few "Apple_Free" partitions where the EFI partition once was (diskXs1). The EFI partition on disk 1 and 2 are curious and weird. This is what happens when you erase the EFI partition as "Apple_Free", and later use DU to erase the Mac OS X partition. DU will add a "EFI" partition as diskXs2. I don't consider it valid and ignore it, always using diskXs1 as the official EFI partition. The only EFI partition that's in use as a boot partition is disk2s1, as you can see it's Apple_HFS. ... Thanks, next versions will handle these free partitions ... Link to comment Share on other sites More sharing options...
rekursor Posted January 19, 2010 Share Posted January 19, 2010 ... next versions will handle these ... Ok, a beta 4 is available taking in account all the problems encountered, should fix them except the problem of disk swapping that requires a helper in the boot loader, (I'm having a look into it at the moment ... ) EDIT: After analysis, I'm afraid there is no way to write a file right now in the hfs fs from the booter, so unless we can write a fake smbios value and read it later in OS X (How to read these values from an osx app?), I'm a bit stuck here, so I think I'm going to add an option in the resource plist of the panel to swap disk numbers... http://www.insanelymac.com/forum/index.php...t&p=1388218 Thanks for your feedback. Link to comment Share on other sites More sharing options...
Master Chief Posted January 19, 2010 Share Posted January 19, 2010 ...EDIT: After analysis, I'm afraid there is no way to write a file right now in the hfs fs from the booter, so unless we can write a fake smbios value and read it later in OS X (How to read these values from an osx app?), I'm a bit stuck here, so I think I'm going to add an option in the resource plist of the panel to swap disk numbers... Thanks for your feedback. Why not use: /* * Copyright © 1998-2000 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. The rights granted to you under the License * may not be used to create, or enable the creation or redistribution of, * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. * * Please obtain a copy of the License at * [url="http://www.opensource.apple.com/apsl/"]http://www.opensource.apple.com/apsl/[/url] and read it before using this file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ #ifndef _IOKIT_IONVRAMCONTROLLER_H #define _IOKIT_IONVRAMCONTROLLER_H #include <IOKit/IOService.h> class IONVRAMController: public IOService { OSDeclareAbstractStructors(IONVRAMController); public: virtual bool start(IOService *provider); virtual void sync(void); virtual IOReturn read(IOByteCount offset, UInt8 *buffer, IOByteCount length) = 0; virtual IOReturn write(IOByteCount offset, UInt8 *buffer, IOByteCount length) = 0; }; #endif /* !_IOKIT_IONVRAMCONTROLLER_H */ Which can be found here: /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/nvram Similar interesting is: /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/IONVRAM.h I guess this is what Apple is using to select the boot drive. No? Link to comment Share on other sites More sharing options...
rekursor Posted January 19, 2010 Share Posted January 19, 2010 Why not use: /* * Copyright © 1998-2000 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. The rights granted to you under the License * may not be used to create, or enable the creation or redistribution of, * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. * * Please obtain a copy of the License at * [url="http://www.opensource.apple.com/apsl/"]http://www.opensource.apple.com/apsl/[/url] and read it before using this file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ #ifndef _IOKIT_IONVRAMCONTROLLER_H #define _IOKIT_IONVRAMCONTROLLER_H #include <IOKit/IOService.h> class IONVRAMController: public IOService { OSDeclareAbstractStructors(IONVRAMController); public: virtual bool start(IOService *provider); virtual void sync(void); virtual IOReturn read(IOByteCount offset, UInt8 *buffer, IOByteCount length) = 0; virtual IOReturn write(IOByteCount offset, UInt8 *buffer, IOByteCount length) = 0; }; #endif /* !_IOKIT_IONVRAMCONTROLLER_H */ Which can be found here: /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/nvram Similar interesting is: /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/IONVRAM.h I guess this is what Apple is using to select the boot drive. No? But we don't have NVRAM on PCs do we ? Is there an emulation of NVRAM available in our hacks ? Thanks, I'm coding a disk swap checkbox meanwhile, and associated prop. Link to comment Share on other sites More sharing options...
Master Chief Posted January 19, 2010 Share Posted January 19, 2010 But we don't have NVRAM on PCs do we ?Is there an emulation of NVRAM available in our hacks ? We do have CMOS which is our NVRAM. Link to comment Share on other sites More sharing options...
rekursor Posted January 19, 2010 Share Posted January 19, 2010 We do have CMOS which is our NVRAM. Interesting really, but I probably have to many parameters to store for CMOS, should investigate though. That said, I implemented a workaround for my panel as for today that does not need to change the booter, and that will be my first version for now Link to comment Share on other sites More sharing options...
cparm Posted January 19, 2010 Share Posted January 19, 2010 Interesting really, but I probably have to many parameters to store for CMOS, should investigate though. That said, I implemented a workaround for my panel as for today that does not need to change the booter, and that will be my first version for now CMOS mean ASM and it's far away from my knowledges , but are you sure that we can't write to a plist from the bootloader, look at the function XMLFreeTag() and FreeSymbol() in xml.c, it seems that it's what we want, no ?? Link to comment Share on other sites More sharing options...
rekursor Posted January 19, 2010 Share Posted January 19, 2010 CMOS mean ASM and it's far away from my knowledges , but are you sure that we can't write to a plist from the bootloader, look at the function XMLFreeTag() and FreeSymbol() in xml.c, it seems that it's what we want, no ?? No This free the mem representation of the XML tags, but do save anything to disk, as long as we have booted, nothing is left ... AFAIK, nothing permits to *save* a file, you can have a quick check too in the saio_internals.h file to verify this. It is probably better this way, so that the fs to be securely loaded. Link to comment Share on other sites More sharing options...
Master Chief Posted January 19, 2010 Share Posted January 19, 2010 Interesting really, but I probably have to many parameters to store for CMOS, should investigate though. That said, I implemented a workaround for my panel as for today that does not need to change the booter, and that will be my first version for now Ah ok. Misunderstanding on my side; I was thinking about storing a startup drive/partition number only. This of course requires only a single byte when done right i.e. with bit masking / shifting. Edit: You wrote: "I'm afraid there is no way to write a file right now in the hfs fs from the booter". You cannot write to a simple plist like com.apple.Boot.plist from /boot? Link to comment Share on other sites More sharing options...
lnerrrka Posted January 19, 2010 Share Posted January 19, 2010 Why I'm getting kjernel panic with chameleon rc4 on 10.5.8. RC3 work great! My spec are: Nvidia 8500GT 512MB 2GB RAM AMD Athlon 6400+ Gigabyte mcp61m61sme-s2 thanks Link to comment Share on other sites More sharing options...
sw170 Posted January 19, 2010 Share Posted January 19, 2010 Hi Rekursor, thank you for all your brilliant work I think you deserve highest rank as our Forum Peace Negotiator (It is pleasure to read your posts) thanks again here Regarding your prefpane tool I use apple software raid and my main com.apple.Boot.plist is located on /Volumes/RX0/Extra - disk(0,3) attached pic, partition is not mounted by default so I wonder if is at all possible for your preffpane app to look and find com.apple.Boot.plist there ? at the moment program reads from /Library/Preferences/SystemConfiguration/com.apple.Boot.plist Regards to All s ps. take it as a secondary task, if at all. Give the kids time first :] Link to comment Share on other sites More sharing options...
blackosx Posted January 19, 2010 Share Posted January 19, 2010 Why I'm getting kjernel panic with chameleon rc4 on 10.5.8. RC3 work great! Hi lnerrrka It's probably best if you post in the thread you followed for your install. Ok, a beta 4 is available taking in account all the problems encountered,should fix them except the problem of disk swapping that requires a helper in the boot loader, (I'm having a look into it at the moment ... ) Great. I will have a look this evening and report back EDIT: • It finds my com.apple.Boot.plist in /Volumes/Cham/Extra whilst leaving the original Apple one in /S/L/P. • The graceful restart as suggested by DieBuche (if you used that) work's great also. Only the disk swap issue remains for my system. Thanks rekursor. Link to comment Share on other sites More sharing options...
scrax Posted January 19, 2010 Share Posted January 19, 2010 http://www.insanelymac.com/forum/index.php...t&p=1388218Thanks for your feedback. For me is working but it ask me for a password every time i change partition with the lock open. I have also a "cosmetic" question, is it possible to make it load near the unused Apple's one? instead of the Acessories section? Link to comment Share on other sites More sharing options...
Smith@@™ Posted January 19, 2010 Share Posted January 19, 2010 The bootConfig path can in future to be change from the "user"? For example, my com.apple is in usb pen, only this is the "problem". The soft works, the pc restart and the pane don't crash The problem is the path of bootConfig. Hi and thanks for job Link to comment Share on other sites More sharing options...
digital_dreamer Posted January 19, 2010 Share Posted January 19, 2010 I found that I needed to remove the older version (right click) before installing the newer version. Otherwise, the beta v4 would load, but revert to v3 after relaunching SP. Maybe I was doing something wrong, but it loads correctly now. I'll report back for more. Thanks! MAJ Link to comment Share on other sites More sharing options...
DieBuche Posted January 19, 2010 Share Posted January 19, 2010 If my Extra Folder is on a hidden EFI partion, i still need to mount it manually before i can use the prefpane, right? How about a preference like this: 1. User sets "/V/E is on same disk as:" eg. "SnowLeopardPartition" (for example a dropdown list) 2. The pane checks diskutil info Volumes/"SnowLeopardPartition" 3. Use grep the find this part: " Part Of Whole: disk1" and extract disk number( eg. 3) 4. sudo mkdir /Volumes/EFI sudo mount_hfs /dev/disk[b]3[/b]s1 /Volumes/EFI 5. umount part. after setting Boot.plist (maybe involve sudo fsck_hfs /dev/disk3s1 to ensure data integrity) Do other people as well expirience that phenomenon that disk1 might be disk0 or disk2 after restart (numbers are not fixed)? @recursor: Do u set the Default Partition (hd(X,Y)) to the numbers get get from diskutil (diskXsY). If yes this might not be the right way, because i have to set it to hd(2,2) but the partition ends up being mounted as disk0s2 (most times). I found that I needed to remove the older version (right click) before installing the newer version. Otherwise, the beta v4 would load, but revert to v3 after relaunching SP. Same here, weird when replacing sp should just move the old one into the trash. Link to comment Share on other sites More sharing options...
rekursor Posted January 19, 2010 Share Posted January 19, 2010 a New version (Beta5) is available, it implements disk swap (0<-1>) for those experimenting the problem that chameleon boot loader and os x diskutil do no list the disks in the same order. It also now features display/hiding of renamed and hidden partitions according to boot config Yes I use diskutil list cmd to list parts, I know no other way to do that as we can't wrtie files from booter, if anyone have a working clue about this possibility to write proplists/files please tell me. Here's the new version that proved to work well on my 10.6 and 10.5 computers: http://www.insanelymac.com/forum/index.php...t&p=1388218 If my Extra Folder is on a hidden EFI partion, i still need to mount it manually before i can use the prefpane, right?How about a preference like this: 1. User sets "/V/E is on same disk as:" eg. "SnowLeopardPartition" (for example a dropdown list) 2. The pane checks diskutil info Volumes/"SnowLeopardPartition" 3. Use grep the find this part: " Part Of Whole: disk1" and extract disk number( eg. 3) 4. sudo mkdir /Volumes/EFI sudo mount_hfs /dev/disk[b]3[/b]s1 /Volumes/EFI 5. umount part. after setting Boot.plist (maybe involve sudo fsck_hfs /dev/disk3s1 to ensure data integrity) I need to access the boot config, so yes it could be nice to add an option to force the bootconfig path, but I'm not so keen right now of mounting a full partition 'in the back' of the user. It should IMHO stay the responsibility of the user to choose what parts are mounted. The new swap disk fix should help all of those experimenting disk swap problems (disk oreder is not the same at boot as in osx). Hi Rekursor, thank you for all your brilliant workI think you deserve highest rank as our Forum Peace Negotiator (It is pleasure to read your posts) thanks again here Regarding your prefpane tool I use apple software raid and my main com.apple.Boot.plist is located on /Volumes/RX0/Extra - disk(0,3) attached pic, partition is not mounted by default so I wonder if is at all possible for your preffpane app to look and find com.apple.Boot.plist there ? at the moment program reads from /Library/Preferences/SystemConfiguration/com.apple.Boot.plist Regards to All s ps. take it as a secondary task, if at all. Give the kids time first :] Thanks , I added /Volumes/RX0/Extra so that you can test it in beta5 in next release an option will permit to override that too. Link to comment Share on other sites More sharing options...
sw170 Posted January 19, 2010 Share Posted January 19, 2010 Do other people as well expirience that phenomenon that disk1 might be disk0 or disk2 after restart (numbers are not fixed)?@recursor: Do u set the Default Partition (hd(X,Y)) to the numbers get get from diskutil (diskXsY). If yes this might not be the right way, because i have to set it to hd(2,2) but the partition ends up being mounted as disk0s2 (most times). This "phenomenon" drives me mad for a while now, I thought this is only raid setup issue, however currently testing setup with these extra 3 options in com.apple.boot.plist and for about 2 weeks every reboot (not verbose) gives me fixed disks order (verbose mode mashes things up again) <key>Default Partition</key> <string>hd(0,3)</string> <key>Quiet Boot</key> <string>Yes</string> <key>Scan Single Drive</key> <string>Yes</string> Link to comment Share on other sites More sharing options...
DieBuche Posted January 19, 2010 Share Posted January 19, 2010 Here is how to get Chameleon listed in "System" in the PrefPane. Set CFBundleIdentifier=com.apple.preference.startupdisk . Remove original startup-pane. Double click to install. This "phenomenon" drives me mad for a while now, I thought this is only raid setup issue, however currently testing setup with these extra 3 options in com.apple.boot.plist and for about 2 weeks every reboot (not verbose) gives me fixed disks order (verbose mode mashes things up again) This definitely happens for non raid setups as well. Might there be a dsdt fix to set the disk number to the sata port number? About the "Swap disk fix" for me its not 0<>1 but 0<>2. Can somebody confirm that the system partition is always disk0? Link to comment Share on other sites More sharing options...
sw170 Posted January 19, 2010 Share Posted January 19, 2010 I added /Volumes/RX0/Extra so that you can test it in beta5in next release an option will permit to override that too. brilliant, thank you! Here is how to get Chameleon listed in "System" in the PrefPane. Set CFBundleIdentifier=com.apple.preference.startupdisk . Remove original startup-pane. Double click to install. much nicer now, thanks This definitely happens for non raid setups as well. Might there be a dsdt fix to set the disk number to the sata port number? About the "Swap disk fix" for me its not 0<>1 but 0<>2. Can somebody confirm that the system partition is always disk0? with options I posted I have 0 but it may change after next reboot, who knows :] Otherwise is jumping between 0,1,2,3 Link to comment Share on other sites More sharing options...
blackosx Posted January 19, 2010 Share Posted January 19, 2010 a New version (Beta5) is available,it implements disk swap (0<-1>) for those experimenting the problem that chameleon boot loader and os x diskutil do no list the disks in the same order. It also now features display/hiding of renamed and hidden partitions according to boot config Fantastic - Works a treat. Top job Rekursor Link to comment Share on other sites More sharing options...
Smith@@™ Posted January 19, 2010 Share Posted January 19, 2010 Rekursor, the path: bootConfig :/etc.etc.etc will can to be changed manually for those have the com.apple in a usb boot? Thanks.. Link to comment Share on other sites More sharing options...
rekursor Posted January 19, 2010 Share Posted January 19, 2010 Fantastic - Works a treat. Top job Rekursor Thanks A beta 6 is coming for those who have to set manually the bootConfig path And also a new swap (0-2) fix option And also some cosmetics ... And I'll make a break for the day Link to comment Share on other sites More sharing options...
scrax Posted January 19, 2010 Share Posted January 19, 2010 Here is how to get Chameleon listed in "System" in the PrefPane. Set CFBundleIdentifier=com.apple.preference.startupdisk . Remove original startup-pane. Double click to install. About the "Swap disk fix" for me its not 0<>1 but 0<>2. Can somebody confirm that the system partition is always disk0? Tested v5 and the mod for having it in System, all working good also the swap disk function. I've removed the original staruppanel and changed the icon to use the original one from apple. StartupDisk.prefPane.zip And also some cosmetics ... Can you make it more apple like with a icon view instead of the list? I like it also like now. just an idea. Link to comment Share on other sites More sharing options...
Recommended Posts