12 November 2009

How To Disable Journaling on HFS+ Partition Via Linux

As we all know there are many ways to accomplish disabling journaling on HFS+ partition, ie via Onyx, disk utility, or command line diskutil, but all of those tools run on Mac, while sometimes we can't boot Mac for any reasons. So, with the latest Karmic distro, I accidentally found a way to disable journaling on HFS+. How?

The first requirement to deal with HFS+ partitios is installing some tools, I forgot precisely the package name, but you always can find it in synaptic by keyword HFS. Note  that there are two commands, ie fsck.hfs and fsck.hfsplus, the name reflects it usage. Both commands need parameter -f if used for repairing journaling HFS+ filesystem.

# fsck.hfsplus -fy /dev/sdxy
# fsck.hfs -fy /dev/sdxy
# mount /dev/sdxy /mnt -t hfsplus -o rw

The first command is the default when I had some problems on Mac boot, doing some repairing (twice or more fscking), and then remove some stalled files and dir, remove extensions.mkext manualy, copy some files from linux/fat/ntfs partition into HFS+ and so fort. But all of those can be done if journaling is disabled.

So, how to disable HFS+ journaling from Linux? Simple as we type the second command above! Found it accidentally when I tried to repair my unbootable Mac partition. Magically, when I mount the partition on another running Mac, the journaling was disabled after I did fsck.hfs on it.

Normally, to disable journaling on Mac is:

# diskutil disableJournal /dev/disk0sx [or mount point]


But now, I can do that from Karmic with fsck.hfs, dunno what the side effect yet.

0 tanggapan: