An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#17559 - 09/23/11 12:33 PM Lion:prevent FSCK from always runing on / at boot?
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
Not a big deal if your startup drive doesn't have a lot of files, but a guy here has one that has 750k files and this makes fsck churn for about a solid minute before proceeding with boot. He's threatening to go back to Snow which boots in less than 1/2 the time.

Before 10.7, fsck only ran if the volume wasn't journaled or if the journal was dirty from a hard dismount. Now it seems to always run. I'm having problems finding how to disable it.

Various googling finds information on editing fstab. If you check in /etc/ you will find fstab.hd contains a warning that it's being ignored and going away. But "fstab" is NOT there. Through experimentation I've found that if you make it, it will try to use it. But I apparently can't get the syntax right.

UUID=longvolumeidfromdiskutilgoeshere / hfs rw 0 0

(those spaces are spaces, not tabs) If you want to specify a volume name with a space in it you thus have to use octal. ("\040") But when I try the above it does indeed appear to skip fsck on the boot but then it hangs only a few lines later when it apparently can't find the mount point. Attempting to replace "/" with "/Volumes/Macintosh\040HD" doesn't work either, it still says it can't find the mount point. From what I've read, the "0 0" should prevent fsck from running if I can get it to take it.

Is anyone here more familiar with fstab?
_________________________
I work for the Department of Redundancy Department

Top
#17569 - 09/24/11 11:30 AM Re: Lion:prevent FSCK from always runing on / at boot? [Re: Virtual1]
ganbustein Offline


Registered: 08/04/09
Originally Posted By: Virtual1
Not a big deal if your startup drive doesn't have a lot of files, but a guy here has one that has 750k files and this makes fsck churn for about a solid minute before proceeding with boot. He's threatening to go back to Snow which boots in less than 1/2 the time.

Before 10.7, fsck only ran if the volume wasn't journaled or if the journal was dirty from a hard dismount. Now it seems to always run.


Are you sure there's been a change? 750k files isn't a lot. I have over twice that many, and never see fsck run when I restart.

I also think it's "volume isn't journaled and volume wasn't dismounted properly". If the volume is journaled, no changes to the catalog happen until after they've been added to the journal and the journal has been flushed to disk. Even after a bad dismount, the journal can be used to bring the catalog quickly back to a consistent state.

Have you checked the physical health of the disk? I'm thinking that maybe it's having trouble writing to the sector that says "unmounted cleanly". Or maybe it's getting errors writing to the journal?

Are you sure it's the startup volume that fsck is running against? Other volumes should get checked, if needed, after startup, but still...

Is he sure it's fsck causing the delay? Lion can take a while to restart if you had lots of apps running when you shut down, because it takes time to re-launch them all and re-open all their documents.

Top
#17571 - 09/24/11 01:29 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: Virtual1]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
This behavior (always running fsck at boot) is not consistent with my experience. I've only been running Lion to troubleshoot software I develop, but I definitely have not observed it running fsck on a cleanly dismounted boot volume.

This suggests to me that there's something specific about that machine that's triggering this behavior. It might be useful to check the health of the drive, the partition map, and the directory on that machine carefully to see if anything's out of whack.
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#17574 - 09/24/11 06:08 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: tacit]
MicroMatTech3 Offline


Registered: 08/04/09
I have checked the All Messages log after restarts under Lion and have not noticed fsck running.

The method used to make something always run at boot time is launchd. If you open Activity Monitor, you can see that launchd is the parent process of many other processes, by selecting a process and using the Inspect button.

Oddly enough, I now have several launchd processes running. One was launched by kernel_task, and the others were apparently launched by the first launchd process, or one of the earlier ones.
_________________________
MicroMat Inc
Makers of TechTool

Top
#17619 - 09/26/11 12:20 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: MicroMatTech3]
ganbustein Offline


Registered: 08/04/09
Originally Posted By: MicroMatTech3
Oddly enough, I now have several launchd processes running.


The first task that runs when you start up your computer is the one with PID=0 ("kernel_task"). In a sense, this task "is" the system. The first thing it does is launch a copy of launchd (PID=1), which launches everything else.

The copy of launchd with PID=1 has user=root, and (among other things), loads from /System/Library/LaunchDaemons and /Library/LaunchDaemons descriptions of all your daemon processes, and launches them as needed.

As each user logs in*, it also fires up a copy of launchd specific to that user. That task, among other things, loads from the various Library/LaunchAgents files descriptions of "agents", background tasks that operate on behalf of that user, and launches them as needed.

* The "login" does not need to be through LoginWindow. I see a copy of launchd with user=_spotlight.

Top
#17624 - 09/26/11 12:55 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: ganbustein]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
Originally Posted By: ganbustein
Originally Posted By: MicroMatTech3
Oddly enough, I now have several launchd processes running.


The first task that runs when you start up your computer is the one with PID=0 ("kernel_task"). In a sense, this task "is" the system. The first thing it does is launch a copy of launchd (PID=1), which launches everything else.

The copy of launchd with PID=1 has user=root, and (among other things), loads from /System/Library/LaunchDaemons and /Library/LaunchDaemons descriptions of all your daemon processes, and launches them as needed.

As each user logs in*, it also fires up a copy of launchd specific to that user. That task, among other things, loads from the various Library/LaunchAgents files descriptions of "agents", background tasks that operate on behalf of that user, and launches them as needed.

* The "login" does not need to be through LoginWindow. I see a copy of launchd with user=_spotlight.


