Voodooprojects

Chameleon => General Discussion => Topic started by: macdanny on June 17, 2009, 04:53:50 PM

Title: How do I manually install chameleon?
Post by: macdanny on June 17, 2009, 04:53:50 PM
I would like to manually install chameleon. I have a dell xps m1330 laptop and I have repeatedly installed chameleon to the root of the osx install and it's like there is no bootloader at all. I never see the screen where I can choose which partition to boot from. I can get into the install with my usb key which has syslinux on it and a initrd.img. I'm stumped. How do I verify or rewrite the MBR code on sector 0? Would error 35 below be causing my problem? Thank you in advance to anyone willing to help.

Danny

Last login: Wed Jun 17 10:37:41 on ttys000
dannys-xps-m1330-somemodel:~ Danny$ diskutil list
2009-06-17 10:51:44.248 diskutil[212:10b] _CFGetHostUUIDString: unable to determine UUID for host. Error: 35
2009-06-17 10:51:44.276 DiskManagementTool[213:10b] _CFGetHostUUIDString: unable to determine UUID for host. Error: 35
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *186.3 Gi   disk0
   1:                                                    78.4 Mi    disk0s1
   2:               Windows_NTFS RECOVERY                10.0 Gi    disk0s2
   3:               Windows_NTFS OS                      50.0 Gi    disk0s3
   4:                  Apple_HFS Mac OS X                48.8 Gi    disk0s5
   5:                 DOS_FAT_16                         77.4 Gi    disk0s6
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.9 Gi     disk1
   1:                 DOS_FAT_32 LEXAR                   1.9 Gi     disk1s1
dannys-xps-m1330-somemodel:~ Danny$
Title: Re: How do I manually install chameleon?
Post by: rocksteady on June 17, 2009, 05:58:16 PM
Hello Danny + Welcome,

Please go through the official Docs (http://forum.voodooprojects.org/index.php/topic,351.0.html) + search/browse these forums (just 7 pages). If you get stuck on a particular step, feel free to edit your thread. Both your questions have been discussed extensively here in these forums.
Title: Re: How do I manually install chameleon?
Post by: macdanny on June 17, 2009, 06:13:13 PM
Thanks for your reply, I didn't get very far though. The first command failed.


Last login: Wed Jun 17 12:10:26 on ttys000
dannys-xps-m1330-somemodel:~ Danny$ diskutil list
2009-06-17 12:11:35.064 diskutil[501:10b] _CFGetHostUUIDString: unable to determine UUID for host. Error: 35
2009-06-17 12:11:35.200 DiskManagementTool[502:10b] _CFGetHostUUIDString: unable to determine UUID for host. Error: 35
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *186.3 Gi   disk0
   1:                                                    78.4 Mi    disk0s1
   2:               Windows_NTFS RECOVERY                10.0 Gi    disk0s2
   3:               Windows_NTFS OS                      50.0 Gi    disk0s3
   4:                  Apple_HFS Mac OS X                48.8 Gi    disk0s5
   5:                 DOS_FAT_16                         77.4 Gi    disk0s6
dannys-xps-m1330-somemodel:~ Danny$ sudo fdisk -f boot0 -u -y /dev/rdisk0
fdisk: could not open MBR file boot0: No such file or directory
dannys-xps-m1330-somemodel:~ Danny$
Title: Re: How do I manually install chameleon?
Post by: rocksteady on June 17, 2009, 06:19:15 PM
search for UUID errors  ;)

also posting a detailed description of your setup would help
Title: Re: How do I manually install chameleon?
Post by: macdanny on June 17, 2009, 06:27:18 PM
I saw the thread on UUID errors but do you think that is causing the problem? I installed pacifist and see the boot0 and boot1h files that the official docs say to install but when I followed the instructions it failed as noted in post above. The boot file is in the root folder (hidden) where it belongs. In order to run the command sudo fdisk -f boot0 -u -y /dev/rdisk0 where does the file boot0 need to be? do I extract the files into a folder with pacifist then run the command from inside that folder? Thank you again for helping point me in the right direction. If error 35 isn't affecting chameleon I want to tackle that later so please advise.
Title: Re: How do I manually install chameleon?
Post by: rocksteady on June 17, 2009, 06:35:12 PM
OK, while you browse the forum, let us know the following:

