Jump to content

Check/Fix HFS+ From Linux # fsck.hfsplus


eto
 Share

1 post in this topic

Recommended Posts

theres little or no HFS+ support in any Linux distro, tho its ok with the kernel

heres how to build a fsck for hfsplus

using this

wget http://darwinsource.opendarwin.org/tarballs/apsl/diskdev_cmds-332.14.tar.gz
wget http://www.ecl.udel.edu/~mcgee/diskdev_cmds/diskdev_cmds-332.14.patch.bz2
tar zxf diskdev_cmds-332.14.tar.gz
bunzip2 -c diskdev_cmds-332.14.patch.bz2 | patch -p0
cd diskdev_cmds-332.14
make -f Makefile.lnx
sudo cp fsck_hfs.tproj/fsck_hfs /usr/local/sbin/fsck.hfsplus

 

(yes, fsck programs shouldn't usually go anywhere except /sbin)

doing fsck.hfsplus, with no arguments gives:

[no manpage,see]

 

# fsck.hfsplus

fsck.hfsplus: missing special-device

usage: fsck.hfsplus [-dfl m [mode] npqruy] special-device

d = output debugging info

f = force fsck even if clean (preen only)

l = live fsck (lock down and test-only)

m arg = octal mode used when creating lost+found directory

n = assume a no response

p = just fix normal inconsistencies

q = quick check returns clean, dirty, or failure

r = rebuild catalog btree

u = usage

y = assume a yes response

 

# fsck.hfsplus /dev/sda2
** /dev/sda2
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking volume bitmap.
** Checking volume information.
** The volume archive appears to be OK.

 

looked good, same as diskutility returns

 

Sources:

original Gentoo piece:http://gentoo-wiki.com/HOWTO_hfsplus

Debian derived piece:http://www.debian-administration.org/users/lee/weblog/21

Link to comment
Share on other sites

 Share

×
×
  • Create New...