Sophus Posted January 6, 2008 Share Posted January 6, 2008 Requirements: 1. One USB stick with at least 8Gb 2. EFI version 8 emulation files 3. BrazilMac patches. 4. Patched DVD image of Leopard(converted to dmg, can't use iso) 5. Leopard or Tiger system installed Steps to make the USB stick bootable. 1. Open Disk Utility and repartition the USB stick with at least one(1) partition as HFS(MAC default) and 4.5Gb of space. 2. Restore the .dmg image of installation DVD to USB stick partition you just created(to partition not to disk!). After finished umount the USB partition. 3. Update MBR of usb disk. This can be done with "fdisk -u /dev/diskX" (where X is the disk number of USB stick). This requires the valid MBR boot block to be present on your Leopard/Tiger system(/usr/standalone/i386/boot0); you can copy it from original installation DVD if it's missing. This step will install the MBR and merge with your existing partition. 4. Make sure that the partion on USB stick is umounted then make this partition bootable by using "fdisk -e /dev/rdiskX" the enter "f Y" where Y is the partion number(usually 1 if you created 1 partion on USB stick). Then quit fdisk and confirm that you want to update. 5. Next step is to install the first stage bootloader(this will search for the actual bootloader when executed at boot time). To do this you have to umount the USB partition(again) and dd the first stage bootloader to start of first partition(not the disk! itself) like this "dd if=/usr/standalone/i386/boot1h of=/dev/rdiskXsY bs=512 count=1" where rdiskXsY is the first partition on the USB stick. Again you need boot1h in the right place(you can find it on the original installation DVD as well). 6. After you did all this it's time to install the actual bootloader. Here you need to use the tools from EFI emulation version 8(this worked for me). You cd to the dir where extracted the EFI files and you issue the following command "./startupfiletool -v /dev/rdiskXsY ./boot_v8". This will link the emulated EFI bootloader inside the USB install partition. Again make sure that the USB partition is unmounted before issuing this command. 7. Bless the installation partition with "./bless -device /dev/diskXsY -setBoot -verbose". You can find this bless utility in the BrazilMac patches(in bootfix dir). 9. Last step is to remove the AppleEFIRuntime(this caused a crash on my system but it might work for you). To do this cd to System/Library/Extenstions on the USB partition and rename the AppleEFIRuntime.kext to AppleEFIRuntime.kext.vanilla. This will prevent to be loaded by the kernel. 10. Read the notes bellow if it does not work for you. NOTE: If the boot process stops after loading the kexts when you boot from USB you need to rebuild the cache extensions from /Volumes/<USB Stick Partition>/System/Library/Extenstions.mkext or remove it. You do this with the following command: "kextcache -a i386 -z -v 6 -c /Volumes/<USB Stick Partition>/mach_kernel -m /Volumes/<USB Stick Partition>/System/Library/Extensions.mkext /Volumes/<USB Stick partition>/System/Library/Extensions" I found out that if I delete the Extenstions.mkext when the stick partition is mounted the kextd will start rebuilding the caches automatically to your current Leopard/Tiger system and mess up everything. So one solution is to rebuild the caches as specified above or to delete the caches; sync and umount -f in one command so that the daemon will not have time to start building the caches; like this: "rm /Volumes/<USB Stick Partition>/System/Library/Extensions.mkext;sync;umount -f /Volumes/<USB Stick Partition>" This is all you need to do to have an installation USB stick for Leopard. You still need to apply the patches after you install from USB stick. Booting from USB is much more faster then any DVD. TODO: Find a way to make the partition ro so that when you insert the stick in a live system will not start rebuilding the caches. Cheers, Sophus Link to comment Share on other sites More sharing options...
Recommended Posts