Kind/Version of X (retail, distro, etc)?
Fresh Install or an existing one?
HD mode? SATA/IDE?
The contents of your com.apple.Boot.plist + /Extra/Extensions (from Chameleon's side, not the ones in Leopard's tree)
Title: Re: How do I manually install chameleon?
Post by: macdanny on June 17, 2009, 06:39:00 PM
You also asked for a detailed description of my setup. What does that entail exactly? I installed a retail dvd 10.5.6 that I imaged to a usb and modified osinstall.mpkg so I could install to a MBR partition. I used a thumb drive with syslinux and an initrd.img to boot and then swapped to the other usb stick that has the modded retail dvd on it. I have since upgraded to 10.5.7 and installed iLife 09 and done all software updates. As far as hardware goes, I'm installed on a dell xps m1330 laptop which has a core 2 duo processor so I'm running the vanilla kernel. I installed to an internal 7200 rpm sata 200 gig drive and the machine has 4 gigs of ddr2 or ddr3 ram. For Graphics I have the 128mb Nvidia GS 8400 and use nvinject.kext for that. I have sigmatel 9228 for sound and installed a pair of kexts for that. I used a pre made dell laptop installer to fix my trackpad and that's about it. If you need more details about anything please let me know. It is a fresh install.
Title: Re: How do I manually install chameleon?
Post by: macdanny on June 17, 2009, 06:48:21 PM
OOps I hit reply right as your last post was coming in. I added a kernel flag string below but that didn't seem to make a difference. I don't think I'm getting that far along in the boot process. Windows won't boot so I know something is in that mbr spot but I still don't get to the gui that shows the partitions. How do I attach a screenshot showing you the contents of my /extra/extensions folder? I see a place to upload a file, is that it? I've seen pics on insanelymac.com but am new to this forum. I'll give it a try. I notice there are now duplicates of kexts in there. Is that from reinstalling chameleon multiple times?


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>rd=disk0s5</string>
</dict>
</plist>
Title: Re: How do I manually install chameleon?
Post by: rocksteady on June 17, 2009, 07:22:29 PM
Hmmm, I see that your /Extra folder resides in your Leopard partition and is messed up with duplicate kexts, if you just dragged them over they'll most likely have wrong permissions too. Kernel flags are messed too.

You also want to multiboot windows<-->X too, so better take 1 step @ a time:

Take a look here (http://forum.voodooprojects.org/index.php/topic,384.0.html) for a vanilla /Extra/com.apple.Boot.plist and edit your current one accordingly.

This will involve a lengthy step by step process, are you familiar with the Terminal?

Can you boot to Windows ?

I guess that you previously installed Chameleon via the Installer.pkg, right?

Meanwhile, someone with a Dell laptop might give you any hardware-related tips


Title: Re: How do I manually install chameleon?
Post by: macdanny on June 17, 2009, 07:27:39 PM
I can make my plist vanilla again. I deleted the duplicate extensions. Now I have graduated to a blinking cursor instead of the "hit F1" screen I was getting. I can boot windows and osx by using the thumb drive, I just can't get a boot menu from the internal hd. I can use a terminal. I did install with the installer, not manually.
Title: Re: How do I manually install chameleon?
Post by: tempolo on June 17, 2009, 08:51:30 PM
they'll most likely have wrong permissions too.
The permissions in the Extra do not matter at all for booting, though! That's because the boot loader reads them blindly, ignoring any permissions.

Title: Re: How do I manually install chameleon?
Post by: macdanny on June 17, 2009, 09:22:20 PM
Thanks for the info about permissions tempolo. I have already repaired them a few times because I wasn't sure if I needed to or not.
Title: Re: How do I manually install chameleon?
Post by: thorazine74 on June 18, 2009, 08:03:08 PM
It looks like your OS X partition is in a logical partition, judging from the layout you posted (I am guessing disk0s4 is the extended partition and disk0s5 and disk0s6 are logical partitions, not sure if thats correct), thats not supported to boot from there, at least with Chameleon, you need to put it in a primary partition.
Title: Re: How do I manually install chameleon?
Post by: macdanny on June 18, 2009, 09:38:19 PM
You are correct, slice 4 is extended and slices 5 and 6 are logical. I have an older version of chameleon on the usb thumb drive I used to install the os and to boot it currently. Do you know why an older version of chameleon works and the latest and greatest doesn't?

If possible I would like someone to help me downgrade to the last version of chameleon that boots from logical partitions....or enlighten me as to why it sees and boots from the thumb drive and not the internal hard drive.

I don't seem to have a copy of the old bootloader saved, can someone let me know what version to search for or post a link?

Would it be appropriate to ask someone to help me with using grub instead of chameleon on this forum? I don't want to disrespect the chameleon team on their "official" forum.

Title: Re: How do I manually install chameleon?
Post by: Lord Anubis on June 19, 2009, 12:28:40 AM
Quote
Would it be appropriate to ask someone to help me with using grub instead of chameleon on this forum? I don't want to disrespect the chameleon team on their "official" forum.

Not sure, but I think, "the best place is like home", in this case the Grub home place. ;)

