Monday, February 25, 2008

Darwin Boot Options

when you boot your hackintosh you can press "F8" before you see the gray apple boot screen.





then you should see a menu with all the partitions you have, at this time you may choose between the partitions using up/down arrows (it defines what partition to load from).

another thing you can do at this boot prompt is to specify boot options.
note that the last line says: "boot:" this is your prompt, you may write one of the next options:

[Kernel Name]

[Kernel Flags]

[Boot Flags]
  -s
  -v
  -f
  -x

[Parameters]
  cpus=
  "Graphics Mode"=
  rd=
  config=
  platform=
  idlehalt=
  legacy

[Info]
  ?memory
  ?video

[UnKnown flags]
  debug=0x144


Kernel Name this boot option state what kernel to use in order to load the system, for instance you may use mach_kernel or any other kernel you downloaded and want to try (new EFI supporting kernel or new version of kernel), the kernel must be in folder "/"

Kernel Flags you can enter kernel flags that should be used during this boot time, kernel flags examples: debug=0x144 io=0xffffffff (not so sure what these guys do, but read more on kernel)

-s mean you would like to enter "Single User" mode which doesn't load GUI and doesn't mount partitions but gives you a prompt so you can make system maintenance and recovery procedures.

-v loads the system in Verbose mode which display allot of log lines during boot time and does not display the apple gray boot screen, it is good to use this option if things go wrong, or if you get an error screen and you want to know the reason.



-f tells the hackintosh to reload all kext (Kernel Extensions = drivers) and dump the cache, not rely on it (kext cache found in: /System/Library/Extensions.mkext, you can delete it manually and the system will recreate it)

the kext cache is built of the necessary kext that needs to be loaded and it will be created whenever it does not exist.
you can use a command line utility (from terminal) named: "mkextunpack" to extract the content and see what kext are cached for example the command:

mkextunpack -d /111 /System/Library/Extensions.mkext

will extract the content to a folder (that must exist before runing this command) /111
you can also use the command line utility "kextcache" to create or update kextcache.

-x this option boot the system into safe mode ignoring kext cache and loads only necessary kext

cpus= this parameter tells the hackintosh how many cpus to use, for instance if you have dual CPU or dual Core then you can state cpus=2, so the system will use both cpus, and if you get reboot without loading GUI or boot screen then you may use cpus=1 to allow use of one cpu and avoid reboot

"Graphics Mode"= this parameter tells the hackintosh to use stated graphics resolution and color depth, the pattern to use is: WidthxHeightxDepth@RefreshRate for instance a resolution of 640x480 with 32 bit color depth and 60 hertz frequancy refresh rate will look like this:

"Graphics Mode"="640x480x32@60"
 
rd= this parameter state what is the boot disk to use (instead of using the boot menu appearing before the prompt) you state the drive and partition in the pattern: diskXsY where X stands for the disk number (first disk (usually primary master in IDE) 0 second disk is 1 etc.) and Y stands for the partition on that disk starting with 1 as the first partition, so if you have one disk and one partition the parameter will look like this: rd=disk0s1

config= this parameter tells the system to load using different copy of the boot config file, the default copy used is kept in:

/Library/Preferences/SystemConfiguration/com.apple.Boot.plist

the content of this file state boot options such as:
timeout (how much time to wait for user selection in boot prompt)
kernel (what kernel to use)
kernel flags (what kernel flags to use in each and every boot)
quiet boot (weather to display boot menu or not)
boot graphics (if to boot with apple spinning circle)
etc.

platform= this parameter sets the platform to use at this boot time, you may use:
platform=ACPI (ACPI support)
platform=X86PC (non ACPI support)
platform=ACPI|86PC (try to support ACPI if fails do not support it)

idlehalt gets two values ether 1 or 0 stating true or false, if set to true then at idle time the cpu will halt causing power saving and cooling of CPU, if set to 0 then the cpu will allways run even in idle time.
idlehalt=0
idlehalt=1

-legacy causes the system to load in 32 bit mode while running on 64 bit systems

?memory this info screen display information about the memory on the machine

?video this info screen display information about the video card supported graphic modes

Enjoy

Saturday, February 23, 2008

Text to Speech in Mac OS X

MAC OS X Leopard includes built-in Text-To-Speech engine, it allows the mac to talk back to you any written text.


in order to activate it and custom it follow these next steps:

1. got to system preferences.


2. next choose "Speech" icon


3. select "Text to Speech" tab


4. select the System Voice you want (probably Vicki works nice)


5. next select the reading speed (slow it down just a bit from normal and it will be clear reading)


6. next mark the checkbox "Speak selected text when key is pressed"


