Subject: Re: CD-ROM format, was Proverbial Questionsd
To: None <davagatw@mars.utm.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 08/19/1996 13:14:27
> What about an hfsswap driver that stores a mapping table (preferrably in
> memory with disk backup and multiple redundancies with error checking) and
> remaps the blocks of an hfs file into a "pseudo" device, so that the
> regular swap code handles it in the same way as a _real_ swap
> partition on the root device.  It would have to basically serve as a
> front-end to the scsi code, possibly as part of the scsi code, to work in
> that manner.  That's the disadvantage.  The advantage is that nobody would
> have to mess with the swap code.  The other advantage is that you could
> conceivably put the swap file on any partition without compiling a custom
> kernel or using one somebody else has compiled.
> 
> Another possibility would, of course, be to add support for that to the
> swap code... a very drastic undertaking, and less useful, as noted below.
> 
> On a similar note, if the code already existed within the kernel for
> remapping HFS blocks to devices, it could also be used to implement pseudo
> filesystems on a Mac volume.  Possible benefits to making this possible
> include the ability to copy a Mac-side NetBSD filesystem to another drive
> by clicking and dragging, the ability to install NetBSD without even
> _creating_ partitions....  Granted, it wouldn't be quite as fast as a
> native partition, but it would probably be very beneficial for people who
> are messing with MacMint and MacMinix who would like to move to NetBSD but
> are hesitant to commit their hard drive to it.  The installation procedure
> could be simple, too.  Basically, the first-time-user distribution could
> consist of a small partition with all the files already installed, and, if
> possible, a (MacOS) program to alter the size of the MacOS-side partition.

Hmm. You've got a lot of ideas here.

About swapping: There's a thing called vnd (I think) which AFAIK takes
a file and makes it a disk partition. I.E. vnd0 acts just like sd1a or
cd0c, etc, except that it's stored in a file on another file system.
Hmm. as I write this, I think a vnd acts like a whole disk, not just
a sub-partition. I'm sure I'll get corrected anyway. :-)

Either way, the stuff's already there to swap to a file (if the kernel's
set to swap to it; that swap on generic ... stuff in the kernel config).
All we'd need is a writable HFS filesystem.

Paul Goyette and I've been working on porting a mac hfs implimentation
to NetBSD. We've run into some snags, but things are crawling along.
The big thing I have in mind is making the install simpler. I think we'd
still want users to partition the drive, but we could fire up a miniroot
with macfs support, and build the partitions from .tgz files on the mac
side. Way cool.

Take care,

Bill