[Guide] Boot from EFI partition, zero modification installs on Intel SSE2 or better..., Zero-modification Leopard installs. Share disks between macs & ha |
Welcome to the Genius Bar. Here's how this forum works:
1. Members are encouraged to make a guide that details something that they might have found troubling or challenging.
Chances are, if you've seen the same question asked over and over again, you should write a guide for it.
2. This is not the forum for asking questions. If you have a question about a thread that's already here, feel free to ask it.
Just don't start a thread for a specific question. Use the other forums here for that.
3. Posting links to off-site tutorials is not allowed.
4. That's it! Thanks for sharing your information with the rest of us. :)
To keep this forum clean this forum is moderated. You can post in existing topics but new ones will have to be approved before they show up. Quality guides promoting new methods and encouraging users to learn will be approved.
[Guide] Boot from EFI partition, zero modification installs on Intel SSE2 or better..., Zero-modification Leopard installs. Share disks between macs & ha |
|
munky
Agent of Evolution
|
![]() |
Sep 21 2008, 05:08 PM Post #1
|
![]()
|
*** Special thanks to Turbo, Dense, dfe, zef and the rest of the chameleon team for making this possible...
** DEPRECATION NOTICE: This functionality is coming to a Chameleon release very soon. Once Chameleon supports this approach, this project will be retired. Thanks to everyone who uses this bootloader, thanks for the support and the kind words LATEST UPDATES: - *** CHAMELEON 2 RC1 is out and looks pretty damned *amazing* - go check it out! It does everything this bootloader does and far more *** - D'oh! v6 looks for DSDT.aml in the root partition, not EFI partition. v6.1 corrects this error. - DSDT override patch now integrated (v6) (credit and huge thanks to mackerintel!), for 10.5.6 support. - Source code attached. Didn't get round to commenting and cleaning up. Suffice to say, 99% of the work was done by dfe, turbo, zef and the team. CHANGELOG: - v6.1 corrects the bug whereby v6 looked for the DSDT.aml file in the root partition, not the EFI partition. - v6 is a stopgap solution in case 10.5.6 hits before the new Chameleon is released. It supports DSDT.aml file in root of EFI partition. - v5.1 fixes an error in the packaging - in v5, 'boot' was the v5 version, but 'boot-turbo-munky.bin' was still v4. - v5 has updated FSB detection code from Chameleon - Basic dual booting is possible. Just hit esc at darwin bootprompt and enter 81 for 2nd drive, 82 for 3rd... - v4 now supports JMicron ATA - v3 now supports Boot.plist on the EFI partition - v2 now supports device-properties (aka EFI Strings) in com.apple.Boot.plist ! A *BIG* thank u to Chameleon team for sharing their great sources - porting was a cinch! The release of dfe's amazing boot-132 loader was an eye-opener for many of us in the community. The fact we can boot the shrink-wrapped, unmodified retail Leopard DVD on modern Intel machines (and, it turned out, on any SSE2 or better Intel machine) means we have the ability to boot a totally unmodified OS X. (The install DVD of course boots into Mac OS X). However, it seemed most people didnt realise the gravity of this, or simply thought 'oh thats nice, use retail to install. ok, back to hacking in /System/Library/Extensions....'. This is, imho, the wrong approach. The *right* approach is to leave /System/Library/Extensions alone, and apply patches and modifications to the system from a different vector, just like boot-132. This is, in my humble opinion, the ultimate hackintosh install method. What benefit does that give you? * Well, how about trouble-free Software Update direct from Apple? Even on SSE2 Intels? (and AMDs when Voodoo 9.5.0 final comes out...) * How about being able to completely erase and reinstall the OS without breaking ur carefully-assembled patches? * How about being able to boot *the same disk* on a real mac and your hack? * How about having a com.apple.Boot.plist completely outwith the installed OS? all without losing the usual EFI strings goodness you've come to expect from a bootloader... (Thx to Chameleon team!) So munky, where's the beef? Well first, a little history... When you format a GPT (GUID Partition Table) disk in Disk Utility, there is always a hidden, 200Mb partition created as the first partition on the disk. This is supposed to be a 200Mb FAT-32 partition used for storing EFI drivers, and is mandated by the EFI / GPT specs. Apple honours the specs and so puts the 200Mb partition there. However, (and this is the important part...) *Apple dont use it!* So we can hijack it and use it for our own ends. You're still not getting to the point... Ok ok. So here goes. We repurpose the EFI system partition to hold our kexts (and, if necessary, kernels) so we dont have to change the main installation. AT ALL. The nice thing is that Mac OS X and Disk Utility (at least the graphical version) will continue to hide the EFI partition, as you're not supposed to see it. But you also have the option to mount it if you need to make changes. And, of course, on ALL systems (currently Intel SSE2 and better), Software Update can be used without much chance (if any) of breakage. Hmmm... ok i'm sold. So how do I do it? Well, first grab the attached zip file. This contains a modified version of boot0 from chameleon, the unmodified boot1h from chameleon, and a fork of dfe's boot2. boot0 has been changed to look for the EFI system partition, and boot2 has been modified to load extra kexts from the EFI partition. Warnings, Pre-Requisites *** YOU'RE DOING THIS AT YOUR OWN RISK BTW. Dont bitch at me if your computer explodes and kills your cat. *** You are probably best to try getting your system to boot a retail disc with boot-132 before you attempt this method. Getting it to work with boot-132 is good practice for maintaining a 'patches-free' system, and will give you a good idea of the kexts you'll need for your particular system. NB: YOU CANNOT USE ANYTHING OTHER THAN A RETAIL DVD. Dont try a restore or drop-in disc, they WILL NOT WORK. Another BIG NOTE: existing chameleon, pc-efi etc bootloaders can seriously mess this up. If you have problems please try with only one hd attached and make sure u *completely destroy* the existing partitions before install. In the following guide, i've used the convention of diskXsY. Please understand, you should NEVER type diskX or diskXsY - X and Y are placeholders and need to be replaced with proper values. On most systems installed to the first hard disk, this will be disk0. Partition 1 on any GPT disk formatted by Disk Utility will be the 200Mb EFI partition. So in most cases, we'll be talking about disk0, rdisk0 and disk0s1. Finally, please make sure you read and re-read this guide before starting. If you are unsure about any of the steps, then my advice is DONT DO IT. Wait for someone to turn these set of instructions into an easy-to-use installer or something. Finally, the beef! So, best practice is to use a boot-132 disc and install a fresh Leopard installation onto a GPT disk from retail. Lets call this 'Phase 0'. You find or create a boot-132 disc capable of booting to the installer from a retail Leo disc on your particular setup. Go into Disk Utility from the menu and partition one of your drives as GUID Partition Table type and create at least one partition big enough for Leopard. Look elsewhere for questions about boot-132 (like the links above). This guide assumes you can, and have, booted the retail Leo disc and installed to a GPT disk. Once you've done that, boot into your new install via boot-132, and do the following: Phase 1: Reformatting the EFI System Partition. 1) Open Terminal 2) sudo -s (and type in your password) 3) diskutil info / | grep Identifier - this tells you the values for diskXsY for '/', which is the currently-booted system. (If you're doing this on a disk other than the one you've booted from, you need to modify accordingly.) 4) diskutil list - diskXs1 should be called EFI. this is the hidden EFI partition on your target drive. 5) diskutil eraseVolume "HFS+" "EFI" /dev/diskXs1 - now, be *VERY* sure this is the correct drive. this will format the EFI partition as HFS+. (NB After erasing it will try to mount it, but will fail with "Could not mount disk0s1 with name after erase". Ignore this). Phase 2: Installing the modified bootloader. 1) Extract the attached zip file to a directory (Safari might do this for you). 2) in terminal, cd to that directory (the one containing boot0, boot1h, boot-turbo-munky.bin and fdisk) 3) ./fdisk -f boot0 -u -y /dev/rdiskX - this puts the stage 0 bootloader onto the target disk 4) dd if=boot1h of=/dev/rdiskXs1 - this puts the stage 1 bootloader onto the target partition (EFI partition) 5) mkdir /Volumes/EFI 6) mount_hfs /dev/diskXs1 /Volumes/EFI 7) cp boot-turbo-munky.bin /Volumes/EFI/boot 8) cp update.sh /Volumes/EFI/ Phase 3: Make the disk bootable This stage may not be necessary on some boards, but on my Intel board and Bad Axe boards it is. If you skip this step and your system wont boot, try doing it. That said, doing this on boards which DONT need it will do no harm so my logic is do it anyway. Type the fdisk command and then each line as shown: 1) ./fdisk -e /dev/rdiskX (NB: Ignore any fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory error) 2) f 1 3) w 4) q Phase 4: Setup your new bootloader EFI partition 1) Setup directory tree: mkdir -p /Volumes/EFI/System/Booter mkdir /Volumes/EFI/Extensions mkdir /Volumes/EFI/.fseventsd 2) touch /Volumes/EFI/.fseventsd/no_log - this prevents the File System Events Daemon (fseventsd) from logging on this volume, which can cause the EFI partition to become unmountable. 3) copy necessary extensions into /Volumes/EFI/Extensions (eg: cd <directory containing kexts> cp -R *.kext /Volumes/EFI/Extensions) 4) if necessary, copy patched kernel into /Volumes/EFI/ (eg: cd <directory containing the wonderful Voodoo kernel) cp mach_kernel.voodoo /Volumes/EFI/ 5) cd /Volumes/EFI chmod +x update.sh sudo ./update.sh - this will build a kextcache in /System/Booter. Please check update.log for any errors. (Dependency warnings are ok and normal - the dependencies will be available at boot time from /System/Library/Extensions). 6) umount /Volumes/EFI (If this fails, do umount -f /Volumes/EFI). 7) rm -rf /Volumes/EFI 8) If your machine cannot use the vanilla kernel, at this point you must take a note of your install's UUID. Open Disk Utility.app and click on the partition containing your fresh install. Click the blue 'I' information icon and look for Universal Unique Identifier. This should be a fairly long hex string. Write this down somewhere on a piece of paper. (not in a text file on the computer!) You should be ready to boot at this stage. Phase 5: Test boot! So this differs slightly depending on whether you have a Core cpu or not - that is, whether you can (or choose to) run the vanilla kernel or a patched kernel. If you boot the vanilla kernel, you should just have to press Return, as the bootloader should find your installed OS. If you boot a patched kernel, the magic you need is this: bt(0,0)/mach_kernel.voodoo -v boot-uuid=<the install's uuid you wrote down earlier>. With a bit of luck, you'll boot up into your nice shiny new Leopard install, and be able to use Software Update without worrying. Phase 6: Post-Install - Kexts, EFI strings, Boot.plist, Troubleshooting Kexts: So you booted back up, but you maybe dont have gfx support, or are missing some nice LAN kext... To mount EFI: sudo -s mkdir /Volumes/EFI mount_hfs /dev/diskXs1 /Volumes/EFI to install new kexts: sudo -s cd path/to/kext cp -R Blah.kext /Volumes/EFI/Extensions cd /Volumes/EFI ./update.sh EFI Strings and com.apple.Boot.plist: v3 of the bootloader supports a com.apple.Boot.plist file located on the EFI partition. You can place this in either of these two locations: /Volumes/EFI/com.apple.Boot.plist -or- /Volumes/EFI/Library/Preferences/SystemConfiguration/com.apple.Boot.plist Its your choice, and it makes no difference. If you have both it will favour the one in /Library/Pref..... This is, of course, the place to put EFI strings - aka device properties - strings. This bootloader supports EFI strings in the same format as Chameleon expects them. Troubleshooting If you ever get 'mount_hfs: Invalid argument' when trying to mount the EFI partition, do this to fix it: fsck_hfs /dev/disxXs1. *** Always unmount the EFI partition before rebooting, to stop this happening! umount /Volumes/EFI! *** Notes I also have a vanilla installation on a USB drive which I share between two real macs (my home MacBook Pro and my work MacBook Pro) as well as my hack. I have the necessary kexts and kernels on the EFI partition (remember, the real macs ignore this partition), and to boot it on my hackintosh, bt(0,0)/mach_kernel.voodoo boot-uuid=<blah>. One thing - you can actually use rd=diskXsY to specify the boot device. I prefer using boot-uuid because that wont break if I change the configuration of hard disks on my machine, whereas the diskXsY values could. Another thing, for pre-Core users, please keep the relevant System.kext on the EFI partition for the kernel you wish to use. For example, my hackintosh has mach_kernel.voodoo (9.4.0 kernel for 10.5.4), and the 9.4.0 (10.5.4) System.kext in /System/Booter/Extensions.mkext. These are used in preference to the kernel and System.kext on the installation, which are both vanilla 9.5.0 (10.5.5) versions. This means USB mounting etc wont break. Dual- Triple- Quadruple-.... Booting! Since this bootloader is based on dfe, you can hit escape at the darwin boot prompt and enter a new bios device id to boot from. If you have a 2nd hard disk with Windows, you can hit esc, type 81 and enter, and it should show the darwin prompt with 'Foreign OS'. Hit enter to boot Windows Background Reading If this stuff is new to you, or you're having trouble following, please read these threads first: http://forum.insanelymac.com/index.php?showtopic=113288 http://forum.insanelymac.com/index.php?showtopic=123841 http://forum.insanelymac.com/index.php?showtopic=123313 Source Code Now attached. Apologies for not having commented it all properly, or even doing basic cleaning up. All work by dfe, turbo, zef, chameleon team with a couple small bits and bobs from me. Changelog and Downloads v1 is the original bootloader, comprising Turbo's changes to the dfe bootloader. Deprecated by v2 v2 supports EFI strings in com.apple.Boot.plist. apply them in chameleon style - ie <device-properties> tag. Deprecated by v3 v3 supports a com.apple.Boot.plist on the EFI partition (in root or in /Library/Preferences/SystemConfiguration), boots faster, and integrates the update.sh script v4 supports JMicron and other 'troublesome' ATA v5 adds the improved FSB detection code from Chameleon v5.1 is a repackaging of v5 to correct a misnamed file. No other changes. v6 supports DSDT override, and has apple boot logo removed (needed to save space v6.1 makes the bootloader look for DSDT.aml in root of EFI partition, not boot partition. D'oh! v5.1 source attached.
Attached File(s)
v61_src.zip ( 864.65K )
Number of downloads: 2115
efi_boot_v5.1.zip ( 60.29K )
Number of downloads: 5578
efiboot_v5.1_source.zip ( 869.59K )
Number of downloads: 1434
efi_boot_v6.1.zip ( 58.79K )
Number of downloads: 9495 |
munky [Guide] Boot from EFI partition, zero modification installs on Intel SSE2 or better... Sep 21 2008, 05:08 PM
3D mn Thanks munky the Guide that I'm waiting for.
I... Sep 21 2008, 06:28 PM
Big Kahuna Excellent work sir.
Now to recover the vanilla fi... Sep 21 2008, 06:31 PM
adamsweeting I'm lovin' the logic behind this... sounds... Sep 21 2008, 06:37 PM
sonotone Thanks for this.
QUOTE On my system (a Pentium ... Sep 21 2008, 06:52 PM
munky sorry, you're right. my hack is currently run... Sep 21 2008, 06:54 PM
sonotone Stickpin seem's to works on it.... hope it wil... Sep 21 2008, 07:02 PM
roisoft Awesome work
an excellent guide as always, i... Sep 21 2008, 07:16 PM
munky Please post success / failure asap. Sep 21 2008, 07:33 PM
cabron awesome munky
Im afraid but i cannot test this no... Sep 21 2008, 08:06 PM
Big Kahuna Testing soon as I get home from work. Sep 21 2008, 08:10 PM
Nick14 i did everything but nothing happend
Never mind i... Sep 21 2008, 08:44 PM
munky right. This needs to be on gpt. Sep 21 2008, 08:56 PM
BladeRunner I tried to follow the guide, but got an error:
CO... Sep 21 2008, 09:25 PM
munky no, you just ignore the error and keep going
i... Sep 21 2008, 09:31 PM
Nick14 can i put my whole extention from leopard 10.5.4 s... Sep 21 2008, 09:38 PM
munky nick14: dunno mate, give it a go. Sep 21 2008, 09:43 PM
Nick14 Do you still think i can use Apple update? Sep 21 2008, 09:51 PM
Neonkoala Still sorting it atm, but you should add a note to... Sep 21 2008, 09:51 PM
munky thanks neon - i'll do that now Sep 21 2008, 10:03 PM
Crawley it tries to boot but i didn't get to login scr... Sep 21 2008, 10:14 PM
dudecuda I boot fine from my USB boot-132, however, using t... Sep 21 2008, 10:30 PM
munky dudecuda: boot with -v and see whats happening. t... Sep 21 2008, 10:31 PM
dudecuda QUOTE (munky @ Sep 21 2008, 05:31 PM) dud... Sep 21 2008, 10:44 PM
munky QUOTE (dudecuda @ Sep 21 2008, 11:44 PM) ... Sep 22 2008, 12:36 AM
jokinawa Mine freezes at the Apple Logo screen also.
Here ... Sep 21 2008, 11:08 PM
BladeRunner QUOTE (jokinawa @ Sep 21 2008, 07:08 PM) ... Sep 21 2008, 11:16 PM
munky GPTEFIBoot is a similar but unrelated project, so ... Sep 21 2008, 11:34 PM
jokinawa I do not think I have the system.kext. I will try... Sep 22 2008, 12:39 AM
roisoft ok, successful install from the retail dvd, update... Sep 22 2008, 12:39 AM
munky yay! first success story.
yes, EFI strings wi... Sep 22 2008, 12:42 AM
BladeRunner QUOTE (munky @ Sep 21 2008, 08:42 PM) yay... Sep 22 2008, 01:32 AM
3D mn Can I use extensions.mkext file with this method ? Sep 22 2008, 12:54 AM
munky 3dman: good question. the answer is.... i dunno, ... Sep 22 2008, 12:55 AM
snackole Try it using nvkush. Sep 22 2008, 01:41 AM
lemon looks like there is some guys having the same resu... Sep 22 2008, 02:01 AM
Big Kahuna EFI strings?!! ahhh heck. lemme remove mi... Sep 22 2008, 01:59 AM
3D mn BTW is there any big difference between EFI string... Sep 22 2008, 02:05 AM
roisoft With Efi strings the system hangs before the GUI, ... Sep 22 2008, 02:28 AM
Big Kahuna no efi strings, still crashing. Sep 22 2008, 03:28 AM
kennyp Who is the Munky......You da Munky!
I works, i... Sep 22 2008, 05:09 AM
munky heh nice one mate.
please can u post the list of ... Sep 22 2008, 10:49 AM
Big Kahuna reinstalling now. will post progress. Sep 22 2008, 11:36 AM
krassi Vassev Hi Munky,
I only have Vista installed on my ... Sep 22 2008, 01:32 PM
kennyp QUOTE (krassi Vassev @ Sep 22 2008, 09:32... Sep 22 2008, 02:42 PM
Harrobbed Hello,
I did try your method on a EP35-DS4 but I ... Sep 22 2008, 02:53 PM
Big Kahuna QUOTE (Harrobbed @ Sep 22 2008, 09:53 AM)... Sep 22 2008, 03:18 PM
kennyp QUOTE (Harrobbed @ Sep 22 2008, 10:53 AM)... Sep 22 2008, 04:11 PM
Harrobbed QUOTE (kennyp @ Sep 22 2008, 06:11 PM) Ch... Sep 23 2008, 11:05 AM
munky harrobbed: if u can still boot with boot-132 then ... Sep 22 2008, 03:29 PM
Nick14 An other success only problem is My mac adress is ... Sep 22 2008, 03:39 PM
OldPoem Working with 10.5.0 Retail Disc. But after install... Sep 22 2008, 04:53 PM
kennyp OK the Asus P5Q is working, this method works grea... Sep 22 2008, 04:54 PM
krassi Vassev Thank you Kennyp for your advice, I'll try it ... Sep 22 2008, 05:21 PM
Crawley Finally works on asus p5b...
I tried last night wi... Sep 22 2008, 05:58 PM
munky LOL nice one Crawley :-) Sep 22 2008, 07:36 PM
shatterhenner hi...
reporting success here with 10.5.4 retail d... Sep 22 2008, 09:22 PM
roisoft QUOTE (shatterhenner @ Sep 22 2008, 11:22... Sep 22 2008, 10:31 PM
BladeRunner QUOTE (shatterhenner @ Sep 22 2008, 05:22... Sep 22 2008, 10:37 PM
Neonkoala Anyone know how to load this from the Vista bootlo... Sep 22 2008, 10:23 PM
Crawley got it working' perfect!
tnx for the aweso... Sep 22 2008, 10:27 PM
munky oldpoem : some people have reported u need to boot... Sep 22 2008, 10:35 PM
munky Hi blade,
What exactly is the problem you're ... Sep 22 2008, 10:59 PM
BladeRunner QUOTE (munky @ Sep 22 2008, 06:59 PM) Hi ... Sep 23 2008, 01:50 AM
DB1 Wicked work guy's - munky, turbo, dense, dfe, ... Sep 22 2008, 11:21 PM
shatterhenner QUOTE (roisoft @ Sep 23 2008, 12:31 AM) o... Sep 22 2008, 11:25 PM
kennyp Anybody know how we might keep an offending kext f... Sep 23 2008, 02:33 AM
BladeRunner QUOTE (kennyp @ Sep 22 2008, 10:33 PM) An... Sep 23 2008, 04:07 AM
kennyp QUOTE (BladeRunner @ Sep 23 2008, 12:07 A... Sep 23 2008, 04:10 AM
B612 Hey, munky.
Congrats for your great job and your t... Sep 23 2008, 08:28 AM
munky b612: please post the exact string you enter at th... Sep 23 2008, 08:51 AM
B612 QUOTE (munky @ Sep 23 2008, 10:51 AM) b61... Sep 23 2008, 09:45 AM
BladeRunner QUOTE (munky @ Sep 23 2008, 04:51 AM) b61... Sep 23 2008, 03:58 PM
jokinawa B612 if you have not tried see if your motherboard... Sep 23 2008, 09:57 AM
B612 QUOTE (jokinawa @ Sep 23 2008, 11:57 AM) ... Sep 23 2008, 09:59 AM
munky afaik two things can cause this:
1) missing chips... Sep 23 2008, 10:05 AM
B612 QUOTE (munky @ Sep 23 2008, 12:05 PM) afa... Sep 23 2008, 10:30 AM
munky the rd= for the DVD and the one for the hard disk ... Sep 23 2008, 11:03 AM
B612 QUOTE (munky @ Sep 23 2008, 01:03 PM) the... Sep 23 2008, 12:34 PM
roisoft Are you using the retail dvd or the MBPro version... Sep 23 2008, 12:56 PM
B612 QUOTE (roisoft @ Sep 23 2008, 02:56 PM) A... Sep 23 2008, 01:03 PM
roisoft You need the retail dvd ... Sep 23 2008, 01:05 PM
munky ok im going to add to the guide: YOU CANNOT USE AN... Sep 23 2008, 01:05 PM
Nick14 you should add this topic http://forum.insanelymac... Sep 23 2008, 02:55 PM
kennyp WoW I discovered a rather large advantage to using... Sep 23 2008, 05:24 PM
munky bladerunner : congrats man, I'm very glad u so... Sep 23 2008, 07:32 PM
Nick14 Cant anyone do a GUI program for this Like PCwiz Sep 23 2008, 07:37 PM
BladeRunner QUOTE (Nick14 @ Sep 23 2008, 03:37 PM) Ca... Sep 23 2008, 07:44 PM
munky don't worry guys, team chameleon is on the cas... Sep 23 2008, 08:35 PM
Big Kahuna QUOTE Maybe there should be a comment or warning a... Sep 23 2008, 08:44 PM
munky repartitioning should do it I think. Sep 23 2008, 09:04 PM
BladeRunner QUOTE (munky @ Sep 23 2008, 05:04 PM) rep... Sep 23 2008, 10:05 PM
BladeRunner Well, I have finished updating my main system driv... Sep 23 2008, 11:51 PM
hrsh Is there an easy way to verify what kext files are... Sep 24 2008, 02:04 AM
BladeRunner I have uploaded a new copy of the boot-132.iso I ... Sep 24 2008, 03:23 AM
Big Kahuna Booted, up and running.
I either had a bad copy o... Sep 24 2008, 04:27 AM
metrognome Hi Guys! This looks great but I'm beginni... Sep 24 2008, 05:33 AM
BladeRunner QUOTE (metrognome @ Sep 24 2008, 01:33 AM... Sep 24 2008, 08:46 AM
munky just to clarify my earlier post, 'Team Chamele... Sep 24 2008, 09:54 AM
wilcok QUOTE (munky @ Sep 24 2008, 11:54 AM) jus... Sep 24 2008, 04:32 PM ![]() |
|
Lo-Fi Version | Time is now: 9th February 2010 - 05:05 PM |