Author Topic: Upgrading from v1.X to v2.x Chameleon... What you need to know (SOLVED)  (Read 9464 times)

0 Members and 1 Guest are viewing this topic.

SunLizard

  • Observer
  • Posts: 25
Re: Upgrading From older Chameleon
« Reply #15 on: September 17, 2009, 03:16:44 AM »
Install to USB went fine.  Had to do a manual prep of EFI partition on the USB stick as the package installer errorred out. (same fault as above)  Anyway, I followed the DFE/GTP Guide to manually install Cham 2 RC2 to the USB stick.

Copied over stable/in use kexts to extras folder....

Noted difference between v1 and v2 chameleon... don't know if v1 used com.apple.Boot.plist.  If it does, its installed on the EFI partition (which I can't read/mount)  in any case, I used the default from the tar ball.

Verified boot loader works from patchstick.

I went ahead and put 10.6 image on the patchstick just to see what kind of issued I was going to go thru at some future date... epic fail on loader (Mac Version not yet set) but as stated, objective here isn't getting 10.6 loaded. (Not yet at least)

So I've got Cham 2.0 rc2 working from a patchstick.  Grand.

Still faced with initial questions of what I need to bring over from my stable Cham v1 system (10.5.8) to make a stable system Cham v2 (10.5.8)

I have a real feeling the answers to that question are going to be on the EFI partiong of my stable Cham v1 10.5.8 (Gaff SATA HDD).  Only wish I could get the darn thing mounted.

S_L

Stable Rig:
mobo: Gigabyte GA-EP45-DS3R (ALC889a Audio)
SATA: (2) 750 Gig Baracuda
         (1) NECC 12x Litescribe DVD-DL Burner
         (1) Lite-On 4x BD Burner          video:  Sapphire ATI 2600XT (512) PCI-E OS: 10.5.8 (Vanilla Kernel) bootloader: Cham v1.0.12  Beta: 10.6.0 (sep HDD)

SunLizard

  • Observer
  • Posts: 25
Re: Upgrading From older Chameleon
« Reply #16 on: September 17, 2009, 05:35:06 AM »
Color me dense.  Especially because I got into OSX from my *nix mucking about... anyway, I solved my own problem (kind of)