7. lastly a popup of key combination will appear (if not then press the "Set Key..." button)


8. select the text field and press your preferred key combination to start/stop reading (i use Command+Option+V)


9. to test it go to some text, select it and press your key combination to start reading, press it again to stop reading or wait until it will finish.


Text to Speech - iSpeak (Widget)



if you are like me (read a lot of material on the web, yet lazy),
you will want someone to read to you while laying your head on a pillow,
that would certainly make reading a lot easier.

well head on the pillow is still more complicated to achieve,
but the reading part is already available (but not perfect yet, since you cant hear music at the same time).

iSpeak is a cool small free utility packed as a widget for your dashboard,
you can paste or write text into it and press speak and it will start reading to you,
there are several voices but the default is just fine (vicki).
rest of the voices are not installed on my hackintosh system (iAtkos needed to save space) but you can download or purchase other voices from the web (links up ahead).



Demo and purchase voices:


the system voices are kept in folder:

/System/Library/Speech/Voices/

you can remove voices folders to save space (but leave vicki for system stability)
please read also my next post: "Text to Speech in Mac OS x"

if you have removed voices or don't have Vicki or Fred, then here are links to download freely, just copy the content with administrator privileges to the folder mentioned before.


by the way, a great news reader that uses this text-to-speech technology on the web is: Pimp My News, it is a news reader that can read them to you, you can also download the news as a separated files or playlist to your iphone or ipod.

Enjoy.

Saturday, February 16, 2008

New File from context menu (tweak series)

