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

10 comments:

Fabrizio said...

Hi, my name is Fabrizio (Fab is enough)I'm writiting from italy. I've found this post via google and I wonder if you can help me. I've installed a kalyway dvd on a Acer notebook, Centrino 1.6, raw installation, whole disk. After some up and down the installation went fine and now is working. Tried on the same machine in Virtualbox, ubuntu&Xp, darwin won't boot cause PAE is not supported. Ok, triede WMware - same output. Even If I enable WMware for PAE. Do you know if it is possible to disable PAE at boot in darwin? Tnx for any help. You can find me at fabriziodotbuatgmaildotcom
Greetings from Italy

shay.hackintosh said...

Fabrizio hi,

i don't have such problem, but i did some digging for you,

first let me ask this: if the disk image installation succeeded why would you like to install OS X as a vmWare or virtual box? it will be so slow (i tried it my self its like watching the stars move - very very slow)

but if you want to try it any way and the gray apple screen is crashing, then first thing to do is to use -v in the boot prompt and send the log you see,

the only thing i can see on the web related to vmware and PAE is this:

in the file: XXX.vmx write the parameter: paevm= "TRUE" to enable PAE and paevm= "FALSE" to disable it.

the (XXX.vmx on windows and XXX.cfg on linux) file should be in the folder where you decided to install the OS X VM , you can download a bootable copy of tiger in vmware here:
http://thepiratebay.org/tor/3985375/VMware_bootable_Apple_OSX (instructions included)

also check this post:
http://www.vmware.com/support/reference/common/pae_guest.html to understand how PAE is regarded in vmware

lastly this is a url that can generate your vmx file using GUI parameters you choose, then copy and paste into the vmx file (overwrite it)

http://www.easyvmx.com/expertform.shtml

if you succeed or fail please send the news i will try find more info and post it here.

Fabrizio said...

Thanks,
many things to test, it will take some time but I'll let you know.
About the reason why: I have to use windows on my noebook, for the time being i feel more confident in trying to carry along OSX in a box :) than the other way round. However, I've been told that stars actually move. :)
Thanks again.
Fab

shay.hackintosh said...

hi Fab,

please note that there is a possibility to dual boot and choose at boot time between windows (vista/xp whatever) to os x (tiger/leopard).

i will add a post covering this issue.

Have Fun.

Faisal said...

Hi,
I have this strange problem
I installed leopard on a hardisk other than the main HDD which has xp installed
The insatllation went smoothly
but now niether does xp start nor does OSX
theres only this white screen with apple logo and it gets stuck
when I type -s i get this message that the firewire is not function 7 system is getting full secrue???
please help

shay.hackintosh said...

hi faisal,

first of all do you see any boot options? such as Leopard/XP like in this post?

second try -v for verbose and try taking a picture or simply write the lines (some of it), try to find lines with the words: Exception, Error or Panic
and write them here i will try to help, also write what computer and hardware do you use.

next the line you talk about the FireWire does it looks like this:
" ERROR: FireWire unable to determine security-mode; defaulting to full-secure." if so then disregard it, it only means no security setup for the firewire so it is setting it to default (which is full security).

also please state that once you get past the error about the FireWire do you get any prompt? can you press enter or any key and get echo?

if so then Single mode is running and that is good news. in this case try this:
write;
/sbin/fsck -fy

press enter and then the system should write:

** The volume XXX appears to be OK

or:

***** FILE SYSTEM WAS MODIFIED *****

if it is the second option then do it again (the fsck command) until you get the first line saying it is ok

then write:
/sbin/mount - uw /

this should mount your file system and allow you to perform some tests in order to understand what is wrong and why the system is not booting.

now, if you can't single boot and can't understand (or send) data regarding the error then try re-installing and in the last screen (customize) choose only these options: (taken from iAtkos)
- Main System
- EFI Emulation
- Remove CPUPowerManagement
- Remove Thermal kext
- AppleSMBiosKext

thats it! don't add anything else especially not video screen or network kext.

if system boots then you can start searching for appropriate kext for your system.

regarding the XP, if you want to boot back from it try this:
from single mode or from install dvd (terminal) write:

fdisk -e /dev/rdiskX
where X stands for your hard disk number (first one is 0 second is 1 etc.)