turns out the original Chameleon resided on an EFI partition that was msdos FAT.  Ergo you need to pass the file system to the mount command if you want to use it.  (mount_hfs was written by @pple to bypass the need (and include the file structure) of passing any specific argument to the 'mount' command. 

Anyway, the point here is if you have a Cham v1 system, and you need to access the EFI partition, use the following command:
Code: [Select]
bash-3.2# mkdir /Volumes/EFI
bash-3.2# mount -t msdos /dev/diskXsX /Volumes/EFI

!- diskXsX is your EFI Partition -!

One indication that you have the partition written in something other than HFS or HFS+ will be the error message: Incorrect super block. { indicating the file structure wasn't what mount_hfs or mount was expecting }

-------------
On to the next issue.

Now that I have my EFI partition mounted and accessible in finder ( killall Finder after mount }
the contents of the EFI partition are:
Code: [Select]
drwxrwxrwx  1 _unknown  _unknown  512 Sep 16 20:15 .fseventsd
drwxrwxrwx  1 _unknown  _unknown  512 Mar  2  2009 EFI
the EFI directory is laid out like this (only one file):
EFI->APPLE->EXTENSIONS->Firmware.scap

I did a google of Firmware.scap and it yielded about f*ck-all useful info.  I was kind of hoping for a nice clean com.apple.Boot.plist but not a chance.  I have yet to try opening Firmware.scap in a Hex editor but in TextEdit, there's no love to be found.

I'll keep poking and keep you informed.

Stable Rig:
mobo: Gigabyte GA-EP45-DS3R (ALC889a Audio)
SATA: (2) 750 Gig Baracuda
         (1) NECC 12x Litescribe DVD-DL Burner
         (1) Lite-On 4x BD Burner          video:  Sapphire ATI 2600XT (512) PCI-E OS: 10.5.8 (Vanilla Kernel) bootloader: Cham v1.0.12  Beta: 10.6.0 (sep HDD)

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: Upgrading From older Chameleon
« Reply #17 on: September 17, 2009, 05:48:42 AM »
.fseventsd is some kind of log, I don't know if it's spotlight or something else, obviously it's short for File System Events "something".
Deleting it won't cause any problems but it will appear again. You can get rid of it permanently by disabling logging on the partition, find the command in my guide here:

http://forum.voodooprojects.org/index.php/topic,649.0.html

I heard the EFI partition is formatted with FAT(16? 32? don't remember) on real macs, but I haven't seen it for myself.
I also heard, contrary to what some people have said in the past, that Apple actually does use the EFI partition - for firmware upgrades. Again I don't know for sure.

I'm pretty sure it's safe to delete the files on your EFI partition. But I don't know if it matters to Chameleon whether it's formatted with HFS or FAT. I wouldn't think so.

LOL, that sucked, I know. Better wait for someone who actually knows about these things eh.


 
« Last Edit: September 17, 2009, 05:54:06 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

SunLizard

  • Observer
  • Posts: 25
Re: Upgrading From older Chameleon
« Reply #18 on: September 17, 2009, 07:13:37 AM »
Gringo,

Groovy.  Thanks for the response.  I checked my (real) Mac.  Confirmed EFI is HFS on that (which is probably why munky and other have posted mount_hfs instruction all worked)  I think my FAT Cham 1. EFI partition on my hackintosh was something the JaS group was working on in the 10.4.x days.  I never changed it because it worked.

Evidently it doesn't matter to Chameleon (at least v1) if its a FAT partition.  And I just tested the boot loader portion is actually working on HFS+ Cham v2 (as you can prolly attest to as well)

I can also confirm that my stable 10.5.8 system crashes big time off a 'vanilla' transplant of Cham v2.

BTW: answer my own earlier question.  Originally, com.apple.Boot.plist resides in the {primary OSX partition}/Library/Preferences/SystemConfiguration/ directory.  (that's @pples original residence point, before Cham bumped it to 4 alternate locations..)
-------------------
Back on subject: (what I've learned so far) moving from a stable 10.5.8 Cham v1 to 10.5.8 Cham v2:
1) File system use between 2 Chameleons *may* be different (my Cham v1 was FAT, Cham v2s are normally HFS)
2) Files on v1 are different that v2 (ie, don't expect to find a com.apple.Boot.plist on your v1 system.)
3) Transitioning from v1 to v2 system is not as easy as following directions in Readme for your configuration.
4) Transitioning from v1 to v2 system *may* break your stable system. (regardless of OSX rev)
---------------------
Where to go from here:
1) I could futz around with my experimental drive (Tyrell) trying to find something in the configuration of v2 kext/caches/extras through trial and error.  or
2) I could grab a 'scene' release and use their boot loader installer + 10.5.8 releases to rebuild a working drive. 
The advantage there would be once a working v2 was found I could post my comparison back here.  Although that would be kind of a sellout at this point.
-----------
I have to sleep on that one.
Stable Rig:
mobo: Gigabyte GA-EP45-DS3R (ALC889a Audio)
SATA: (2) 750 Gig Baracuda
         (1) NECC 12x Litescribe DVD-DL Burner
         (1) Lite-On 4x BD Burner          video:  Sapphire ATI 2600XT (512) PCI-E OS: 10.5.8 (Vanilla Kernel) bootloader: Cham v1.0.12  Beta: 10.6.0 (sep HDD)

SunLizard

  • Observer
  • Posts: 25
Re: Upgrading from v1.X to v2.x Chameleon
« Reply #19 on: September 18, 2009, 02:58:53 AM »
Alright, so I weenie-d out an went with a completely fresh install from iAtkos v7 installer. 

I'm now at Cham v2 RC3 + 10.5.7 on my experimental drive.