another feature that is absent (i don't really need it) from mac but exist in windows is the right-click "New some_file_type..." 

for instnce "New Text File", 
well come to think of it thats about it! i never used the other file types, pictures? there are too many types to put there and i always used photoshop/msPaint etc in order to create one and even if i did create one i then go right away and open the application that edit them so what is the use? the same goes to word, power point and excel what ever.

so for the sake of argument lets assume we want the new txt file ability, so there is another add on utility that adds it self to the context menu More sub menu and allow create new document types from templates and it allows you to add templates and types of your own, and edit the one that exists, its really good and quite simple (as most good things are) it only copy the template to the place you clicked.

it is called "Nufile" it can be downloaded from here.
the installation is simple (next next next, or as mac version: continue, continue, continue)
and the result looks like this:


Enjoy.

Hidden Minimize effect (tweak series)

there is a hidden minimize effect on the dock it is named 'Suck' (maybe that is why it didn't got to production) in order to activate it open terminal and write:


defaults write com.apple.dock mineffect -string suck
killall Dock

here is a video in slow motion displaying that effect:


video

in order to restore to "GINI" effect simply write these commands in the terminal:

defaults write com.apple.dock mineffect -string gini
killall Dock

Add Cut to Finder (tweak series)

the most absent feature in mac is the right click->cut (on files and folders),

i wonder who is the jerk in apple that is keeping us from getting this feature,

PathFinder is a good replacement for Finder and it has cut feature,
but it lacks several features that the new Finder in leopard has, for instance Cover-Flow, quick look etc.

1. open terminal and write this line: 
defaults write com.apple.finder AllowCutForItems 1

2. restart Finder, in terminal write: 
killall Finder
or 
right click dock finder icon with option button pressed (Alt/WinKey in hackintosh) and choose "relaunch"

to undo this simply execute the same lines only this time replace the value 1 with 0 like this:
defaults write com.apple.finder AllowCutForItems 0
killall Finder





but when you try it you find its just another "move to trash" menu item, well that didn't help,

that was when i decided to download the add on to context menu FileCutter

it gives you the option to cut paste, move to... etc. but the annoying part is that it is a sub menu inside a sub menu, in leopard all add ons to context menu is added to the More sub Menu, and file cutter is a sub menu in its own, so in order to cut you go 3 levels deep - yuc! i wish there was a way to add cut directly to the context menu next to copy feature without any mess



but it works :-)
try to Enjoy.

Friday, February 15, 2008

How to Update Hackintosh 10.5.1 to 10.5.2 (how-to series)

when you install your hackintosh you get a leopard OS X of a certain version i got mine from uphack iAtkos 10.5.1 yours might be different, check what version you have using the "About" dialog (from the menu bar apple press "About this Mac")


once you know what version you have, and if you have PC_EFI installed (EFI emulation, read here on how to check).


lets look at the 10 steps:

1. first download the update from apple at this address. (DO NOT use Software Update it will not work!!)




2. backup your /System/Library/Extensions folder just in case restore is needed (i didn't need any restore)




3. open terminal and write these commands:

sudo -s

enter your password and press enter

while sleep 1 ; do rm -rf /System/Library/Extensions/AppleIntelCPUPowerManagement.kext ; done

(this line should not return to prompt since this is a loop script)


it will check every 1 second if a file named: "AppleIntelCPUPowermanagement.kext " is found in the extension folder and when it appears it will delete it, the script will run and not return to prompt (do not kill/close it yet), if you wish to verify it is working, create new folder and rename it to: "AppleIntelCPUPowermanagement.kext " and then copy it to /System/Library/Extensions, it should be immediately deleted



4. install the downloaded package and let it finish




5. when the install end DO NOT press restart yet!




6. now stop the script by pressing control and C (ctrl+C)




7. next you need to edit the apple restart script that checks if this is a hackintosh and decides if to start the system or display and error screen, you will tell the system to load directly to leopard, do this by:

cd /System/InstallAtStartup/scripts

and edit the script named '1'

vi 1




8. now the console will display the content of the file, using arrows scroll down to the end there you will find a line like this near the end:

kextload /System/Library/Extensions/Dont Steal Mac OS X.kext

press I (stands for insert) to enter edit mode




9. delete the value:

/System/Library/Extensions/Dont Steal Mac OS X.kext

and replace it with this value:

/System/Library/Extensions/dsmos.kext

press Esc to exit edit mode and press : to enter vi prompt and then write !w (stands for write changes to disk even if file is read only) and press enter, after that press : and write q (stands for quit) and by that you exit the vi.




10. now if you see any changed kext (in the /System/Library/Extensions folder, you can sort by date and see the latest from the update), if you want to change them back to your kext then you may restore them from previous backup step and finally press the Restart button on the install screen.


after restart it will boot to boot screen and perform another restart (without loading the leopard GUI), then it will boot into the blue screen (before login window) and will stay there for 3-4 minutes then the login window will appear and now you have 10.5.2 installed.


check the about dialog should look similar to this:



you should be also seeing the 10.5.2 trademark feature in the stacks (list view):






you can find fix and fatures list for this version here, and original Netkas post here.

Enjoy

Check if you have EFI installed (how-to series)


hackintosh comes in two flavors of install types: one with EFI emulation (A.K.A PC_EFI) and another without,


EFI is intel "Extensible Firmware Interface", it is an interface that abstract the hardware from the software, so no matter what hardware the OS is running on it will always "talk" to the hardware in the same manner and it wont have to find out on what intel configuration it reside on.

EFI supply the OS with services that until today only BIOS would supply (IO,IRQ,rates on board, access to memory, machine clock etc.)  it conform to the firmware on the EFI module residing on the board and have part in the boot process and kext (drivers) loading process, see more detail here and here.

real mac install EFI files (that support intel EFI firmware) in the folder: 

/System/Library/CoreServices/boot.efi

and another copy in folder:

/usr/standalone/i386/boot.efi

your hackintosh will not have the first file installed, the second might be in the path (but not in use), since we don't have the supporting hardware and firmware version to support this spec in our PC then there is a workaround (a hack) that was made by Netkas and its idea is to mimic the EFI abilities,

the EFI retain a table of data parts and when the OS request a data part or to store a data part the PC_EFI return the proper response. this way the leopard/tiger thinks they are installed on a Mac and allow correct behavior including updates.

there are 3 ways to find out if you have an EFI emulation:

1. if during install you went to a "Darwin Boot" menu and specified to install PC_EFI in the console window,  then you got PC_EFI emulation,
the PC_EFI install screen look like this:





2. another way to find out: is if you made a successful update using the menu bar apple -> "Software Update", if so then you you have EFI emulation installed, although i was talled that there might me some installations that can update without EFI.

3. last and the safest way is to write in the terminal the command:

sudo ioreg -l -w0 -p IODeviceTree | grep efi

and make sure you are getting this as an output:

    +-o efi  
    | |   "name" = <"efi">

b.t.w if you don't have PC_EFI installed you can install it, please refer to this post.

Change About Dialog (Tweak series)


found a way to change the about dialog, while digging this whole pkg install and uninstall thing, you can learn a lot from it about the way the system is built and how to tweak it.


so, the about dialog found in the login window application folder at:
/System/Library/CoreServices/loginwindow.app/Contents/Resources/MacOSX.tif

the way application/kext/bundle/pkg etc. is built in mac OS X is actually a folder displayed as a file with icon and double click abilities etc. but if you go to terminal you can cd into it, also from Finder you can right click it and choose "Show Package Contents" and a new Finder window will open containing that folders content, every folder usually have the format of single folder ("Content") that contains parameters and config files such as Version.plist and Info.plist and a folder "Resources" that as its name contains the resources of the package or application etc. there you may find images sounds video strings windows and dialog definitions and you can change them (copy them to a different location edit them save them replace them with the backedup original and fix permission and ownership).

lets do this on the About dialog that has an image named MacOSX.tif mine displays iAtkos logo and i want it to look more like a mac so i edited it in photoshop and saved it,
before change it looked like this:



and now it looks like this:



now i am searching for the strings turk team 10.5.1 etc. when i will change it i will update this post, - i dont need it anymore, after updating to 10.5.2 (see next post) my about dialog looks like this:



thats it, if you need a better details on how to copy, move change ownership etc. you can reference this post.
Enjoy.

Thursday, February 14, 2008

Change Leopard Login Screen (Tweak Series)


the login screen background is found here:


/System/Library/CoreServices

and can be replaced using any jpg image you find on the web, do this:
1. open terminal cd to that folder ("cd /System/Library/CoreServices")
2. write: "sudo mv DefaultDesktop.jpg DefaultDesktop.orig.jpg"
3. enter your password and press enter
4. copy some jpg you downloaded from the internet to that folder using Finder
5. rename the image using terminal to the name: "DefaultDesktop.jpg"
6. chmod 644 DefaultDesktop.jpg
7. chown 0:0 DefaultDesktop.jpg
8. logout or reboot

Leopard Welcome Video location


while learning all there is to know on packages i found the location of the Leopard install welcome video and sound found at:

/System/Library/CoreServices/Setup\ Assistant.app/Contents/Resources/TransitionSection.bundle/Contents/Resources/intro.mov

/System/Library/CoreServices/Setup\ Assistant.app/Contents/Resources/TransitionSection.bundle/Contents/Resources/intro-sound.mp3

here they are:



Enjoy.

Wednesday, February 13, 2008

Bluetooth problem (after boot icon disabled) - solution inside

there is yet another problem with hackintosh and bluetooth (at least one i experience), the symptoms are: when you finished booting the bluetooth icon in the icon bar is disabled


enabled icon looks like this:

disabled icon looks like this (but this is a good disabled (initiated by user and can be reversed) 


another one that display an X in the middle of the icon to indicate the bluetooth could not be started there it is:


so if you are experiencing such error then it comes with a side effect:
the cpu is at 100% all the time since the bluetooth demon keep on trying to initiate it and it fails (so its kind of an infinite loop that will never end due to bluetooth crashes).

to validate if your CPU is 100% or not you may see it in the icon bar as well it looks like this:

you may have a different set of icons and if the percentage is showing something else (like memory or network IO) or not displayed at all then: 
goto System Preferences...,


at the "other" section click on Menu Meters


at the CPU tab select the checkbox that say "Display CPU Menu Meter"



and thats it, if you do not have the Menu Meter option at all you may download it from here and install it.

lets move on:

if the CPU is really in the 100% zone (or near it) then it means you suffer from bluetooth (or any other hardware) crash and retry effect, next we need to find out if it indeed crash or something else is causing the 100% (for instance another hardware process crash - not bluetooth), for this we need to open the system console (that is the GUI that allows you to see all mac logs) to open it use one of these methods:

1. open Finder, Goto Application, there you will see a folder named Utilities, and in it the icon for Console (Double click it)


2. click the CPU Meter icon and choose the "Open Console" option



3. from the finder menu click on: Go->Utilities and double click the Console icon



4. go to Finder process (alt tab or click on the dock icon or click on the desktop so no process is selected...) and then use keyboard shortcut: Shift+Command+U (in hackintosh: Shift+Winkey+U or Shift+Alt+U), and then double click the Console icon

there are several more options such as from terminal and spotlight... but you get the point (mac is awesome)

so after Console is up you should see screen looking like this:



note that i have highlighted the CrashReporter tree node, if you have any processed crashed it will leave a log file with the process name and the crash date under this node, so if you have a log file starting with the word: "blued" that means the blued process crashed (it is the bluetooth demon process name b.t.w. demon is mac equivalent to windows service).

so if this is the case then you should be seeing a lot of them (they crash and retry every 2-5 sec), you may see other crash report logs as well for this post purpose ignore them.

inside that log you may see info regarding why the process has crashed (thread dump, memory maps, exception type and description) you can google for it and you may be lucky enough to find the reason and the solution, if you don't understand it then leave it alone and try my suggestions:

solutions (kind of):
1. you may try to reboot several times eventually it will get it up and running (lame but works)

2. another flavor of this solution is a kind of voodoo but it has tech explanation, while rebooting press enter several times (you may also hold it until boot finished but do it in bursts), this will work since one of the main reasons for the bluetooth or any device not being initialized at boot time is the PC power managements system it is automated and during boot it decide if to transfer power to a certain device or not depending on the use of it (if the address is used if the IRQ is called etc.) sometimes the mac OS has short fuse and if the device does not respond in time it will think the device is not available, the process will crash and relaunch it self retrying, but the BIOS power management system will not power up the device after boot time and that is why the problem occurs, so the enter (or any key) put interrupts for the console which kind of slows down things allowing the power management to power up the device.

3. if you have the option disable the auto power management from the BIOS i don't have that option but i have the wake up event so i disabled it hoping that it will cause the power to be always on (laptop tries to save power this way).

4. one other option is to rename the plist (config) file of the bluetooth process it reside in ether:

/Library/Preferences

or:

~/Library/Preferences


and the file name is:

com.apple.Bluetooth.plist

and reboot, leopard will re-create it when the bluetooth try to start.

*** Edit *** Disregard solution 5 it made me tons of problem (i am trying to finilize it so it would work and only then i will say it is a stable solution or not)
5. another solution is to remove the bluetooth installation and reinstall it, the way to do it is to rename/remove/move the files related to bluetooth (long list) and download the package from apple and install it.

we need to remove the files since the package will not install if there is a driver installed already (unless apple site version is newer), the file list you can get from the package content using Pacifist (an application to extract and browse install packages),



i suggest to use pacifist to extract all folders to some easy to access folder for instance: ~/temp and manually install (mining copy and overwrite existing files from single user) this is the way to do it:

reboot

before apple gray boot screen appears press:

F8

at the prompt write:

-s

this will boot into a shell (A.K.A single user mode) then write:

/sbin/fsck -fy

press enter (this will check the disk before mounting it - this is not mandatory but a good practice)
then write:

/sbin/mount -uw /

this will mount your disk and now you may copy all extracted files from the package and replace existing ones on the disk using a cp command like this:

cp -R ~/temp/Application /Application
cp -R ~/temp/System /System
cp -R ~/temp/usr /usr

it is important to do it in single user mode so kext and process won't be loaded and the files can be overwritten. after you finish write:

exit

and it will continue to load into leopard

link to the apple bluetooth package:

http://www.apple.com/support/bluetooth/ (download only software update not firmware since firmware is for hardware for real macintosh not hackintosh)
*** End Of Edit ***

6. last and not a solution at all but it will free your CPU is to disable the load of this process
first way (ugly) is to rename or deleting or moving the process blued, so when anyone tries to lunch it will fail finding it, the blued process file can be found at:
/usr/sbin/blued 

you can open terminal and write:
sudo mv /usr/sbin/blued /usr/sbin/blued.old

then key in your password and reboot.

another way (better) to achieve this is to disable the load of the blued process by removing it from the demon load folder, the folders that contains demons to load during boot time are:
/System/Library/LaunchDaemons
/Library/LaunchDaemons


the script you need to remove is called:
com.apple.blued.plist

you can also remove the file:

com.apple.blued.launchd


from:
/var/run

so it won't be restarted (if it got up for some reason)

well thats it, if the problem will return i will add solutions i found/try in order to fix it,
hope it will fix your bluetooth pain in the...

Mac Direct Download sites

i have compiled a list of sites i found with links to Mac files (rapidshare/torrents/magaupload/etc.)


MacFiles - this site has Software,Ebooks,Tutorials,Fonts,Games,Plugins

FullDls - full downloads torrents links, this link is directly to mac sorted by seeders

Fink Project - The Fink project bring the full world of Unix Open Source software to Darwin and Mac OS X.

Mecho DDL -  Direct downloads apps games (mac and windows)

Lemon Share - great site with tons of mac apps/games/utils all free all cracked

Mecho Forum - has lots of mag apps/games direct links

No Mercy Mac - another great rapidshare for mac utilities, books, and software

Demonoid Torrents - free torrents site has mac section

Hacker-VIP - hacked premium Mac applications

Rapid Mac - another blogspot that share mac rapidshare links (games, apps, ebooks...)

Mac4Share -  Links to popular macintosh software. Software for mac on rapidshare

Phaze DDL - best direct link site on the web got mac section too

i will continuously update this post.

Google Earth Flight-Simulator

i found something amazing, google earth got a flight sim in it, just fire up google earth (there is a mac version and can be downloaded from: here


then just press:
Command + Option + A (in hackintosh WinKey+Alt+A)

and there you have it, select the plane, airport and go for it.

Pageup PageDn = throttle
Arrows/mouse/joystick = navigation
Spacebar = pause/continue


here are some screenshots of me crashing :-)




 
the menu is from: Milonic DHTML menus