Lion boot sequence/process

Joined
Oct 27, 2011
Messages
2
Reaction score
0
Points
1
Does anyone know the technical details regarding how Lion boots? I've found references online discussing Tiger and earlier releases, but nothing since then. Its changed quite a bit since Tiger. rc.* files are no longer used. launchd appears to drive most of the boot, but I haven't found references regarding how.

Thanks
 
Joined
Oct 20, 2011
Messages
9
Reaction score
0
Points
1
Launchd is pretty well documented (man launchd), I'm not sure where you looked.
Anyway here's the short version of the boot process

  1. EFI activates, initializes the hardware, and then loads boot.efi.
  2. boot.efi loads the kernel , draws the “booting” image on the screen and loads any needed kernel extensions (kexts).
  3. The kernel loads launchd.
  4. launchd runs through /System/Library/LaunchAgents and /Library/LaunchDaemons and acts on the plists as needed, and starts the login window.

If you are interested in the early boot process, it is documented here
The Early Boot Process

If you want to go through the code of launchd, it is available here http://www.opensource.apple.com/source/launchd/launchd-392.35/
 
OP
D
Joined
Oct 27, 2011
Messages
2
Reaction score
0
Points
1
Launchd is pretty well documented (man launchd), I'm not sure where you looked.
Anyway here's the short version of the boot process

  1. EFI activates, initializes the hardware, and then loads boot.efi.
  2. boot.efi loads the kernel , draws the “booting” image on the screen and loads any needed kernel extensions (kexts).
  3. The kernel loads launchd.
  4. launchd runs through /System/Library/LaunchAgents and /Library/LaunchDaemons and acts on the plists as needed, and starts the login window.

If you are interested in the early boot process, it is documented here
The Early Boot Process

If you want to go through the code of launchd, it is available here Source Browser

Thanks! Thats great info. What I've specifically been looking for is where in the boot process it invokes fsck_hfs on the boot drive. I recently had some trouble with an HP printer uninstall which made my system a vegetable stuck with the last message that it was going to run fsck_hfs when booting showing verbose output. I've grepped the launch agents and daemons and find no mention of fsck. Maybe its implied or occurs during an earlier phase.
 
Joined
Oct 20, 2011
Messages
9
Reaction score
0
Points
1
I'm not sure that fsck is initiated by launchd. Fsck is just a wrapper for other tools like fsck_msdos and fsck_udf etc.
The mach_kernel starts the fsck (fsck together with the other fsck_xxx are in /sbin/).

I guess because of the driver problems you are experiencing (kext driver) the kernel doesn't load and the last message you see is fsck message (even though your problem I think has nothing to do with the file system)

Anyway, regarding your problem, how did you uninstall the driver?
Can you boot in single user mode? etc

Maybe if you supply more info someone might be able to help you better.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top