Tips August 4, 2004 at 1:32 pm

Use diskutil in 10.3 Single User Mode

Have you tried to run diskutil in single user mode only to be shot down by a ‘lazy carbon values’ error message?

Read on to find out how to get diskutil to run in SUM on Mac OS X 10.3.x!Here is how I got diskutil in single user mode working under 10.3.4. Get ready to kiss the lazy carbon values goodbye!

After looking at the ADC site I figured that the lazy carbon message came
from it trying to lazily load some frameworks and/or services.

The lazy loading allows apps to load frameworks and resources as needed,
rather than loading them all at once to speed launch times and save RAM.
Since a lot of these depend on daemons running it was just a matter of
figuring out what needed to happen to get the system started up to the
point that diskutil would run. In fact many of the startup items and other
apps will not execute under 10.3 if you don’t start up the appropriate daemons
first.

As of 10.3
Apple began changing the way that startup items are launched to depend
on a bootstrap daemon, rather than just starting them in a fairly random
order from /System/Library/StartupItems. In order for diskutil to work
under 10.3 SUM we need to startup the bootstrap daemons and the disk arbitration. The config files
for the bootstap services live in /etc/mach_init.d.

Here is the command to do the bootstrap stuff:

/usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d

So to use diskutil in SUM:

  1. Boot into single user mode. (command-s)
  2. Do ‘fsck -yf‘ to check and or fix the disk.
  3. Do ‘mount -uw /‘ to mount the disk in R/W mode.
  4. Do ‘/usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
  5. Now you need to start DiskArb up. Do ‘SystemStarter start Disks
  6. Now you can use ‘diskutil‘ as you usually would.

Whew!

For more info check out Apple’s boot process docs. I find reading the developer docs to be key to understanding how Mac OS X works. Remember the move to an OSS core gives all of us the ultimate blueprint to the OS…

No Comments

  • fsck checks the integrity of the volume structures.

    diskutil can read the BOMs in /Library/Receipts and correct the
    permissions on files as needed.

    Two very different things.


    Breaking my server to save yours.

    Josh Wisenbaker
    http://www.afp548.com

    • Tried this trick in Mac OS X Server 10.4.7, but it didn’t work. According to "Mac
      OS X Tiger Server Administration" page 65 it should work in Tiger.
      Problem is that after giving the /usr/libexec.. command authentication doesn’t
      seem to work. Commands like ls -l hangs forever

Leave a reply

You must be logged in to post a comment.