Ich kenne mich gar nicht mit dem HFS Filesystem aus, da ich kein MAC OS Gerät und daher keine Verwendung dafür habe.
Ich könnte mir aber denken, dass der Kernel einerseits HFS unterstützen muss,
was meiner anscheinend nicht out of the box tut
andererseits muss man sicher noch User Space Tools fürs Hantieren mit HFS Devices nachinstallieren.
Da scheint es was zu geben.
[root@retropie:~]
# apt-cache search hfsplus
dmg2img - Tool for converting compress dmg files to hfsplus images
hfsplus - Tools to access HFS+ formatted volumes
libhfsp-dev - Library to access HFS+ formatted volumes
libhfsp0 - Shared library to access HFS+ formatted volumes
Wie gesagt, habe noch nie mit HFS zu tun gehabt.
Mal sehen, ob das was bringt...
[root@retropie:~]
# apt-get install hfsplus
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libhfsp0
The following NEW packages will be installed:
hfsplus libhfsp0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 68.6 kB of archives.
After this operation, 200 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libhfsp0 armhf 1.0.4-12.1 [32.6 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main hfsplus armhf 1.0.4-12.1 [36.0 kB]
Fetched 68.6 kB in 0s (77.8 kB/s)
Selecting previously unselected package libhfsp0.
(Reading database ... 84538 files and directories currently installed.)
Preparing to unpack .../libhfsp0_1.0.4-12.1_armhf.deb ...
Unpacking libhfsp0 (1.0.4-12.1) ...
Selecting previously unselected package hfsplus.
Preparing to unpack .../hfsplus_1.0.4-12.1_armhf.deb ...
Unpacking hfsplus (1.0.4-12.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libhfsp0 (1.0.4-12.1) ...
Setting up hfsplus (1.0.4-12.1) ...
Processing triggers for libc-bin (2.19-18+deb8u6) ...
[root@retropie:~]
# dpkg-query -L hfsplus|grep bin/
/usr/bin/hpmount
/usr/bin/hpumount
/usr/bin/hpls
/usr/bin/hpcd
/usr/bin/hpcopy
/usr/bin/hppwd
/usr/bin/hpfsck
/usr/bin/hprm
/usr/bin/hpmkdir
Alles anzeigen
Hm, kein mkfs.hfs+ o.ä.
Da fehlt noch was.
[root@retropie:~]
# apt-cache search hfs.*mkfs
hfsprogs - mkfs and fsck for HFS and HFS+ file systems
[root@retropie:~]
# apt-get install hfsprogs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
hfsprogs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 151 kB of archives.
After this operation, 279 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main hfsprogs armhf 332.25-11 [151 kB]
Fetched 151 kB in 0s (232 kB/s)
Selecting previously unselected package hfsprogs.
(Reading database ... 84575 files and directories currently installed.)
Preparing to unpack .../hfsprogs_332.25-11_armhf.deb ...
Unpacking hfsprogs (332.25-11) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up hfsprogs (332.25-11) ...
[root@retropie:~]
# dpkg -L hfsprogs|grep bin/
/sbin/mkfs.hfsplus
/sbin/fsck.hfsplus
/sbin/fsck.hfs
/sbin/mkfs.hfs
Alles anzeigen
Das sieht doch schon mal vielversprechend aus.
[root@retropie:~]
# fallocate -l $((512*1024*1024)) /hfs.vault
[root@retropie:~]
# ls -lh /hfs.vault
-rw-r--r-- 1 root root 512M Mar 5 16:19 /hfs.vault
[root@retropie:~]
# losetup $(losetup -f) /hfs.vault
[root@retropie:~]
# losetup -a
/dev/loop0: [45826]:89737 (/hfs.vault)
[root@retropie:~]
# mkfs.hfsplus -J /hfs.vault
Initialized /hfs.vault as a 512 MB HFS Plus volume with a 8192k journal
[root@retropie:~]
# blkid /dev/loop0
/dev/loop0: UUID="f8f6c0a6-ac27-33fa-95ae-1a4610fa3bca" LABEL="untitled" TYPE="hfsplus"
[root@retropie:~]
# mkdir /mnt/tmp{1..9}
[root@retropie:~]
# mount /hfs.vault /mnt/tmp1
[root@retropie:~]
# df -t hfsplus
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop1 524288 16412 507876 4% /mnt/tmp1
[root@retropie:~]
# openssl rand -base64 $((64*1024*1024)) > /mnt/tmp1/random_junk.txt
bash: /mnt/tmp1/random_junk.txt: Read-only file system
[root@retropie:~]
# grep hfs /proc/mounts
/dev/loop1 /mnt/tmp1 hfsplus ro,relatime,umask=22,uid=0,gid=0,nls=utf8 0 0
Alles anzeigen
Aha, verstehe jetzt, was Dein Problem ist.
[root@retropie:~]
# mount -o remount,rw /mnt/tmp1
[root@retropie:~]
# grep hfs /proc/mounts
/dev/loop1 /mnt/tmp1 hfsplus ro,relatime,umask=22,uid=0,gid=0,nls=utf8 0 0
[root@retropie:~]
# mount -o remount,rw,force /mnt/tmp1
[root@retropie:~]
# grep hfs /proc/mounts
/dev/loop1 /mnt/tmp1 hfsplus rw,relatime,umask=22,uid=0,gid=0,nls=utf8 0 0
[root@retropie:~]
# openssl rand -base64 $((64*1024*1024)) > /mnt/tmp1/random_junk.txt
[root@retropie:~]
# ls -l /mnt/tmp1/
total 88748
-rw-r--r-- 1 root root 90876590 Mar 5 16:37 random_junk.txt
[root@retropie:~]
# tail -3 /mnt/tmp1/random_junk.txt
hNJo2bcLuHnqICMLdWFZ6t8AQK6SZEiIcM/53/RBum74K7fzORp+9ghz9fz4bLo+
jFdMgINgxY54FBudEwwbLCAi1DqI2PA7QIKIgYH+kbdvQRkwh+7V50UyhDKJ7iDc
mMFDs1Uu+A2ziTlK7LJSWA==
Alles anzeigen
Das klappte immerhin.
Versuch doch einfach mal das HFS mit der Option force zu mounten.
Aber wie gesagt, ist mit Vorsicht zu geniessen, da ich keinerlei Ahnung von HFS(+) o.ä. für mich exotische Filesysteme habe.