Skip navigation

How to get applejack to run in single user on 10.6.8?

1743 Views 24 Replies Latest reply: Dec 18, 2012 9:37 AM by este.el.paz RSS
  • Neville Hillyer Level 4 Level 4 (1,845 points)

    When you install applejack it is normally located at:

     

    /var/root/Library/Scripts/applejack.sh

     

    which is probably not found by  makewhatis

     

    Applejack is normally invoked by an alias at:

     

    /var/root/.profile

  • Mark Jalbert Level 5 Level 5 (4,390 points)

    Thanks Neville, my response was a comment not a question. Makewhatis builds it databases from MANPATH or by default /usr/share/man. Here's a snipet from the postflight script in the applejack package--

     

    manLoc="$mountPoint/usr/share/man/man8"

    # Okay, I give up.

     

    cp "${packageLoc}/Contents/Resources/applejack.8" "$manLoc"
    /bin/chmod 0444 "${manLoc}/applejack.8";
    

    The postflight script also includes building the .profile in the root account. IMO, bizarre. Why not just append the PATH variable? Then again, why run a script with 2000 lines of code to do what may be 4 or 5 easy commands could do? If, you ever really needed to run those commands.

  • Neville Hillyer Level 4 Level 4 (1,845 points)

    Mark Jalbert wrote:

     

    Makewhatis builds it databases from MANPATH or by default /usr/share/man.

     

    Thanks for that.

     

    I don't know how to get makewhatis to list applejack.

     

    I discovered a quarantine extended attribute on applejack (and memtest) man files so removed it with:

     

    sudo xattr -d com.apple.quarantine /usr/share/man/man8/applejack.8

     

    but

     

    sudo /usr/libexec/makewhatis

     

    still fails to list it although

     

    man applejack

     

    works OK.

     

    Any thoughts?

     

    Mark Jalbert wrote:


    The postflight script also includes building the .profile in the root account. IMO, bizarre. Why not just append the PATH variable?

     

    Perhaps because .profile has basic AJ instructions to be displayed in single user mode and it was a simple matter to include an alias to simplify user typing.

     

    Mark Jalbert wrote:

     

    why run a script with 2000 lines of code to do what may be 4 or 5 easy commands could do?

     

    You may have to use AJ in various modes to see that it does quite a lot with minimal user typing. There may be extra code to cope with several versions of OS X.

  • Mark Jalbert Level 5 Level 5 (4,390 points)

    Any thoughts?

    A problem with the man page header formatting. But let's take a step back and talk about the Standards and the design of a distribution and how the Standards are implemented. /usr/libexec is a placeholder for programs run by other programs. Since, makewhatis and the wrapper script makewhatis.local are located in this directory then the design of the distribution is to call them with another program or shell script. Your mileage may vary otherwise.

     

    Now applejack follows its own standard and expect that everything will work. Everything won't. Look at the comment "I give up" in one of my other posts. The script contains some revealing info in its comments. They are guessing on how the operating system works. There are muliple procedures that aren't necessary in order to reach certain goals and the scripting in general is far from efficient.

  • Neville Hillyer Level 4 Level 4 (1,845 points)

    Mark Jalbert wrote:


    A problem with the man page header formatting.

     

    You are probably correct. I did notice that although it displayed OK its first few lines were not the same as other man pages.

     

    My understanding is that AppleJack is the work of one person with advice from one or two others.

     

    Notwithstanding code efficiency it has worked very reliably for me on Tiger and Leopard and, as others have said, it can correct things that Disk Utility does not and, on occasions, get a non-booting Mac to boot.

     

    It is easy to remember to start a problem Mac in single user mode and then follow the on-screen AppleJack instructions.

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.