Subject: Re: Disklabel(5)/(8) ??
To: None <news@maple-gw.maple.or.jp>
From: Hauke Fath <saw@sun0.urz.uni-heidelberg.de>
List: port-mac68k
Date: 10/11/1996 05:04:44
davagatw@Mars.utm.edU (The Great Mr. Kurtz [David A. Gatwood]) said...

> > sd230|mo230|mo230-iso|Fujitsu M2512A Magneto-optical:\
> >         :ty=optical:dt=SCSI:\
> >         :ns#40:nt#8:nc#1394:su#446324:se#512:\
> >         :pc#446324:oc#0:bc#8192:fc#1024:tc=unused:\
> >         :pg#446323:og#1:bg#8192:fg#1024:tg=4.2BSD:
>                                              ^^^^^^
> I assume that the above tg is to define the label format, which for disks
> formatted normally would default to... Macintosh?  Mac4.2BSD?  AUX4.2BSD?

Anything out of (currently, according to disklabel(5)):

/*
 * Filesystem type and version.
 * Used to interpret other filesystem-specific
 * per-partition information.
 */
#define FS_UNUSED       0       /* unused */
#define FS_SWAP         1       /* swap */
#define FS_V6           2       /* Sixth Edition */
#define FS_V7           3       /* Seventh Edition */
#define FS_SYSV         4       /* System V */
#define FS_V71K         5       /* V7 with 1K blocks (4.1, 2.9) */
#define FS_V8           6       /* Eighth Edition, 4K blocks */
#define FS_BSDFFS       7       /* 4.2BSD fast file system */
#define FS_MSDOS        8       /* MSDOS file system */
#define FS_BSDLFS       9       /* 4.4BSD log-structured file system */
#define FS_OTHER        10      /* in use, but unknown/unsupported */
#define FS_HPFS         11      /* OS/2 high-performance file system */
#define FS_ISO9660      12      /* ISO 9660, normally CD-ROM */
#define FS_BOOT         13      /* partition contains bootstrap */

- I think I've seen a #define for HFS somewhere else... The man page may
not be up to date. "Disks formatted normally" have a MacOS partition
table which is entirely different from the structure discussed here.
 
> The point I was trying to make (poorly) was that if writing to the MacOS
> partition table were supported in the future, some means would be required
> to tell disklabel whether it was writing a BSD-type disklabel or a Mac
> partition table label, and more importantly, be able to override whatever
> was on the disk initially (since the read would use an auto-check).  That
> could be done with disktab, but it might be nice to be able to override it
> on the command-line.

I don't see much sense in copying functionality to a MD disklabel(1) you
already have in your MacOS formatter: You don't help those who don't
know how to partition their disk for installing MacBSD - as it's not up
and running yet, nor is your disklabel(1). ;-)

And those who can't read and understand the manuals that come with their
MacOS formatter can't be expected to cope with 'man disklabel' and 'man
disktab'.

> Which brings up another question: anybody know anything about (or have
> sources of info about) "Foreign File Access"?  It'd be nice to be able to
> directly mount (under MacOS): 1.  A/UX BSD partitions, 2.  A/UX MkLinux
> partitions, and 3. BSD native partitions.

"A man can dream, can't he?" ;-)

> Which brings up yet another question: is there any chance of adding code
> to distinguish an ext2fs from a ffs, and perhaps even making MkLinux
> partitions mountable under NetBSD (and vice versa)?  Ideas?

No problem at all -- the code to _distinguish_ file systems, I mean.
Supposedly ext2fs has its characteristical tags (l*nux comes with
several file systems) so you simply would add code to
arch/mac68k/mac68k/disksubr.c that looks for those tags.
 
> Good point.  Hadn't even thought about the fact that IWMs don't do that
> sort of thing.  I assume that the SWIM's an Apple proprietary chip, right?

As is the IWM.

        hauke

-- 
"It's never straight up and down"  (DEVO)