Format/Backup/Restore your HFS plus partition under Linux

Format/Backup/Restore your HFS plus partition under Linux

Howto Format your hfp+ partition

First, You should installl mkfs.hfps

download from

or download from locale - mkfs.hfsp and patch of mkfs.hfsp

for x86/PPC OS X 10.4.[4-7] / Darwin 8.4-7

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

cp newfs_hfs.tproj/newfs_hfs /sbin/mkfs.hfsplus

cp fsck_hfs.tproj/fsck_hfs /sbin/fsck.hfsplus

cd /sbin

ln -s mkfs.hfsplus mkfs.hfs

ln -s fsck.hfsplus fsck.hfs

Second, I am trying create raw data as a new partition for hfp+

dd if=/dev/zero of=hfsp_disk bs=1M count=64

losetup /dev/loop0 hfsp_disk

mkfs.hfsplus /dev/loop0

mount /dev/loop0 /mnt

Third, backup your hfs+ partition

Please check to install partclone

clone.hfsp -c -s /dev/loop0 -o hfsp.img

Forth, restore your hfs+ partition

Please make sure you have installed partclone

clone.hfsp -r -s hfsp.img -o /dev/loop0

you can try to mount /dev/loop0 to check your data inside hfs plus partition.



convert from Thomas blog post id 204 old convert log: ./093130/tag%3E2008%2001%20linux)

@2008 @01 @linux