Why does my macbook air run fsck every boot
Sadly, I don't think there really is an answer to my question.
Anyway. Some time ago I noticed that my macbook air runs fsck on every boot (which one can see by going to verbose boot mode-cmd-v on boot). This check takes around 10 minutes, which is quite annoying if your computer was rebooted in the middle of giving a talk (that is a different story, though).
So, I tried to track down why this happens.
1. My root system is HFS journalled.
2. First, I booted into rescue mode, and did a check on the disk with DiskUtility. There were indeed some errors to be corrected. They were fixed, and then a second check completed successfully. Still, every boot did fsck.
3. I booted into single user mode, and ran fsck -fy. Now nothing was detected, disk is healthy. Still, every boot did fsck.
4. I tried to track down, who runs fsck? It started after launchd, so possibly that is the right place. I looked through /System/Library/LaunchDaemons - nothing ran fsck.
5. Finally, grep on binaries revealed that launchctl (!!!!) runs fsck.
http://www.opensource.apple.com/source/launchd/launchd-442.26.2/support/launchct l.c revealed that it indeed does.
The relevant code looks like this:
---
if (!is_safeboot()) {
#if 0
/* We have disabled this block for now. We need to revisit this optimization after Leopard. */
if (sfs.f_flags & MNT_JOURNALED) {
goto out;
}
#endif
launchctl_log(LOG_NOTICE, "Running fsck on the boot volume...");
if (fwexec(fsck_tool, &status) != -1) {
---
So, it seems that the "optimization" of not running fsck on every single boot on a journalled filesystem is for now commented out.
So, my conclusion is that for now OSX is designed to run fsck on the boot volume every single boot. Whcih on my system takes 10 minutes.
My questions are:
1. Why?
2. Obviously, currently this can not be disabled. Why?
3. Is it normal that fsck take 10 minutes on an SSD with 250GB?
4. If yes, does boot always take 10 minutes?
MacBook Air, Mac OS X (10.7.5)