head	1.7;
access;
symbols;
locks; strict;
comment	@# @;


1.7
date	2000.07.26.16.59.21;	author kabe;	state Exp;
branches;
next	1.6;

1.6
date	2000.07.24.22.46.59;	author kabe;	state Exp;
branches;
next	1.5;

1.5
date	2000.07.24.20.23.55;	author kabe;	state Exp;
branches;
next	1.4;

1.4
date	2000.02.08.15.44.00;	author kabe;	state Exp;
branches;
next	1.3;

1.3
date	2000.02.07.16.42.31;	author kabe;	state Exp;
branches;
next	1.2;

1.2
date	2000.01.31.23.27.12;	author kabe;	state Exp;
branches;
next	1.1;

1.1
date	2000.01.29.04.14.30;	author kabe;	state Exp;
branches;
next	;


desc
@README for vold_pcfs
@


1.7
log
@*** empty log message ***
@
text
@
==========================================================================
Wrappers for mounting pcfs(7FS) bigdisks via vold(1M) on SPARC Solaris 2.6
==========================================================================

WHAT IS THIS?
=============

You can mount DOS filesystem ZIPs and MOs via vold(1M).


INSTALLATION
============

Before you install this package, go up to a point that you can 
format, mount, read and write a ufs (mount_ufs(1M)) ZIP or MOs 
via vold. Be sure the hardware/setup bugs are eliminated.

Three methods are provided. The Recommended is Method 3, but for 
those who want minimal quirks installed, Method 1 and 2 is here.

DO NOT install all of them; only one method should be installed.

Method 1: Only wrap /usr/lib/fs/pcfs/mount

	This wrapper mounts pcfs with ":c" appended, then 
	deletes ":c" from /etc/mnttab after the mount succeeded.

	Installation:
	Use "make install-method1". Files affected:
		/usr/lib/fs/pcfs/mount

	Pros: Only one file is patched.
	Cons: /etc/mnttab is lacking ":c", so it's hard to know afterwards 
	      whether it is mounted with or without ":c".

Method 2: Wrap /usr/lib/fs/pcfs/mount and /usr/sbin/rmmount

	The pcfs/mount wrapper just appends ":c" to the device file string. 
	The rmmount wrapper deletes ":c" from /etc/mnttab and passes on 
	if it was an eject request.

	Installation:
	Use "make install-method2". Files affected:
		/usr/lib/fs/pcfs/mount
		/usr/sbin/rmmount

	Pros: ":c" remains on /etc/mnttab, so you know it :)
	      You can have aliases other than "rmscsi%d" in vold.conf 
	      and have no trouble.
	Cons: Two commands are wrapped. Ugly.

Method3: Create a new filesystem identifier "fdiskfs"

	- /usr/lib/fs/pcfs/ident_pcfs.so only recognizes superfloppy 
	  formatted disk, and the logic is rather loose. 
	- pcfs(7FS) can only mount FAT12 floppy and FAT16 FDISK. 

	This difference may cause 

	- FDISK disks not mounted even if it could, or
	- mount a FAT16 superfloppy in FAT12 mode and corrupt it.

	So, install a new filesystem identifier "ident_fdiskfs.so" and 
	enable this in the rmmount.conf(4) "ident" chain.

	Installation:
	Use "make install-method3". Files affected:
		/usr/lib/fs/fdiskfs/ident_fdiskfs.so.1
		/usr/lib/fs/fdiskfs/mount
		/usr/lib/fs/pcfs/ident_pcfs.so.1
		/usr/sbin/rmmount

		Then add following to /etc/rmmount.conf before pcfs line:
			ident fdiskfs ident_fdiskfs.so rmscsi
		and modify the last line of the /etc/vold.conf to
			unsafe ufs hsfs pcfs fdiskfs
		Finally, restart vold.

	Pros: Additional to Method2, you can mount FDISK disks 
	      without any kludge to make it look like a superfloppy format.
	      FAT16 superfloppys (which cannot be mounted) are 
	      properly rejected to prevent corruption.
	      (If you want to mount the superfloppys, fake a FDISK info 
	       on it by "fdiskize" utility)
	      These configuration are the best for the novice user.
	Cons: /usr is rather polluted.

