Jump to content

[UPDATED] Best Post-Patch... EFI vX, Fdisk, Boot Sector, Vanilla + hacked Kernel + Kexts and Boot.plist edits


sortadan
 Share

96 posts in this topic

Recommended Posts

Current Version: v0.1 (NOT FOR GUID, next version... just use MBR, it's better any how)

 

So I wrote a unified post-patch script that does it all... This works with BrazilMac and ToH 10.5 install disks and does everything that other post patchers do and more.

 

It's a solid script and should be used as a basis for all to follow.

 

It prompts the user with what they want to do and gives them the information needed to make the right decision.

 

It installs the vanilla or toh kernel (or not, your choice)

It installs vanilla kexts that toh and brazilmac change (or not, your choice)

It installs needed hacked kexts in a sub folder from the script (or not, your choice)

It sets the screen res and timeout in com.apple.Boot.plist (or not, your choice)

It installs EFI v8, and sets partition as bootable (or not, your choice)

BadAXE2 ppl see this post: http://forum.insanelymac.com/index.php?s=&...st&p=540772

 

I have comments in the script, and it should be easy to modify and work with new EFI versions as they become available.

 

Please let me know what you all think:

http://rapidshare.com/files/76393313/Combined_Post_Patch_v0.1.rar [uPDATED]

 

As ever, if you get to the darwin boot loader and are having trouble booting, next time you boot hit F8 when darwin is doing it's countdown and enter "-v" or "-s -v" as kernel flags and hopefully you'll see some red text eventually that says what's going wrong... I'll try to help people when I know enough to help and when I have the time, but IRC or a question to everyone in the Forums here is really where you want to go if you want help debugging your problems...

 

NOTE: I know I don't have AMD support right now. If someone could post a link to a script or the command line stuff for AMD post patching that would be hot. I'd like to integrate it in for the next version.

 

-Dan.

 

PS: This is a cool little tool - http://hem.bredband.net/catacombae/hfsx.html does anyone know of a tool that will allow windows to actually edit files in an HFS+ partition?

 

 

[uPDATES]

2007-12-13 -- The first patch had some stupid typos from a bit of last minute cleanup I did just before posting. I've cleaned it up (correctly this time :-), and did a full test with the updated script and it worked flawlessly for me. My bad to frustrated people that downloaded yesterday...

 

2007-12-14 -- it looks like my script does NOT work with GUID partitioning. I had not used this and not tested it as you can't use Windows with GUID and really I think people should just use MBR, but if you are set on GUID here's the steps (I'll try to add this to the script and auto-detect GUID for the next version if I can)

'b0 error' GUID partition fix (posted by X2K86):

diskXsY (disk0s2 is X=0, Y=2)

diskutil unmount diskX
diskutil unmount diskXs1
diskutil unmount diskXs2
diskutil unmount diskXs3
diskutil unmount diskXs4
echo "u\nf Y\nw\nq\n" | fdisk -e /dev/rdiskX 
diskutil unmount diskXs2
diskutil unmount diskXs3
diskutil unmount diskXs4
cd /Volumes/FLASH_DISK/files/boot
./startupfiletool /dev/rdiskXsY ./boot_v8
dd if=./guid/boot1h of=/dev/rdiskXsY bs=512 count=1
dd if=./guid/boot0 of=/dev/diskX bs=400 count=1

[/uPDATES]

Link to comment
Share on other sites

Very nice post install script. I've taken a look through the code and it seems to do things the right way.

 

I would recommend replacing bless 24 with fdisk -e and set the partition active though. Using cat <<EOF command, you can pipe the commands into fdisk and flag the partitions correctly. If need be you can also use the update command to put down the microcode for the MBR. Its a safer way than doing it with dd even though you have done it correctly. Your 2nd bless command is not needed. Thats only for EFI systems.

 

May I also ask why you used the diskfind command rather than just extract the information yourself?

 

I'm also unsure why we need to disable ossmgr? In my own experiments i've seen no cases where we need to do that.

 

If you want to discuss more technical aspects you should contact me on irc.osx86.hu. My own work involves what you have done and a lot more. Good to see others trying to improve the patching systems.

Link to comment
Share on other sites

I'm having problems running the script. During the portion that asks "Would you like to continue with seting the disk boot information?" I select Y and I get the following:

Setting boot info for Leopard...
./patch.sh: line 180: print: command not found
grep: sed: No such file or directory
grep: s/.*NTFS.*/true/: No such file or directory
grep: sed No such file or directory
grep: s/.*FAT.*/true/: No such file or directory
./patch.sh: line 207: syntax error near unexpected token `else'
./patch.sh: line 207: ` else'
-bash-3.2#

 

is the script terminating abnormally? Anything I can do to fix this?

My config:

Brazilmac_PatchedDVD.ISO off byrate day

Intel E6300

ASUS P5K-E WIFI AP (J-micron controller disabled, SATA mode AHCI)

2x1GB Crucial Ballistix PC6400

250 GB Hitachi Deskstar SATA2

Lite-On DVD-RW (USB hookup)

 

Thanks for your help!

Link to comment
Share on other sites

Line 180 has print. It needs to be changed to printf.

 

The two lines under

 

HAS_NTFS=`diskutil list /dev/$DISK 2>/dev/null | grep -m 1 "NTFS" sed 's/.*NTFS.*/true/'`
HAS_FAT=`diskutil list /dev/$DISK 2>/dev/null | grep -m 1 "FAT" sed 's/.*FAT.*/true/'`

 

Need to be changed to:

 

HAS_NTFS=`diskutil list /dev/$DISK 2>/dev/null | grep -m 1 "NTFS" | sed 's/.*NTFS.*/true/'`
HAS_FAT=`diskutil list /dev/$DISK 2>/dev/null | grep -m 1 "FAT" | sed 's/.*FAT.*/true/'`

 

They are messing the | between NTFS and sed and FAT and sed.

 

The error on line 207 is caused by an extra else statement. Not the correct way to handle things as there is already an else used above it. Needs a slight code fix that i'll leave for Dan to fix.

Link to comment
Share on other sites

Nothing like being a beta tester ;)

 

Thanks Dan for all your hard work, will try with those revisions and see if I'm at least able to get somewhere. Thanks Dense for your code revisions!

 

EDIT: Update: I fixed the above errors, and the area with the nested else, I simply deleted the 2nd else statement as it was merely a printf command, however I now get the following:

 

Setting boot info for Leopard...


./patch.sh: line 335: syntax error: unexpected end of file

and back to the prompt. Any other ideas?

Link to comment
Share on other sites

So I wrote a unified post-patch script that does it all... This works with BrazilMac and ToH 10.5 install disks and does everything that other post patchers do and more.

 

It's a solid script and should be used as a basis for all to follow.

 

It prompts the user with what they want to do and gives them the information needed to make the right decision.

 

It installs the vanilla or toh kernel (or not, your choice)

It installs vanilla kexts that toh and brazilmac change (or not, your choice)

It installs needed hacked kexts in a sub folder from the script (or not, your choice)

It sets the screen res and timeout in com.apple.Boot.plist (or not, your choice)

It installs EFI v8, and sets partition as bootable (or not, your choice)

 

I have comments in the script, and it should be easy to modify and work with new EFI versions as they become available.

 

Please let me know what you all think:

http://rapidshare.com/files/76072783/Combined_Post_Patch.rar

 

NOTE: I know I don't have AMD kernel support. I don't know what the post install is for you guys. If it's as easy as editing a few files and copying over a kernel I could easily add that to the script. If someone who knows the best AMD guide wants to let me know that'd be cool.

 

-dan.

 

Before this patch, I was always stuck in grey apple logo screen...just didn't boot.

But this patch got me one step further.

Now, I pass the grey apple screen and move into blue screen. However, I am now stuck in this blue screen with no mouse curser...

 

so, I tried to find a solution and someone suggested...

 

Open the "Terminal"

# rm -f /Volumes/LEOName/System/Library/Extensions/AppleIntelIntegratedFrameBuffer.kext/AppleIntelIntegratedFramebuffer

# cp -R /Volumes/USBName/AppleIntelIntegratedFrameBuffer /Volumes/LEOName/System/Library/Extensions/AppleIntelIntegratedFrameBuffer.kext/

# rm -f /Volumes/LEOName/System/Library/Extensions.mkext

# reboot

 

But, it doesn't work..

under this following command,

 

# cp -R /Volumes/USBName/AppleIntelIntegratedFrameBuffer /Volumes/LEOName/System/Library/Extensions/AppleIntelIntegratedFrameBuffer.kext/

 

is "~~~/AppleIntelIntegratedFrameBuffer.kext/" a folder?

so I am copying a AppleIntelIntegratedFrameBuffer file from my usb key to Extention folder? or /AppleIntelIntegratedFrameBuffer.kext/ folder?

 

I just copied the file into the Extentions folder..

Am I doing something wrong?

 

Anyone know how to fix this blue screen problem?

 

I really hope someone fix this script so that we can go through the entire script..

Link to comment
Share on other sites

Dense: thanks again for troubleshooting a script that isn't yours!

 

I made the suggested edits, will try this evening when I'm out of work.

 

No problem. Easy stuff for me anyway and give me something to do while waiting for my own script to finish running :)

