Open grahamperrin opened 3 years ago
Possibly it would be worth suggesting this to @vermaden for https://github.com/vermaden/automount?
I do not have access to Apple hardware so I am not able to create APFS device for tests but ... can someone just format 4GB or 8GB USB pendrive using APFS, then create its image with dd(8) and sent it to me?
This way I can move that image to my USB pendrive and make the tests and add APFS to automount.
... or its possible to create APFS with the tools mentioned on FreeBSD?
Regards.
Thanks @vermaden, excellent. As I refuse to run any OS X later than 10.9 which does not use APFS, I cannot make an APFS dd gzip, but maybe one of our users interested in apfs compatibility can do that.
Thank you very much.
I do not have access to Apple hardware so I am not able to create APFS device for tests but ... can someone just format 4GB or 8GB USB pendrive using APFS, then create its image with dd(8) and sent it to me?
This way I can move that image to my USB pendrive and make the tests and add APFS to automount.
... or its possible to create APFS with the tools mentioned on FreeBSD?
Regards.
Made one :) https://www.icloud.com/iclouddrive/03Retv6uQWWJheJ4omTBSlGtw#apfsusb
Thank You.
Will try to get into it this weekend or earlier :)
https://github.com/sgan81/apfs-fuse/pull/139 by @johnothwolo is adding FreeBSD support to apfs-fuse
.
Not sure if that helps but ...
% mdconfig -l -v
md0 vnode 3856M /data/download/apfsusb.img
% file -s /dev/md0
/dev/md0: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 1, 7897087 sectors, extended partition table (last)
% file -s /dev/md0p1
/dev/md0p1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "BSD 4.4", sectors/track 32, heads 16, sectors 409600 (volumes > 32 MB), FAT (32 bit), sectors/FAT 3151, serial number 0x67e317ed, label: "EFI "
% file -s /dev/md0p2
/dev/md0p2: Apple File System (APFS), blocksize 4096
% doas /usr/local/bin/fsapfsinfo /dev/md0
fsapfsinfo 20201107
Unable to open: /dev/md0.
libfsapfs_container_superblock_read_data: invalid object type: 0x00000000.
libfsapfs_container_superblock_read_file_io_handle: unable to read container superblock data.
libfsapfs_internal_container_open_read: unable to read container superblock at offset: 0 (0x00000000).
libfsapfs_container_open_file_io_handle: unable to read from file IO handle.
info_handle_open_input: unable to open input container.
% doas /usr/local/bin/fsapfsinfo /dev/md0p2
fsapfsinfo 20201107
Unable to open: /dev/md0p2.
libcfile_file_read_buffer_with_error_code: unable to read from file with error: Invalid argument
libcfile_file_read_buffer: unable to read from file.
libbfio_file_read_buffer: unable to read from file: /dev/md0p2.
libbfio_file_range_io_handle_read_buffer: unable to read from file IO handle.
libbfio_handle_read_buffer: unable to read from handle.
libfsapfs_object_read_file_io_handle: unable to read object data.
libfsapfs_internal_container_open_read: unable to read object at offset: 4096 (0x00001000).
libfsapfs_container_open_file_io_handle: unable to read from file IO handle.
info_handle_open_input: unable to open input container.
% doas /usr/local/bin/fsapfsmount /dev/md0 /mnt/tmp
fsapfsmount 20201107
Unable to open source container
libfsapfs_container_superblock_read_data: invalid object type: 0x00000000.
libfsapfs_container_superblock_read_file_io_handle: unable to read container superblock data.
libfsapfs_internal_container_open_read: unable to read container superblock at offset: 0 (0x00000000).
libfsapfs_container_open_file_io_handle: unable to read from file IO handle.
mount_handle_open: unable to open container.
% doas /usr/local/bin/fsapfsmount /dev/md0p2 /mnt/tmp
fsapfsmount 20201107
Unable to open source container
libcfile_file_read_buffer_with_error_code: unable to read from file with error: Invalid argument
libcfile_file_read_buffer: unable to read from file.
libbfio_file_read_buffer: unable to read from file: /dev/md0p2.
libbfio_file_range_io_handle_read_buffer: unable to read from file IO handle.
libbfio_handle_read_buffer: unable to read from handle.
libfsapfs_object_read_file_io_handle: unable to read object data.
libfsapfs_internal_container_open_read: unable to read object at offset: 4096 (0x00001000).
libfsapfs_container_open_file_io_handle: unable to read from file IO handle.
mount_handle_open: unable to open container.
Although I am not sure I imagine that the dmg was made by the Mac's Disk Utility which usually does not produce "raw" images (like dd
would) of a disk but also puts a partition table and possibly additional partitions into the image. md0p2
does look like it is recognized as APFS by file -s
, so it is probably what should be mounted. I don't know why doas /usr/local/bin/fsapfsmount /dev/md0p2 /mnt/tmp
fails but possibly it would be worthwhile to try https://github.com/sgan81/apfs-fuse/pull/139 on it.
Although I am not sure I imagine that the dmg was made by the Mac's Disk Utility which usually does not produce "raw" images (like
dd
would) of a disk but also puts a partition table and possibly additional partitions into the image.md0p2
does look like it is recognized as APFS byfile -s
, so it is probably what should be mounted. I don't know whydoas /usr/local/bin/fsapfsmount /dev/md0p2 /mnt/tmp
fails but possibly it would be worthwhile to try sgan81/apfs-fuse#139 on it.
I did use dd though
Ah, good to know, thanks.
Ported
libyal/libfsapfs
https://www.freshports.org/devel/libfsapfs
https://github.com/libyal/libfsapfs#readme
More
Via https://github.com/topics/apfs …
sgan81/apfs-fuse
https://github.com/sgan81/apfs-fuse#readme
linux-apfs/linux-apfs-oot
https://github.com/linux-apfs/linux-apfs-oot#readme
jordibr/APFS-Module
https://github.com/jordibr/APFS-Module#readme