I reformatted my experimental drive (Tyrell) and with a fresh drive installed Cham v2 rc1 from iAtkos installer + a base 10.5.7.  From there I verified I was booting OK and bumped the bootloader to v2 RC2.  [ first I tried using the package installer again... once again, it gave me grief and bom'd out]  I shifted to manual install of RC2 and that went ok.

** I'll pause here to let you know from the v2 rc1 installer on the iAtkos v7 release (they used a shell script which worked after I did some terminal a mano]  The files that got installed to the EFI partition were 'bare bones' since I have no experience with RC1 (until today) I cannot say it was due to iAtkos shell, but it was a definite no-frills affiir.  Just a boot file in the EFI partition (as far as I saw) and one directory called /Library/Temp which contained documentation file for configuring smbios.plist and the smbios.plist itself.

After I put Cham v2 RC2 on the EFI partition manually (following the guides)  I decided to verify that I was seeing all files and grabbed the Automator script Show-Hide. DSDT.aml also showed up in the root partition (of the EFI drive)

Using Show-Hide and Finder I was now able to see that the EFI structure had changed significantly.
the directory .Chameleon was now present (note the dot, making it hidden) inside which was the Extra Folder.  Inside Extra { /.Chameleon/Extra/ } were all the files one normally associates with Chameleon (Themes) etc etc.

--------------
Summary:
1) When you go to mount the EFI partition, ensure you have enabled something that allows you to see hidden files. (not something mentioned elsewhere)
2) As far as I can tell, Cham v1 (which writes boot0 to MBR 0, and places a boot file) in the primary partition contains nothing hardware/driver specific therefore you don't need anything from the Cham 1 to go to Cham 2.
3) When shifting between Release Codes (RC) be careful of what goes where in terms of options here's a note sheet:
com.apple.Boot.plist
    On a Mac: {OS Partition}/Library/Preferences/SystemConfig/
    On Cham v1 : same as above (Cham v1 doesn't use it)
    On Cham v2 RC 1: {EFI Partition}/Library
    On Cham v2 RC 2: in .Chameleon/Extra
    On Cham v2 RC 3: (one of 4 locations)
smbios.plist
    On a Mac: N/A
    On a Cham v1: not used w/o patching
    On a Cham v2 RC1: {EFI Partition} /Library
    On Cham v2 RC 2: in .Chameleon/Extra
    On Cham v2 RC 3: (one of 4 locations)
boot
    On a Mac: N/A
    On a Cham v1: in primary root partition
    On a Cham v2 RC1: {EFI Partition} /
    On Cham v2 RC 2: {EFI Partition} /
    On Cham v2 RC 3: {EFI Partition} /   

If I missed anything important, just let me know.  Hope this helps someone.

----------------

Left to do: 1) bring Test-bed up to 10.5.8
               2) get cracking on my fully patched DSDT.aml for my system
               3) (hope like hell netkas can find a way around Shader issues for ATI2xxx cards. for SL)

----------------
I'm going to update the topic and the original post to SOLVED, as the answer is: nothing, but perhaps anyone looking for information on this topic can find some use in it.

S_L
Stable Rig:
mobo: Gigabyte GA-EP45-DS3R (ALC889a Audio)
SATA: (2) 750 Gig Baracuda
         (1) NECC 12x Litescribe DVD-DL Burner
         (1) Lite-On 4x BD Burner          video:  Sapphire ATI 2600XT (512) PCI-E OS: 10.5.8 (Vanilla Kernel) bootloader: Cham v1.0.12  Beta: 10.6.0 (sep HDD)

Distemperus

  • Entrant
  • Posts: 6
Re: Upgrading from v1.X to v2.x Chameleon
« Reply #20 on: September 18, 2009, 08:16:25 AM »
I put Cham v2 RC2 on the EFI partition manually (following the guides)
 [When installing, what goes where] com.apple.Boot.plist [and] smbios.plist
    On Cham v2 RC 2: in .Chameleon/Extra
I'm looking at the RC2 source in boot2/drivers.c - the LoadDrivers function. It goes:
(ramdisk)/Extra
(root_partition)/Extra
(boot_partition)/Extra/10.X
(boot_partition)/Extra

I'm not finding any .Chameleon folder - stock Chameleon 2.0 RC2 wouldn't ever find a .Chameleon/Extra folder. The word "Chameleon" isn't really part of the source code itself. And nothing changed those directories in RC3.

Are you sure about this hidden .Chameleon folder?

SunLizard

  • Observer
  • Posts: 25
Re: Upgrading from v1.X to v2.x Chameleon... What you need to know (SOLVED)
« Reply #21 on: September 18, 2009, 09:49:04 PM »
Disteperus,
Quote
Are you sure about this hidden .Chameleon folder?

Positive, however, since I couldn't find the actual shell script off of the iAtkos v7 disk to look at, I can't say for certain that that was a customized version of the source compiled by the iAtkos Cham section.  What did strike me as odd was that it was left intact (and I assume functional) after I changed over to RC2 manually. (I'm certain, I did't reference it in my terminal commands.)

To be completely fair, since I haven't started mucking with the system properly in earnest, I can't verify that Cham RC3 is even looking in that location for anything.

Just to recap: Cham v2 RC1 came off iAtkos install CD (no pedigree provided)
Cham v2 RC2 came off official downloads here.
Cham v2 RC3 also cam off offical downloads link.

Last point: question on your drivers.c layout. 
Quote
(boot_partition)/Extra/10.X
is the X there a coded variable or did you just shorten it for clarity's sake?