Link to comment
Share on other sites

YOU ARE THE MAN!!!!

 

With a small adaption to suit me, this is the BEST system patching so far!!!!! on my Dell Dimension 9200(XPS410), I made my HDD GUID, EFI and only patched the your patch. EVERYTHING WORKS!! I loaded my wireless WORKED, I loaded my Audio Sigmatel 9227 WORKED! I lost powerdown & sleep, an AppleHDA problem but NOTHING else needed to be patched!!

 

SticMAN

 

EDITED: I might have stumbled onto something....... I was watching the shutdown, where everything shuts down but the power doesnt go off!? Well i saw my wireless usb link light was still on so i ripped it out of the USB port and VIOLA, my PC shut down completely! I've since then tried 5 times removing the USB wireless before shutting down and the system shuts down!

 

 

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

 

Link to comment
Share on other sites

YOU ARE THE MAN!!!!

 

With a small adaption to suit me, this is the BEST system patching so far!!!!! on my Dell Dimension 9200(XPS410), I made my HDD GUID, EFI and only patched the your patch. EVERYTHING WORKS!! I loaded my wireless WORKED, I loaded my Audio Sigmatel 9227 WORKED! I lost powerdown & sleep, an AppleHDA problem but NOTHING else needed to be patched!!

 

SticMAN

 

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