then in the fdisk utility use ? for list of commands
now:
write p (short for print) and press enter then it will display a table of disks and partitions, if your XP reside on first HD on first partition do this:
f X
where X stands for the XP partition probably 1
then it should look like this:
f 1
and press enter, then write
u (short for update)
and press enter
then write:
w (short for write)
then press enter
lastly press q (quit)
then restart and XP should be bootable again.
so as summary then the commands should look like this:

boot single mode (after restart press F8, at the prompt write -s and press enter)
/usr/sbin/fdisk -e /dev/rdisk0
f 1
u
w
q
Reboot!

tell me how it goes.
Hope this helps

Arjun Goel said...

Hi, Great post i must say. But dude need some help here. Am a SAP beginner. So I've a windows 2003 server installed on a 10 gb partition and windows XP installed on 40 gb partition. I've left around 50 gb for Leopard. I downloaded the kalyway iso.

The problem is that i can't risk installing leopard (with 2003 server and xp already installed) if i can't boot back to the window OS's. I've been digging quite a bit and skimming thru insanelymac forums.

I found this http://www.digwin.com/view/dual-boot-osx-leopard-or-tiger-with-vistaxp-on-your-regular-intelamd-pc . but am not sure how to go about it.

is there any fairly easier or detailed ( tough ) guides i cud use. I had jas 10.4.1 earlier. well that was long back. That time what i used to do was, Boot from a live ubuntu cd and goto the Root terminal. And give the commands : fdisk /dev/hda
and then type pfor the partitions list . and then select the booting partition. I used to hit F8 then before the grey screen and it showed all the booting partitions.

But now, in leopard installation and dual booting, i never came across this stratergy to dual boot xp and leopard.

Pls help dude.. !!

shay.hackintosh said...

hi arjun,

ok, it is very much possible to dual boot and triple boot leopard with windows, ubuntu etc. i did it my self, its not hard at all,

the main idea is that windows will be installed first and on a different partition or different hard-drive,

after leopard is installed, its partition will be marked as active, so you can boot from leopard but not from other OS that was installed before, they appear on the menu but can't boot them,

after leopard boots and everything is working you can go back to fdisk and flag the windows partition as bootable

next you will need to fix the windows using windows install CD, and then windows will be bootable again,

now its time to get leopard back, from fdisk flag the leopard partition again and its bootable

after doing this you will be able to choose from the darwin menu to boot from windows or leopard,

there are many guides for dual booting, i will create one this weekend, you could check back and see all the relative screenshots,

any way if you want other guides and other methods, here are the links:

http://wiki.osx86project.org/wiki/index.php/Install_On_A_Partition_Simple_And_Accurate

http://dailyapps.net/2008/03/hack-attack-dual-boot-leopard-and-windows-vista/

http://wiki.osx86project.org/wiki/index.php/Vista_bootloader

http://wiki.osx86project.org/wiki/index.php/Multibooting

http://coolblog.profit42.com/2007/07/03/updated-osx-10410-dual-boot-guide/

nice video displaying triple boot:
http://video.aol.com/video-detail/osx86-triple-boot-vista-ubuntu-grub--working-efi/3284893641

Rodrigo S. "boi" said...

Hi, i'm trying to install mac-os leopard, the hackintosh version, i'm havin problens with the fire-wire, He said that neet do put-it to full-secure mode, and after it he return an error, and said that is waiting for a root device.

i dont now what to do...i'll thanks a loot if you can help me

shay.hackintosh said...

hi rodrigo,

you can ignore the firewire line it is not the problem (just a warning),

but regarding the "waiting for a root device" line can you describe in what stage of the installation did you get it? (after the success screen and reboot?) did you install darwin and do the fdisk thing?

if so please send an exact copy of the text you gen on the hackintosh screen.

also send details on the hardware you use (this message usually comes up when no SATA/IDE drive is detected)

also describe how did you format the partition (disk util, journald...)

if you didn't even started the install and see this message then put both HD and DVD on the same IDE controller (primary) where HD is master and DVD is slave and you will be able to install, the procedure will be very slow though, but after the installation everything should work fast.

hope it helps

 
the menu is from: Milonic DHTML menus