I am afraid that there will become to much noise.

Good Luck
Title: Re: How do I manually install chameleon?
Post by: macdanny on June 19, 2009, 07:38:00 AM
I would prefer that the makers of the chameleon software answer my questions but like I read somewhere else in the forum, we are getting our monies worth :)

Mac on my pc hardware is my latest hobby/obsession so I would prefer to get apple/darwin software working since grub is old news to me. Ultimately I want to stop tinkering and just USE the computer but I want to learn a lot along the way.

I also read about chain0 and am considering that option as well but read conflicting info about that working with logical partitions as well so I'm back to needing to know WHY an older chameleon on my thumb drive sees and boots from logical drives just fine but users in the forum tell me that they "think" osx has to be on a primary partition.

I appreciate any well intentioned help from anyone willing to give it but I'm hoping one of the developers/creators stumbles across this thread and gives me a definite answer.
Title: Re: How do I manually install chameleon?
Post by: thorazine74 on June 19, 2009, 10:18:24 AM
I think its not a matter of chameleon versions but about all boot stages being in the same drive.
Booting from the HD chameleon's boot0 on the mbr can only find boot1h in primary partitions, so you never get to the boot menu.
Booting from the USB chameleon is loading all the way to the boot menu (because everything is in the same disk and just using primary partition), and from the boot menu it can see all partitions and boot from there.
I dont know if the chain0 would work for logicals, if you are relying on windows you may have troubles with logicals too, not sure.
You have a small primary partition disk0s1, that seems to be unused or unrecognized for OS X, not sure what it is or whats in there but if you can get rid of it and redo your partition layout you would still be able to make OS X partition be a primary.
Title: Re: How do I manually install chameleon?
Post by: zef on June 19, 2009, 02:36:54 PM
I also read about chain0 and am considering that option as well but read conflicting info about that working with logical partitions as well so I'm back to needing to know WHY an older chameleon on my thumb drive sees and boots from logical drives just fine but users in the forum tell me that they "think" osx has to be on a primary partition.

I appreciate any well intentioned help from anyone willing to give it but I'm hoping one of the developers/creators stumbles across this thread and gives me a definite answer.

The original boot0 code has support for logical partitions, but to be able to support GPT+MBR partitioned disks using a single boot0 code, we removed the extended partiton support. Maybe an ultimate ASM pro could implement all in 440 bytes :)

In your case you may try to use another primary boot loader and chainload your hfs+ partition by adding a new chainload entry in grub or add a chain0 entry in boot.ini when using NT loader or simply add a new OS X entry with EasyBCD - this will install chain0 by itself.
Title: Re: How do I manually install chameleon?
Post by: rocksteady on June 19, 2009, 03:15:26 PM
tempolo's point about permissions refers to kext permissions while I think that you're talking about repairing permissions via the Disk Utility.

