An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Lion:prevent FSCK from always runing on / at boot?
#17559 09/23/11 07:33 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
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
Re: Lion:prevent FSCK from always runing on / at boot?
Virtual1 #17569 09/24/11 06:30 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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.

Re: Lion:prevent FSCK from always runing on / at boot?
Virtual1 #17571 09/24/11 08:29 PM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
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
Re: Lion:prevent FSCK from always runing on / at boot?
tacit #17574 09/25/11 01:08 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: Lion:prevent FSCK from always runing on / at boot?
MicroMatTech3 #17619 09/26/11 07:20 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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.

Re: Lion:prevent FSCK from always runing on / at boot?
ganbustein #17624 09/26/11 07:55 PM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
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
Re: Lion:prevent FSCK from always runing on / at boot?
tacit #17630 09/26/11 09:00 PM
Joined: Sep 2009
Offline

Joined: Sep 2009
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).]

Last edited by Hal Itosis; 09/27/11 02:49 AM. Reason: found a copy in the Wayback Machine's archive
Re: Lion:prevent FSCK from always runing on / at boot?
Hal Itosis #17632 09/26/11 10:11 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: Lion:prevent FSCK from always runing on / at boot?
MicroMatTech3 #17637 09/27/11 02:46 AM
Joined: Sep 2009
Offline

Joined: Sep 2009
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


Last edited by Hal Itosis; 09/27/11 04:43 PM. Reason: (sometimes i'm surprised that anything works)
Re: Lion:prevent FSCK from always runing on / at boot?
Hal Itosis #17644 09/28/11 12:45 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: Lion:prevent FSCK from always runing on / at boot?
Hal Itosis #17694 09/30/11 10:30 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: Lion:prevent FSCK from always runing on / at boot?
MicroMatTech3 #17703 09/30/11 05:43 PM
Joined: Sep 2009
Offline

Joined: Sep 2009
Nice web site!

Re: Lion:prevent FSCK from always runing on / at boot?
Hal Itosis #17739 10/01/11 01:05 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: Lion:prevent FSCK from always runing on / at boot?
MicroMatTech3 #17742 10/01/11 03:40 PM
Joined: Aug 2009
Likes: 14
Online

Joined: Aug 2009
Likes: 14
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

"What Were Once Vices Are Now Habits" The Doobie Brothers

iMac (Retina 5K, 27", 2020), 3.8 GHz 8 Core Intel Core i7, 8GB RAM, 2667 MHz DDR4
OS Ventura 13.6.3
Canon Pixma TR 8520 Printer
Epson Perfection V500 Photo Scanner c/w VueScan software
TM on 1TB LaCie USB-C

Moderated by  alternaut, dkmarsh, joemikeb 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.030s Queries: 42 (0.022s) Memory: 0.6444 MB (Peak: 0.7550 MB) Data Comp: Zlib Server Time: 2024-03-28 23:04:47 UTC
Valid HTML 5 and Valid CSS