Thanks for your response.
S_L
Stable Rig:
mobo: Gigabyte GA-EP45-DS3R (ALC889a Audio)
SATA: (2) 750 Gig Baracuda
         (1) NECC 12x Litescribe DVD-DL Burner
         (1) Lite-On 4x BD Burner          video:  Sapphire ATI 2600XT (512) PCI-E OS: 10.5.8 (Vanilla Kernel) bootloader: Cham v1.0.12  Beta: 10.6.0 (sep HDD)

Distemperus

  • Entrant
  • Posts: 6
Re: Upgrading from v1.X to v2.x Chameleon... What you need to know (SOLVED)
« Reply #22 on: September 25, 2009, 05:02:56 AM »
Last point: question on your drivers.c layout. 
Quote
(boot_partition)/Extra/10.X
is the X there a coded variable or did you just shorten it for clarity's sake?
Sorry, for the delay (vacation).

The 10.X is shorthand, but it isn't too far off. drivers.c has
Code: [Select]
sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);which says to look at (boot partition)/Extra/SOMETHING/ where gMacOSVersion is the SOMETHING that gets inserted. Even if you didn't know where to start, you could grep for "Extra" and see what that got you. You can grep for the gMacOSVersion variable in the source code folder:
grep -e "gMacOSVersion" -r /path/to/chameleon/source
which gets:
Code: [Select]
~/Desktop/Chameleon-2.0-RC3-r658-src/i386/boot2/boot.c: strncpy(gMacOSVersion, val, MIN(len, 4));
~/Desktop/Chameleon-2.0-RC3-r658-src/i386/boot2/boot.c: gMacOSVersion[MIN(len, 4)] = '\0';
~/Desktop/Chameleon-2.0-RC3-r658-src/i386/boot2/boot.c: verbose("Loading Darwin %s\n", gMacOSVersion);
~/Desktop/Chameleon-2.0-RC3-r658-src/i386/boot2/drivers.c:extern char gMacOSVersion;
~/Desktop/Chameleon-2.0-RC3-r658-src/i386/boot2/drivers.c:   sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion);
so hunting for gMacOSVersion in boot.c, you get:
Code: [Select]
// Find out which version mac os we're booting.
if (!loadConfigFile("System/Library/CoreServices/SystemVersion.plist", &systemVersion) )
if (getValueForKey("ProductVersion", &val, &len, &systemVersion))
{
// getValueForKey uses const char for val
// so copy it and trim
strncpy(gMacOSVersion, val, MIN(len, 4));
gMacOSVersion[MIN(len, 4)] = '\0';
}
which happens very early in the boot process. It loads /System/Library/CoreServices/SystemVersion.plist. You can see it for yourself:
open -a TextEdit /System/Library/CoreServices/SystemVersion.plist
and find the ProductVersion (say 10.5.8). The strncpy copies at most 4 characters ('1', '0', '.' & '5'). So here, gMacOSVersion = 10.5 - which is the how & why Chameleon searches for a 10.X folder.

SunLizard

  • Observer
  • Posts: 25
Re: Upgrading from v1.X to v2.x Chameleon... What you need to know (SOLVED)
« Reply #23 on: September 26, 2009, 06:53:10 AM »
Distemperus,

Outstanding response, thanks.

It was interesting to me as I thought, I may be having issues because I had both 10.5 and 10.6 on different HFS partitions and wondered what got looked at first....

Thanks a lot for adding the code and explaining it.

S_L
Stable Rig:
mobo: Gigabyte GA-EP45-DS3R (ALC889a Audio)
SATA: (2) 750 Gig Baracuda
         (1) NECC 12x Litescribe DVD-DL Burner
         (1) Lite-On 4x BD Burner          video:  Sapphire ATI 2600XT (512) PCI-E OS: 10.5.8 (Vanilla Kernel) bootloader: Cham v1.0.12  Beta: 10.6.0 (sep HDD)

Distemperus

  • Entrant
  • Posts: 6
Re: Upgrading from v1.X to v2.x Chameleon... What you need to know (SOLVED)
« Reply #24 on: September 26, 2009, 12:30:40 PM »
I think I found the hidden .Chameleon folder issue - and why you are seeing it. [Begin lengthy explanation]

I took a look through Chameleon-2.0-RC2-r640.pkg.zip. I used xar on the package because it doesn't have a traditional folder "Show Package" structure & the Installer build script wasn't released. But the scripts that are included shed light on this hidden .Chameleon folder you've spoken of (and I've never run into - but as I said I install manually).

(parts of scripts edited out)
Scripts.pkg/postinstall:
Code: [Select]
diskloader="boot0"
fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
fdisk -e ${bootdisk} <<-MAKEACTIVE