YOU ARE THE MAN!!!!

 

Hey SticMAN - what did you change? I've got an XPS 410 with a base install of ToH: plain video, no sound, ICH8R turned off, etc. Care to post details of what you did?

Link to comment
Share on other sites

Dense, quick note, even with fi planted on line 188, still throws syntax error: line 336: unexpected end of file, so no dice :D

 

I'd (and I'm sure plenty others!) appreciate if someone could post the working version, Thanks in advance!

Link to comment
Share on other sites

Very nice post install script. I've taken a look through the code and it seems to do things the right way.I would recommend replacing bless 24 with fdisk -e and set the partition active though. Using cat <<EOF command, you can pipe the commands into fdisk and flag the partitions correctly. If need be you can also use the update command to put down the microcode for the MBR. Its a safer way than doing it with dd even though you have done it correctly. Your 2nd bless command is not needed. Thats only for EFI systems.May I also ask why you used the diskfind command rather than just extract the information yourself?I'm also unsure why we need to disable ossmgr? In my own experiments i've seen no cases where we need to do that.If you want to discuss more technical aspects you should contact me on irc.osx86.hu. My own work involves what you have done and a lot more. Good to see others trying to improve the patching systems.
Thanks for the info. I'll kill the second bless for the next release (beyond the v0.1 that I just put up with the stupid typos fixed). I just had it in there from the ToH post patch and was never too sure why it was needed but just left it in as an option...I'm a little confused with what you are saying about the bless 24 command, could you give an exact example? right now i do:

$BOOT_PATH/bless24 -device /dev/$PART -setBoot -verbose

then mount the partition again and it's worked well for me... how exactly would you do it with fdisk? on line 232 of the script i set the partition with fdisk, but the problem I've had with this is that it totally blows up my windows partition.Thanks!

 

 

 

THANX for sharing I will try this out.
be sure to snag the updated version linked in the main post if you already downloaded when writing this post...

 

 

 

Besides universal Kernel in 32 bit mode, just add Decrypted binaries and apply the cpuid script to remove the intel check and It's done for amd
do you know of any script that's out there that i can just integrate in (or step by step command line)? if you can link to it that would be cool. I'm kinda lazy about amd as i have intel and it's not really my deal, but I'm happy to add it in if it's easy...

 

 

 

I'm having problems running the script. During the portion that asks "Would you like to continue with seting the disk boot information?" I select Y and I get the following:
Setting boot info for Leopard..../patch.sh: line 180: print: command not foundgrep: sed: No such file or directorygrep: s/.*NTFS.*/true/: No such file or directorygrep: sed No such file or directorygrep: s/.*FAT.*/true/: No such file or directory./patch.sh: line 207: syntax error near unexpected token `else'./patch.sh: line 207: ` else'-bash-3.2#

is the script terminating abnormally? Anything I can do to fix this?My config:Brazilmac_PatchedDVD.ISO off byrate dayIntel E6300ASUS P5K-E WIFI AP (J-micron controller disabled, SATA mode AHCI)2x1GB Crucial Ballistix PC6400250 GB Hitachi Deskstar SATA2Lite-On DVD-RW (USB hookup)Thanks for your help!

Yeah, sorry about that, the first script i put up was week-sauce... I've put up a new one that's the hotness... i hope it works for you now...

 

 

 

YOU ARE THE MAN!!!! With a small adaption to suit me, this is the BEST system patching so far!!!!! on my Dell Dimension 9200(XPS410), I made my HDD GUID, EFI and only patched the your patch. EVERYTHING WORKS!! I loaded my wireless WORKED, I loaded my Audio Sigmatel 9227 WORKED!I lost powerdown & sleep, an AppleHDA problem but NOTHING else needed to be patched!! SticMAN
Nice :-) I shared this because I had to spend a good amount of time figuring a bunch of stuff out and I felt that others shouldn't have to. I'm happy to see it worked for you and hopefully other people will have a better time of installing in general with this new post-patching script.

 

 

 

Hey man, we appreciate your work, but there's like 3 or 4 unclosed if statements in here that break it. Want me to post the fixed version?
yeah, sorry about that, i posted a fixed version v0.1.
Link to comment
Share on other sites

Thank for all this work...

 

Very nice patch...

 

But I still have a problem.. Not the updated patch runs through without any error. So I typed reboot and then took out the installation disk.

 

But the booting is stuck at the blue screen without a mouse curser...

 

I am using sony sz-240 notebook which has Intel945 chipset, integrated intel video..

CPU is core duo 2.0 (NOT core2duo)..

 

Anyone knows how to solve this problem?

 

Thanks~

Link to comment
Share on other sites

 Share

×
×
  • Create New...