Interesting. On most *nix systems, the first thing that the kernel does is launch init. The presence of init, which is so vital to most *nix variants that if it quits, the system kernel panics, is necessary to initialize any other process. I just noticed that on my system init isn't running at all. On OS X has launchd entirely replaced init?
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#17630 - 09/26/11 02:00 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: tacit]
Hal Itosis Offline


Registered: 09/03/09
Loc: 10.6.8 (build 10K549)
Originally Posted By: tacit
On OS X has launchd entirely replaced init?

This is an Apple document (ca. 2005):

EDIT: Hmm, here's a nice link: http://launchd.macosforge.org/post/13/

[but basically the answer is yes, launchd was developed to replace init (and more).]


Edited by Hal Itosis (09/26/11 07:49 PM)
Edit Reason: found a copy in the Wayback Machine's archive

Top
#17632 - 09/26/11 03:11 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: Hal Itosis]
MicroMatTech3 Offline


Registered: 08/04/09
There are times when I am concerned about whether this Website gets enough traffic, and there are times when I remind myself that quality of content is king.

Thanks for the details about the multiple launchd processes, gangbustein, and for the reference to the apparently no longer online Apple doc, Hal. And thanks to Tacit, without whose efforts none of us would be reading any of this.

I assume that Hal knows how to put phrases into quotation marks in Google, to search for the specified terms as an expression. (If I did not feel comfortable with Hal's skills, my first Terminal session would not have been something he suggested.) The failure to find the entire, original Apple document raises the interesting question of just when Google started to keep cached versions of documents.
_________________________
MicroMat Inc
Makers of TechTool

Top
#17637 - 09/26/11 07:46 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: MicroMatTech3]
Hal Itosis Offline


Registered: 09/03/09
Loc: 10.6.8 (build 10K549)
Originally Posted By: MicroMatTech3
There are times when I am concerned about whether this Website gets enough traffic, and there are times when I remind myself that quality of content is king.

Thanks for the details about the multiple launchd processes, gangbustein, and for the reference to the apparently no longer online Apple doc, Hal. And thanks to Tacit, without whose efforts none of us would be reading any of this.

I assume that Hal knows how to put phrases into quotation marks in Google, to search for the specified terms as an expression. (If I did not feel comfortable with Hal's skills, my first Terminal session would not have been something he suggested.) The failure to find the entire, original Apple document raises the interesting question of just when Google started to keep cached versions of documents.

[yep, i googled with quotes... but didn't obtain actual "apple.com" results.]

Okay, you got me thinking... so i decided to try the Internet Archive Wayback Machine. I managed to find that their snapshot dated December 3, 2010 was the latest one storing the correct content.

Thus I have edited my first post accordingly. smile

EDIT: rats... now they're saying that the Dec. 3rd snapshot resides on a machine which is down.
Here's a link to the previous (Oct. 15, 2010) version, just in case: Getting Started with launchd



Edited by Hal Itosis (09/27/11 09:43 AM)
Edit Reason: (sometimes i'm surprised that anything works)

Top
#17644 - 09/27/11 05:45 PM Re: Lion:prevent FSCK from always runing on / at boot? [Re: Hal Itosis]
MicroMatTech3 Offline


Registered: 08/04/09
Hal,

Once again, you have made the point about the uniqueness of this Website. The contents of the archive.org version are now in my Yojimbo database. Thank you.
_________________________
MicroMat Inc
Makers of TechTool

Top
#17694 - 09/30/11 03:30 AM Re: Lion:prevent FSCK from always runing on / at boot? [Re: Hal Itosis]
MicroMatTech3 Offline


Registered: 08/04/09
From It Knows:

[1] In 1999, Google’s web index – its copy of every page on the internet – was updated once every three or four months. By 2003 parts of the index were updated once a day, and by 2007 the rate was once every few minutes. By 2009 it was no longer possible to say that the web was being crawled at such and such a speed: if Google considered there was a chance a page might be updated it engineered things such that any change on that page was reflected in its index exactly as it happened. A search for ‘hudson river’ on 15 January 2009 would have showed that a plane had crash-landed on it before it was reported by CNN.
_________________________
MicroMat Inc
Makers of TechTool

Top
#17703 - 09/30/11 10:43 AM Re: Lion:prevent FSCK from always runing on / at boot? [Re: MicroMatTech3]
Hal Itosis Offline


Registered: 09/03/09
Loc: 10.6.8 (build 10K549)
Nice web site!

Top
#17739 - 10/01/11 06:05 AM Re: Lion:prevent FSCK from always runing on / at boot? [Re: Hal Itosis]
MicroMatTech3 Offline


Registered: 08/04/09
The London Review of Books is one of the periodicals that some libraries mistakenly cancelled when their budgets were cut.

The article "It Knows" was linked from Arts & Letters Daily, a Website of the Chronicle of Higher Education. It has a wonderful set of links in the left margin.
_________________________
MicroMat Inc
Makers of TechTool

Top
#17742 - 10/01/11 08:40 AM Re: Lion:prevent FSCK from always runing on / at boot? [Re: MicroMatTech3]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
Originally Posted By: MicroMatTech3
The article "It Knows" was linked from Arts & Letters Daily, a Website of the Chronicle of Higher Education.

Wow! What a great site....a person could spend a lot of time here. Thanks.

ryck
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top

Moderator:  alternaut, dkmarsh, joemikeb