# setup link for extras
[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
echo "Executing command: ln -s . ${2}/.Chameleon"
ln -s "." "${2}/.Chameleon"

Post.pgk/postinstall:
Code: [Select]
# source com.apple.boot.plist
if ! [ -f "${2}/.Chameleon/Extra/com.apple.Boot.plist" ]; then
if [ -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" ]; then
cp -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" "${2}/.Chameleon/Extra"
fi
fi

# fix kext permissions
find "${2}/.Chameleon/Extra/Extensions" -type f -exec chmod 644 {} \;
find "${2}/.Chameleon/Extra/Extensions" -type d -exec chmod 755 {} \;
chown -R 0:0 "${2}/.Chameleon/Extra/Extensions"

# build mkext for extras
[ -d "${temp}" ] && rm -R -f "${temp}"
mkdir -p "${temp}/Extensions"
ditto --noextattr --noqtn --arch i386 "${2}/.Chameleon/Extra/Extensions" "${temp}/Extensions"
find "${temp}" -type f -exec chmod 644 {} \;
find "${temp}" -type d -exec chmod 755 {} \;
chown -R 0:0 "${temp}"
kextcache -m "${temp}/Extensions.mkext" "${temp}/Extensions"
cp -f "${temp}/Extensions.mkext" "${2}/.Chameleon/Extra"
rm -R -f "${temp}"

# remove link for extras install
unlink "${2}/.Chameleon"

So in Scripts.pkg/postinstall the fdisk being used is the stock OS fdisk, not the one Chameleon provies & installs (which goes unused). The Chameleon manual install instructions say to use it - I've always used the stock fdisk (and so apparently has the installer) - no problems on my end. And /usr/bin/standalone/i386 isn't in $PATH either (so Core.pkg seems unecessary as well). The command fdisk -f mbrtemplate file does not utilize a templatefile (which according to apple's mbr.h: MBR_CODE_SIZE 0x1B8 //=440 bytes & boot0 is 512 and not a template file).

The Scripts.pkg/postinstall works directly in the "${2}/Extra" folder, then at the end creates a symlink. I don't know where "." is , but it makes a symbolic link to $2/.Chameleon which I am guessing is on the target volume. So for an EFI install: /Volumes/EFI/.Chameleon is the symbolic link created and used in the next Post.pgk/postinstall script.

The Post.pgk/postinstall does things that I think are unnecessary: making a kextcache, copying the kextcache when the output could have been directed to the destination in the first place. The ditto --noextattr --noqtn --arch i386 only copies 32bit kexts as well (don't know why).

It would seem that the unlink "${2}/.Chameleon" isn't working for you - you shouldn't have one according to that script. In the end, you (should) have the exact same folder structure as everyone else: /Volumes/EFI/Extra. That explains how you have a .Chameleon/Extra/Extensions & Chameleon is able to find your kernel extensions - it uses the existing non-symlinked /Volumes/EFI/Extra/Extensions folder.

To summarize: if you are left with a .Chameleon folder, it is a bug in the install script. The developers have already acknowledged that the installer was imperfect and didn't release one for RC3, so hopefully they will rethink the need for a .Chameleon folder. To verify, I have:

# ls -Al /Volumes/EFI
drwxr-xr-x  7 root  admin     238 Sep  3 18:43 Extra
-rw-r--r--@ 1 root  admin  308288 Sep  3 18:35 boot

you probably have:
lrwxr-xr-x  1 root  admin       1 Sep 26 06:03 .Chameleon -> .
drwxr-xr-x  7 root  admin     238 Sep  3 18:43 Extra
-rw-r--r--@ 1 root  admin  308288 Sep  3 18:35 boot

SunLizard

  • Observer
  • Posts: 25
Re: Upgrading from v1.X to v2.x Chameleon... What you need to know (SOLVED)
« Reply #25 on: September 28, 2009, 01:08:33 AM »
Very similar to what you expected, however (and) of note, the Extras directory ends up in the .Chameleon directory.  That may be causing issues.

I'm going to attempt some changes in how mines laid out that will probably break some stuff tonight.

You were kind enough to go into the code for me, so I thought I'd post a screenshot of what's layout of my EFI disk

here ya go:
Stable Rig:
mobo: Gigabyte GA-EP45-DS3R (ALC889a Audio)
SATA: (2) 750 Gig Baracuda
         (1) NECC 12x Litescribe DVD-DL Burner
         (1) Lite-On 4x BD Burner          video:  Sapphire ATI 2600XT (512) PCI-E OS: 10.5.8 (Vanilla Kernel) bootloader: Cham v1.0.12  Beta: 10.6.0 (sep HDD)