Andrew Stacey


About
Andrew Stacey
Information about my research, teaching, and other interests.

By: Andrew Stacey
Contact details


Andrew Stacey


blosxom icon

home :: HowDidIDoThat :: MacOSX :: JournallingCrash


Wed, 16th Jan 2008 (HowDidIDoThat :: MacOSX)

Journal Failure on Mac OS X boot disk

My hard drive on my iBook just crashed. The system hung and wouldn't reboot. I tried safe mode, but it still wouldn't hang. I booted up from the install disk and ran DiskUtility. That said that there were no problems with my disk, but it wouldn't mount it. Trying it manually also didn't work (not all that surprising as DiskUtility is just a front-end for fsck and mount). On booting in Verbose mode I found that the first error message involved the journal checksum. So it seems that journalling - designed to help you recover from a crash - is the cause of the problem.

I'm in the middle of fixing it as I write.


Once I'd found out that journalling is the (likely) culprit, I found a useful webpage on kernelthread. One useful thing hinted at in that article is the suggestion to find an operating system that can read hfs+ drives but which ignores the journalling. The poster on the forum used Mac OS 9. I'm using Linux. I needed a recent kernel so tried Ubuntu and Fedora. Fedora worked. Working from a Live CD is slow, but at least it's Linux!

One of the recommendations from the kernelthread forum is to reformat the problem drive. I'm minded to do that, which will also give me the opportunity to repartition so that a failure in the Users section won't produce a failure in the Root section.

First step. Backup all my important data. Actually, first step is to get the mouse working. Fortunately I'm not the first to try to get Fedora working on a Mac. Someone else has tried it too. After logging in, these are the first steps.

  • Double click on Computer, that brings up a basic file system navigator.
  • By double clicking on the relevant icon, go to Filesystem/usr/bin in the new window.
  • Wait for a while as there are a lot of files in that directory (I did say that working on a Live CD was slow!).
  • Scan down and double click on xterm.

Now we have a terminal! Who needs a mouse? Well, if you do then the following enables it.

su -
echo 1 > /proc/sys/dev/mac_hid/mouse_button_emulation

(Yes, there's no root password). It might take a while for the system to notice the change, but once it does then fn+alt is right-click and fn+⌘ is middle-click.

Now double-clicking on Computer and right-clicking on Macintosh HD gives me a menu allowing me to mount the drive. I can now navigate it and check that it's all there as it should be.

Well, almost! Mac OS X uses the same ownership/permission system as Linux and so I can only navigate to where I'm allowed. Fortunately, I can create new users on the Fedora system to match those on the Mac; or I could just work as root. For the former, doing a ls -l on a file that I want to access will give me the UID (usually a number of the form 50x). Whereupon, as root, I do:

adduser -u <num> random

Doing a su - random then gives me access to all of randoms files on the Mac.

[Full link]
Last modified on Wed, 16th Jan 2008