In any way, it's a good habit to set your kext permissions appropriately. Even if Chameleon reads them blindly, you'll get errors when trying to make a kext cache (mkext). So for every /Extra/Extensions/*.kext:

Code: [Select]
sudo chown -R root:wheel /Extra/Extensions/MyWhatever.kext
sudo chmod -R 755 /Extra/Extensions/MyWhatever.kext

What's the situation right now? Did you decide to go for an earlier Chameleon version?
Title: Re: How do I manually install chameleon?
Post by: zhell on June 19, 2009, 03:43:58 PM
Second command should be
Code: [Select]
sudo chmod -R go=u-w /Extra/Extensions/MyWhatever.kextOtherwise you add executable permissions to all your files, which is a security hole. This "chmod -R 755" myth just won't die :(
Title: Re: How do I manually install chameleon?
Post by: macdanny on June 19, 2009, 09:17:27 PM
A big thanks to thorazine74 and zef for clearing up the reason I am unable to boot from a logical partition. I like it when things make sense. I'll try EasyBCD out, but I wouldn't mind it if zef sent me that original boot0 code that is MBR specific so I can feel like I really understand the boot process better.

I also want to thank rocksteady for being a mind reader. You are correct in assuming I was talking about repairing permissions via the Disk Utility. I'm not really sure the difference between what Disk Utilily does and what the chown and chmod commands do. If you can point me to an explanation that would be great.

I know that commands chown and chmod are used in linux but I've never seen a Disk Utility like "repair permissions" in linux so I don't know what it is actually doing, just that it has to be done often when kexts are modded.
 
I am quickly becoming a fan of osx and may lose the desire to play with linux or freebsd as much now that I have a new os to play with and learn about. Heck I may even buy apple hardware some day once I master the hackintosh.
Title: Re: How do I manually install chameleon?
Post by: tempolo on June 19, 2009, 09:45:57 PM
I'm not really sure the difference between what Disk Utilily does and what the chown and chmod commands do.
Disk Utilily's "Repair permissions" looks at a database that's stored somewhere in /Library, I believe, and which lists the "correct" permissions for many files, mostly those supplied by Apple. If the actual permissions differ from these, they can be reset.
Those "correct" permissions are sometimes necessary so that the OS function operate at all (e.g, if some executable files have the wrong owner, they might not work), while other permissions are only required as a safety measures against hackers and malicious programs trying to "break in".

As for the permission of the Extension (and Extra) folders, they are mostly not important because when they get loaded as part of the early boot process, their permissions do not matter at all. Hence, while you are trying things out with different kexts, it's easier to just change all permissions and/or owners of the folders to "read+write" for "everyone" so that you do not have to authorize changes all the time.

Once you're doing testing, resetting the proper (safe) permissions would be prudent.

Title: Re: How do I manually install chameleon?
Post by: zef on June 19, 2009, 10:03:31 PM
... I wouldn't mind it if zef sent me that original boot0 code that is MBR specific so I can feel like I really understand the boot process better.

There you go:

http://www.opensource.apple.com/release/mac-os-x-1044x86/ (http://www.opensource.apple.com/release/mac-os-x-1044x86/)

Look for "boot-132", you can either browse the source online or get the tarball. This is the father of all later existing boot loader projects. It was originally posted when Apple released the 10.4.8 kernel sources back in october 2006.

You can find more interesting readings here from David Elliott (all fake EFI loaders are based on his patched versions):

http://tgwbd.org/darwin/boot.html (http://tgwbd.org/darwin/boot.html)
Title: Re: How do I manually install chameleon?
Post by: tempolo on June 19, 2009, 10:14:41 PM
To add to zef's reply, I've also tried to document this a little. See my page here:

http://www.tempel.org/Hackintosh/ImplementationDetails

Title: Re: How do I manually install chameleon?
Post by: macdanny on June 21, 2009, 04:34:52 PM
Thank you to all. I will check out the links in these last 2 posts. EasyBCD brings me to the chameleon loader so I'm happy for now. How do I close or mark this thread as solved?

I'm sure I'll want to tinker with it some more soon but for now I'm happy to not have to rely on a thumb drive to boot into my install. I'll probably research my UUID error 35 message first and then poke around to see if anyone has gotten my wireless card working since I'm tethered to the apple usb to ethernet adapter right now.
Title: Re: How do I manually install chameleon?
Post by: zef on June 21, 2009, 06:15:38 PM
To add to zef's reply, I've also tried to document this a little. See my page here:

http://www.tempel.org/Hackintosh/ImplementationDetails

Thx tempolo, great stuff! Btw the boot0 section needs a small correction:

Quote
boot0 or chain0 - These are phase 0 loaders, fitting into the first sector of a disk, the MBR (<= 446 bytes). They load phase 1, i.e. two sectors (<= 1024 byte) from the start of the partition that's marked active in the MBR.

Both boot0 and chain0 will load only 1 sector. The 1024 byte long boot1h found in Chameleon loads the second sector by himself.