Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Well, not really 3 layers. Disk Utility.app is just a GUIfied frontend for the "diskutil" binary living in /usr/sbin/. The "repairdisk" portion of it is pretty much the same thing as fsck.

More like:

Disk Utility -> /usr/sbin/diskutil repairdrive /

/usr/sbin/diskutil repairdrive / ~= /sbin/fsck
 
wrldwzrd89 said:
You're saying it's three layers deep? Disk Utility -> diskutil -> fsck instead of Disk Utility -> fsck? Didn't know that - thanks yellow.

diskutil is just apple's version of fsck. So it is indeed (technically) 2 layers.
 
NusuniAdmin said:
diskutil is just apple's version of fsck. So it is indeed (technically) 2 layers.
I wouldn't say for sure that it's just two. Unless you've poked around in Darwin, you wouldn't know if diskutil and fsck do the same thing with a different interface, or if diskutil calls fsck internally to do its dirty work. If you want to poke around and do some research, the Darwin source code can be found here.
 
wrldwzrd89 said:
I wouldn't say for sure that it's just two. Unless you've poked around in Darwin, you wouldn't know if diskutil and fsck do the same thing with a different interface, or if diskutil calls fsck internally to do its dirty work. If you want to poke around and do some research, the Darwin source code can be found here.

i already have looked at all the source and they are different.
 
NusuniAdmin said:
i already have looked at all the source and they are different.
So it's settled then. Isn't diskutil quite a bit more powerful than fsck? It can repair permissions as well as checking disks, which fsck can't.
 
yellow said:
Well, not really 3 layers. Disk Utility.app is just a GUIfied frontend for the "diskutil" binary living in /usr/sbin/. The "repairdisk" portion of it is pretty much the same thing as fsck.

More like:

Disk Utility -> /usr/sbin/diskutil repairdrive /

/usr/sbin/diskutil repairdrive / ~= /sbin/fsck

I shall quote myself, but not refer to myself in the 3rd person. Ah, what the heck. yellow had it right earlier. Throw yellow the rock! diskutil is a conglomeration of many disk/filestructure-related utilities. If you're curious what diskutil can do for you:

diskutil help
 
Ok fellas, now you've all decided what exactly diskutil is :p, I've just added the terminal screen cap of repair permissions being run from it :) It even found some errors on my drive, perfect!
 
According to Apple, you shouldn't need to run fsck unless you can't run Disk Utility from CD - which makes perfect sense. Someone give yellow and NusuniAdmin a nickel (let 'em fight over it).

I think this is just another example of the functionality overlap that's occurred because of the multiple parentage of OS X. fsck is familiar to anyone with a *nix background.
 
Westside guy said:
According to Apple, you shouldn't need to run fsck unless you can't run Disk Utility from CD - which makes perfect sense. Someone give yellow and NusuniAdmin a nickel (let 'em fight over it).

I think this is just another example of the functionality overlap that's occurred because of the multiple parentage of OS X. fsck is familiar to anyone with a *nix background.
In fact, I'd think you could just run diskutil from single-user mode, avoiding the need to use fsck completely. Even if you can't boot from CD, you can still run command-line programs like diskutil if you enter single-user mode.
 
yellow said:
diskutil doesn't work from Single User Mode.
That's surprising - why wouldn't it work? I don't see any reason why it wouldn't, unless some OS service it depends on isn't loaded in Single-User mode.
 
wrldwzrd89 said:
unless some OS service it depends on isn't loaded in Single-User mode.

That's the reason. What doesn't load (some kext I'm guessing), I don't know. Besides, you CAN use fsck in SUM.
 
The command in the Single-User Mode should be "fsck -yf" (or -fy...) That way, if it finds something it will repair it and then keep moving on, and will not stop and wait for you to press the 'y' key to allow it to keep going. Basically, set that up and let it run for a little while...
 
Raven VII said:
I've read that if your disk is journaled, you should NOT use fsck... am I right?

Not quite right. If you've got a journalled filesystem then there's usually no point in running fsck, because the filesystem will almost never get corrupted - but it still doesn't hurt anything to run it.
 
Brother Michael said:
What does it mean to Zap your PRAM? and what does that do for your computer?

I'm open to correction on the following, but here's my understanding of it.

PRAM is supposed to contain only some very basic startup information, startup sound, time zone, etc. But the suspicion is that quite a few software makers either put stuff directly into PRAM or else hook into it to control how certain processes are initiated. It is known that software installs often mess up some setting or other in PRAM - you'll do an install, reboot, and your computer never gets past the gray apple screen for no apparent reason. You zap your PRAM and everything then boots up normally.

Sometimes it's hard to figure out exactly what messed things up, though, because with OS X you generally just need to put the computer to sleep when you don't need it (as opposed to shutting it down). So you might not know that your computer isn't booting correctly until you install an upgrade from Apple that requires a reboot.
 
Westside guy said:
I'm open to correction on the following, but here's my understanding of it.

PRAM is supposed to contain only some very basic startup information, startup sound, time zone, etc. But the suspicion is that quite a few software makers either put stuff directly into PRAM or else hook into it to control how certain processes are initiated. It is known that software installs often mess up some setting or other in PRAM - you'll do an install, reboot, and your computer never gets past the gray apple screen for no apparent reason. You zap your PRAM and everything then boots up normally.

Sometimes it's hard to figure out exactly what messed things up, though, because with OS X you generally just need to put the computer to sleep when you don't need it (as opposed to shutting it down). So you might not know that your computer isn't booting correctly until you install an upgrade from Apple that requires a reboot.

Ok, makes sense.

Mike
 
Request for Clarification

Based upon some of the last fsck messages, then:

1. Is running fsck from the command line the same as disk utility's verify/repair permissions?

2. If one tries to run fsck from the command line, I take it one needs a hard-wired keyboard...BT won't work, right?

Thx,
Frank
 
Frank (Atlanta) said:
Based upon some of the last fsck messages, then:

1. Is running fsck from the command line the same as disk utility's verify/repair permissions?

No. They have nothing to do with each other. Fsck is a file system integrity check. Permissions repair is repairing permissions.


Frank (Atlanta) said:
2. If one tries to run fsck from the command line, I take it one needs a hard-wired keyboard...BT won't work, right?

That's correct.
 
I've been zapping the PRAM since my old 6500, but I can't seem to figure it out with my TiBook. I hold the command-option-p-r at startup, and nothing happens, I don't hear it chime more than once even after about 10 seconds of holding it. It just stays a black screen until I let go, when it starts up like normal. Is there something I'm missing here?
 
Yes... you need to hold it for significantly longer then 10 seconds. Just keep holding them down. If you don't hear another chime after 1 minute, then there's something else wrong.
 
yellow said:
Yes... you need to hold it for significantly longer then 10 seconds. Just keep holding them down. If you don't hear another chime after 1 minute, then there's something else wrong.
Thanks, it worked when I held it down longer. I remember it being a lot quicker on older computers, and didn't really think that holding it longer would have done the trick. So, lol, for the first time in nearly a year I zapped my pram :eek: :D
 
This may seem like a stupid question but I've had a mac for 2 days. Why would I want to do these things (Zap PRAM, repair permissions, run fsck)? Regular maintenance, when there are problems or both?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.