Some Sun official patches may also replace the files affected by this package.
When applying official patches, it is strongly recommended to first 
uninstall this package by "make uninstall", then apply the patch and 
then reinstall.
(At the date of writing no conflicts with Recommended patches)


UNINSTALL
=========

"make uninstall" .
If you're switching between methods, uninstall them first.


PLATFORM SUPPORTED
==================

Yes, further success report is greatly appreciated. 
Dunno whether this works on x86.

	UltraSPARC-1/170 (Sbus,SCSI) + Solaris 2.6 + 
	SCSI ZIP100 + SCSI 230MB MO(Fujitsu MCB3023SS)

640MB MOs are NOT supported. (540MB probably works, but not confirmed)


WHAT THIS DOES
==============

Not only x86, but SPARC Solaris also could mount FDISK partitioned 
bigdisks commonly seen on ZIP and Magneto-Optical(MO). 
But the device file string needs ":c" appended, like
	mount -F pcfs /vol/dev/dsk/c0t4d0/no_name:c /rmscsi/no_name
which vold(1M) (actually rmmount(1M)) does not do.

Even by only minor setup, which means just enabling the "dev_rmscsi.so" line 
in /etc/vold.conf, vold(1M) does mount some MOs by insertion. 
But it lacks ":c". This makes pcfs(7FS) assume that the filesystem is 
FAT12(!), and CORRUPTS IT ON THE VERY FIRST WRITE. 
(This won't be a problem on filesystems below 16MB, such as floppys)

So I made a wrapper around /usr/lib/fs/pcfs/mount to forcibly 
add ":c" for rmscsi devices, and then pass it to original 
/usr/lib/fs/pcfs/mount.

Just adding ":c" causes another problem. ":c"-suffixed path is recorded 
in /etc/mnttab. And rmmount(1M) seems to scan and stat(2) each device 
spec in /etc/mnttab on eject. 
As device file like "/vol/dev/dsk/c0t4d0/no_name:c" usually doesn't 
exist, unmounting/ejecting fails. To get around this, the ":c" suffix 
should be deleted from /etc/mnttab line somewhere before the eject.
(This is ugly but without the rmmount source code we can't fix it)


DISK FORMATS
============

Magneto-Opticals comes in two formats; FDISK format and Superfloppy format. 
ZIPs are always FDISK.

FDISK resembles IBM-PC harddisk format. It can have up to 
four primary partitions on a single medium.
(though pcfs(7FS) seems to use the only first one) 
MOs formatted by WindowsNT is in this form. ZIPs are always FDISK.

Superfloppy does not have a partition; the whole disk is a whole disk, 
which corresponds to a single partition image of a harddisk.
(In FreeBSD terms the whole disk is a slice image.)
MOs used by Windows95 comes in this format.

pcfs(7FS) seems to understand only FDISK format when you need FAT16. 
But the filesystem resolver, ident_pcfs.so, invoked by rmmount(1M), 
seems to only detect superfloppy, so vold(1M) does not always mount the media. 
(To check for yourself, fstyp(1M) is something close, but actually 
/usr/lib/fs/pcfs/ident_pcfs.so.1 is used; they use different logic)

So, for automatic mount, the disk should be formatted in superfloppy 
(to make ident_pcfs.so happy) with a fake FDISK partition information 
(to mount it in FAT16) and a hooked /usr/lib/fs/pcfs/mount to add ":c" 
to the device path (to mount it in FAT16). This is Method 1,2.

Another way is to separate FDISK and superfloppy detection/mount; 
this is Method 3, which you don't need any superfloppy things on the disk.
For mounting superfloppy disks, you still need fake FDISK information 
as this is the restriction of the pcfs(7FS). There is an `fdiskize' tool 
included to create it.

You can't use fdformat(1) for formatting in pcfs. You may need mformat(1) 
included in mtools distribution. In mtools language, 
superfloppy will mean a config line without a "partition=" clause.
mformat(1) produces a `fake' FDISK partition info even if without 
"partition=", so the disk formatted by mformat(1) could be 
detected & mounted by vold(1M) after installation.

Occasionally a pcfs(7FS) disk is erroneously mounted as ufs, 
especially when the disk is previously formatted in ufs.
Before formatting, something like 
	dd if=/dev/zero of=/vol/dev/aliases/rmscsi0 bs=18k count=10 
	(or just  cp /kernel/genunix /vol/dev/aliases/rmscsi0)
to get rid of the previous filesystem trace, is recommended.


--
kabe@@sra-tohoku.co.jp
$Id: README,v 1.6 2000-07-25 07:46:59+09 kabe Exp kabe $
@


1.6
log
@,
l
@
text
@a11 28
WHY YOU WANT THIS
=================

SPARC Solaris also could mount FDISK partitioned 
bigdisks commonly seen on ZIP and Magneto-Optical(MO), but 
the device file string needs ":c" appended, like
	mount -F pcfs /vol/dev/dsk/c0t4d0/no_name:c /rmscsi/no_name
But vold(1M) (actually rmmount(1M)) doesn't do this.

Even in default setups, which means just enabling the "dev_rmscsi.so" line 
in /etc/vold.conf, vold(1M) does mount some MOs by insertion. 
But it lacks ":c". This makes pcfs(7FS) assume that the filesystem is 
FAT12(!), and CORRUPTS IT ON THE VERY FIRST WRITE. 
(This won't be a problem on filesystems below 16MB, such as floppys)

So I made a wrapper around /usr/lib/fs/pcfs/mount to forcibly 
add ":c" for rmscsi devices, and then pass it to original 
/usr/lib/fs/pcfs/mount.

Just adding ":c" causes another problem. ":c"-suffixed path is recorded 
in /etc/mnttab. And rmmount(1M) seems to scan and stat(2) each device 
spec in /etc/mnttab on eject. 
As device file like "/vol/dev/dsk/c0t4d0/no_name:c" usually doesn't 
exist, unmounting/ejecting fails. To get around this, the ":c" suffix 
should be deleted from /etc/mnttab line somewhere before the eject.
(This is ugly but without the rmmount source code we can't fix it)


d15 4
d22 2
a88 3
If you believe Makefile, just "make install-method{1,2,3}" will do the job, 
except for Method3 which you need to edit the config files.

d90 3
a92 2
When applying official patches, you MUST first uninstall this by 
"make uninstall", then apply the patch and then reinstall.
d96 7
d112 30
d152 1
a152 1
MOs formatted by WindowsNT is in this form.
a190 6
UNINSTALL
=========

"make uninstall" .
If you're switching between methods, uninstall them first.

d193 1
a193 1
$Id: README,v 1.5 2000-07-25 05:23:55+09 kabe Exp kabe $
@


1.5
log
@*** empty log message ***
@
text
@d9 1
a9 1
You can mount FDISK format ZIPs and MOs via vold(1M).
d12 2
a13 2
DESCRIPTION
===========
d24 1
a24 1
FAT12(!), and corrupts it on the very first write. 
d31 3
a33 2
Just adding ":c" causes another problem. rmmount(1M) seems to scan 
and stat(2) each device spec in /etc/mnttab on eject. 
d77 9
a85 6
	/usr/lib/fs/pcfs/ident_pcfs.so only recognizes superfloppy 
	formatted disk, and the logic is rather loose. 
	And pcfs(7FS) can only mount FAT12 floppy and FAT16 FDISK. 
	This difference may cause FDISK disks to be not mounted 
	even if it could, or mount a FAT16 superfloppy in 
	FAT12 mode and corrupt it.
d105 3
a107 2
	      properly rejected to prevent corruption. 
	      (You still need fake FDISK info for superfloppy disks.) 
d114 1
a114 1
Some official patches may also replace the files affected by this package.
d143 1
a143 1
(In FreeBSD terms the disk is a slice image.)
d147 2
a148 2
But the filesystem resolver invoked by rmmount(1M) seems to only 
detect superfloppy, so vold(1M) does not always mount the media. 
d168 1
a168 1
detected & mounted by vold(1M) after installation of this patch.
d170 2
a171 2
Occasionaly a pcfs(7FS) disk is errornously mounted as ufs, 
especially when you have switched formats. 
d186 1
a186 1
$Id: README,v 1.4 2000-02-09 00:44:00+09 kabe Exp kabe $
@


1.4
log
@uninstall before official patch
@
text
@d21 4
a24 4
Even in default setups (after enabling rmscsi driver), vold(1M) 
does mount some MOs by insertion. But it lacks ":c"; 
then pcfs(7FS) assumes the filesystem is FAT12(!) and 
corrupts it on the very first write. 
d35 2
a36 2
is deleted from /etc/mnttab line somewhere before the eject.
(This is ugly but without the source code we can't fix it)
d42 3
d47 2
a48 2
	This wrapper deletes ":c" from /etc/mnttab after 
	the real mount is accomplished.
d50 2
a51 1
	[Use "make install-method1". Files affected:
a52 1
	]
d64 2
a65 1
	[Use "make install-method2". Files affected:
a67 1
	]
d76 6
a81 5
	/usr/lib/fs/pcfs/ident_pcfs.so only recognizes superfloppy, and 
	the logic is rather loose. And pcfs(7FS) can only mount 
	FAT12 floppy and FAT16 FDISK. This difference may cause 
	FDISK disks to be not mounted even if it could, or mount a 
	FAT16 superfloppy in FAT12 mode and corrupt it.
d85 2
a86 1
	[Use "make install-method3". Files affected:
a96 1
	]
d99 1
a99 1
	      without any fake superfloppy signatures.
d104 1
a104 1
	Cons: /usr is polluted.
d109 1
a109 1
Some official patches also replace the files affected by this package.
d112 1
d118 1
a118 1
Yes, further application report is greatly appreciated. 
d136 3
a138 1
Superfloppy does not have a partition; the whole disk is a whole disk. 
d150 2
a151 1
to the device path (ditto).
d153 2
a154 2
this is Method 3, which you don't need any superfloppy trace. 
For mounting superfloppy disks you still need fake FDISK information 
d181 1
a181 1
$Id: README,v 1.3 2000-02-08 01:42:31+09 kabe Exp kabe $
@


1.3
log
@delete install direction for Method{12}, to align with method3
clean up comments further
@
text
@d105 4
d173 1
a173 1
$Id: README,v 1.2 2000-02-01 08:27:12+09 kabe Exp kabe $
@


1.2
log
@more clear description
@
text
@d47 3
a49 3
	[use "make install-method1"]
	Backup /usr/lib/fs/pcfs/mount as mount.dist, then 
	Compile m1_pcfs_mount.c, and place it as /usr/lib/fs/pcfs/mount
d61 4
a64 5
	[use "make install-method2"]
	Backup /usr/lib/fs/pcfs/mount as mount.dist
	Backup /usr/sbin/rmmount as rmmount.dist
	Compile m2_pcfs_mount.c, and place it as /usr/lib/fs/pcfs/mount
	Compile m2_rmmount.c, and place it as /usr/sbin/rmmount
d81 1
a81 1
	[Many procedures. Use "make install-method3". Files add/modified:
d87 1
a87 1
		and then add following to /etc/rmmount.conf before pcfs line:
d97 3
a99 3
	      properly rejected. (You still need fake FDISK info 
	      for superfloppy disks.) These configuration are the best 
	      for the novice user.
d136 1
a136 1
So to be sure, the disk should be formatted in superfloppy 
d138 7
a144 3
(to mount it in FAT16). There is an `fdiskize' tool included 
to do this. Another way is to separate FDISK and floppy filesystem 
detection; this is Method 3.
d169 1
a169 2
2000 Jan 27
$Id: README,v 1.1 2000-01-29 13:14:30+09 kabe Exp kabe $
@


1.1
log
@Initial revision
@
text
@d98 2
a99 1
	      properly rejected. These configuration are the best
d131 1
a131 1
pcfs(7FS) seems to understand only FDISK format for FAT16. 
d147 2
a148 1
"partition=", so the disk could be detected & mounted by vold(1M).
d167 1
a167 1
$Id$
@
