Jump to content
7 posts in this topic

Recommended Posts

I've successfully installed Kalyway 10.5.2 on my hardware (GA-P35-DS3R) board and have everything working.

 

However, I'm trying to install the retail CD using a combination of LTL, karaakeha1 and weaksauce's guides and simply cannot get any script files at all to run in Terminal. Every time I try to run one, I get

 

"/bin/bash^M: bad interpreter: No such file or directory"

 

as an error yet the file obviously does exist as evidenced by the fact that it is shown when I run the "ls" command in the directory it's in and also that I can use "sudo nano post-install.sh" to edit the file and that works.

 

The script (all credit goes to the above authors) is:

 

   #!/bin/bash

  # My destination disk is labeled "Macintosh" - change "Macintosh" to your destination drive
  DESTINATION=OSX

  # Backup incompatible vanilla kexts
  sudo mkdir /Volumes/$DESTINATION/vanilla
  sudo cp -r /Volumes/$DESTINATION/mach_kernel /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/AppleACPIPlatform.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/AppleAHCIPort.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/AppleEFIRuntime.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/AppleIntelCPUPowerManagement.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/AppleSMBIOS.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/AppleHDA.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/IOAHCIFamily.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/IOATAFamily.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/JMicronATA.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/IONetworkingFamily.kext /Volumes/$DESTINATION/vanilla/
  sudo cp -r /Volumes/$DESTINATION/System/Library/Extensions/AppleHWSensor.kext /Volumes/$DESTINATION/vanilla/

  # Remove incompatible vanilla kexts
  sudo rm -r /Volumes/$DESTINATION/System/Library/Extensions/AppleEFIRuntime.kext
  sudo rm -r /Volumes/$DESTINATION/System/Library/Extensions/AppleSMBIOS.kext
  sudo rm -r /Volumes/$DESTINATION/System/Library/Extensions/AppleHDA.kext
  sudo rm -r /Volumes/$DESTINATION/System/Library/Extensions/AppleHWSensor.kext

  # It's usually recommended to remove AppleIntelCPUPowerManagement kext to reduce CPU temperature
  # and prevent "Package 0 didnt get an HPET" error.
  sudo rm -r /Volumes/$DESTINATION/System/Library/Extensions/AppleIntelCPUPowerManagement.kext

  # Install ALC889a, EFI strings for LAN and Audio, and NVinject.kext drivers if you want it, get rid of the # before that line
  # this AppleHDA is already pre-patched for the ALC889a chipset with Targas HDA patcher
  # sudo cp -r kext/ALCinject.kext /Volumes/$DESTINATION/System/Library/Extensions/
  sudo cp -r kext/NVinject.kext /Volumes/$DESTINATION/System/Library/Extensions/
  sudo cp -r kext/AppleHDA.kext /Volumes/$DESTINATION/System/Library/Extensions/
  sudo cp -r kext/com.apple.boot.plist /Volumes/$DESTINATION/Library/Preferences/SystemConfiguration/

  # Install PS/2 and mouse fix
  # sudo cp -r kext/AppleACPIPlatform.kext /Volumes/$DESTINATION/System/Library/Extensions/

  # Alternate sound drivers for ALC889a
  # sudo cp -r kext/Alternates/AppleHDA.kext /Volumes/$DESTINATION/System/Library/Extensions/
  # sudo cp -r kext/Alternates/ALCinject.kext /Volumes/$DESTINATION/System/Library/Extensions/

  # Install HDA patcher, unzip and drag the txt file to the HDA patcher and then reboot
  sudo cp -r kext/HDA.zip /Volumes/$DESTINATION/Applications/

  # Page decryption EFI module - required for vanilla and binary hacked kernels, not required for kernels compiled from sources
  sudo cp -r kext/dsmos.kext /Volumes/$DESTINATION/System/Library/Extensions/

  # PC EFI compatible AppleSMBIOS v.13, secret ingredients 
  sudo cp -r kext/AppleSMBIOS.kext /Volumes/$DESTINATION/System/Library/Extensions/

  # ICH9R ATA drivers - without these kexts internal drivers are displayed as external
  sudo cp -r kext/AppleAHCIPort.kext /Volumes/$DESTINATION/System/Library/Extensions/
  sudo cp -r kext/IOAHCIFamily.kext /Volumes/$DESTINATION/System/Library/Extensions/
  sudo cp -r kext/IOATAFamily.kext /Volumes/$DESTINATION/System/Library/Extensions/

  # Realtek Ethernet driver - you need to set static IP settings - DHCP settings are lost after wake from sleep
  # sudo cp -r kext/Alternates/RealtekR1000.kext /Volumes/$DESTINATION/System/Library/Extensions/
  sudo cp -r kext/JMicronATA.kext /Volumes/$DESTINATION/System/Library/Extensions/
  # sudo cp -r kext/ApplePS2Controller.kext /Volumes/$DESTINATION/System/Library/Extensions/
  # sudo cp -r kext/IOBluetoothFamily.kext /Volumes/$DESTINATION/System/Library/Extensions/
  # sudo cp -r kext/IOBluetoothHIDDriver.kext /Volumes/$DESTINATION/System/Library/Extensions/

  # Install Netkas speedstep and reboot kernel
  sudo cp -r kext/mach_kernel /Volumes/$DESTINATION/

  # Remove kext cache (if any)
  sudo rm -r /Volumes/$DESTINATION/System/Library/Extensions.mkext

  # Repair permissions - recommended but not required
  sudo diskutil repairpermissions /Volumes/$DESTINATION/

 

All commands work when I manually type them in but I get the error if I try typing "./post-install.sh" or even dragging and dropping the script file in the Terminal window.

 

I've also tried making my own script via Textedit

 

   #!/bin/sh
  echo "Hello world!"

 

saved as Test.sh

 

run in Terminal with:

 

"chmod +x Test.sh"

"./Test.sh"

 

and this works fine. Yet when I copy and paste the actual script into Textedit and make a brand new script (rather than the downloaded and edited one) it still doesn't work.

 

Any help would be appreciated.

 

Thanks in advance.

Thanks but I think there must be some problem with my install because that doesn't work either.

 

I still get the same error even though the chmod command works just fine.

 

The script just doesn't want to work. I don't understand why it says that there is "no such file or directory"...

You have DOS linebreaks embedded in that shell script. You can open a terminal and do this :

 

sed 's/^M//g' post-install.sh post-install-new.sh
chmod 755 post-install-new.sh
./post-install-new.sh

 

That ^M character is created by hitting "control-V control-M" in the terminal. It should appear in blue (depending on if you've customized your terminal colors)

Thanks Darshu_

 

I will try that later when I get back home.

 

Can I ask where the DOS linebreaks are? I downloaded that script and modified it slightly with some extra kexts (with Wordpad in Vista) but no one else seems to be having any issues with the originals from the authors I mentioned.

Well, I finally got to try the command today and it still gave me a "file not found error".

 

Thanks for the help but I gave up and typed everything out in Text Editor in OS X and it worked fine (minus the typos in my script that I had to correct).

  • 2 months later...

Hi Jumbie,

I am not really familiar with the post-install.sh script, but I realized that especially in the section

 

Install ALC889a, EFI strings for LAN and Audio, ...

 

the cp command is using relative paths.

 

So you have to run the script from its orignal location or otherwise provide absolute paths to the kext folder.

Greetings

macyogi

×
×
  • Create New...