* MFS Filesystem support
@ 2024-04-14 23:07 The Mariocrafter
2024-04-15 1:25 ` Josh Juran
0 siblings, 1 reply; 3+ messages in thread
From: The Mariocrafter @ 2024-04-14 23:07 UTC (permalink / raw)
To: linux-m68k
Macintosh File System (MFS) is a filesystem used in early Macintosh
models up to those running System 3, when the original HFS (which is
supported within Linux) supported it. Although no Mac model that
shipped or can run with an MFS-only macOS can run Linux, floppy disks
formatted with an MFS system may still exist and the user never
bothered to reformat it to HFS or HFS+, and the main use case I can
think of is using MFS to transfer files from a modern device to a Mac
that does not support HFS. It would be nice supporting the MFS
filesystem natively within Linux, which could be read-only or
read-write.
MFS is a very limited filesystem, meaning it's simple to implement,
albeit being less efficient than its successors. MFS stored files in a
single flat structure without subdirectories; the illusion of
"folders" was created by including a "directory handle" in each file
entry so that the single directory could be scanned to find files that
belong to a particular virtual folder. File names could be up to 255
characters, though Finder didn't support more than 63 or 31 characters
(depending on the version). Resource Forks were introduced in MFS. An
MFS volume consists of a boot block, a master directory block, some
file directory blocks, and some allocation blocks. It may also have a
backup master directory block, but this is optional. These blocks are
each defined in terms of 512-byte sectors. Unless otherwise specified,
all values are big-endian (MSB first). Information about the
filesystem is relatively easy to find.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MFS Filesystem support
2024-04-14 23:07 MFS Filesystem support The Mariocrafter
@ 2024-04-15 1:25 ` Josh Juran
2024-04-15 1:39 ` Michael Schmitz
0 siblings, 1 reply; 3+ messages in thread
From: Josh Juran @ 2024-04-15 1:25 UTC (permalink / raw)
To: The Mariocrafter; +Cc: linux-m68k
On Apr 14, 2024, at 7:07 PM, The Mariocrafter <kayvonkamyar@gmail.com> wrote:
> Macintosh File System (MFS) is a filesystem used in early Macintosh
> models up to those running System 3, when the original HFS (which is
> supported within Linux) supported it. Although no Mac model that
> shipped or can run with an MFS-only macOS can run Linux, floppy disks
> formatted with an MFS system may still exist and the user never
> bothered to reformat it to HFS or HFS+,
Mac OS never provided a facility for formatting 400K disks as anything but MFS.
> and the main use case I can
> think of is using MFS to transfer files from a modern device to a Mac
> that does not support HFS.
This would require a read-write implementation of MFS. By the way, are we talking disk images for e.g. Mini vMac, or actual 1980s hardware?
> It would be nice supporting the MFS
> filesystem natively within Linux, which could be read-only or
> read-write.
An alternative to native filesystem support is to read and write disk images in userspace. Aside from not increasing the kernel’s attack surface or imposing a licensing constraint, it has the benefit of being portable to other operating systems.
For example, I created a (so far) read-only implementation of MFS for Advanced Mac Substitute[1] (an emulator plus reimplementation of Mac OS for running 68K applications).
https://github.com/jjuran/metamage_1 (see 68k/modules/ams-fs/MFS.cc)
If someone does seek to implement MFS, at the very least you might find the comments useful.
Cheers,
Josh
[1] https://www.v68k.org/ams/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MFS Filesystem support
2024-04-15 1:25 ` Josh Juran
@ 2024-04-15 1:39 ` Michael Schmitz
0 siblings, 0 replies; 3+ messages in thread
From: Michael Schmitz @ 2024-04-15 1:39 UTC (permalink / raw)
To: Josh Juran, The Mariocrafter; +Cc: linux-m68k
Hi Josh,
[resent due to vger reject, sorry ...]
On 15/04/24 13:25, Josh Juran wrote:
>> It would be nice supporting the MFS
>> filesystem natively within Linux, which could be read-only or
>> read-write.
> An alternative to native filesystem support is to read and write disk images in userspace. Aside from not increasing the kernel’s attack surface or imposing a licensing constraint, it has the benefit of being portable to other operating systems.
My thoughts - something like hfsutils might be best for this purpose.
Cheers,
Michael
> For example, I created a (so far) read-only implementation of MFS for Advanced Mac Substitute[1] (an emulator plus reimplementation of Mac OS for running 68K applications).
>
> https://github.com/jjuran/metamage_1 (see 68k/modules/ams-fs/MFS.cc)
>
> If someone does seek to implement MFS, at the very least you might find the comments useful.
>
> Cheers,
> Josh
>
> [1]https://www.v68k.org/ams/
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-15 1:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-14 23:07 MFS Filesystem support The Mariocrafter
2024-04-15 1:25 ` Josh Juran
2024-04-15 1:39 ` Michael Schmitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox