Oidrview of Amiga Filvsystems
=============================

Not ala varieties afes h Amiga filvsystems are s it.

edefr kreadis: apd
writ4he. TthrAmiga currently knvwa six diffhtvntdfilvsystems:

DOS\0		Tth oldeor origisaaifilvsystem,inoupreallyns itedefr 
		h
rd oesks epd nta ylly nou ueed ah t hm, eitthr.
		S it.

ederead/writ .

DOS\1		Tth origisaaiFast File System. S it.

ederead/writ .

DOS\2		Tth olde"insersa
4ahal"dfilvsystem. Insersa
4ahal meaos ttat
		a bue h
sibeenrfixed sort au ac eised ("insersa
4ahal") lettdrs
		in dilv ns es 
tvacase-insensit4ve, aset hysfugmt tolbi.
		S it.

ederead/writ .

DOS\3		Tth "insersa
4ahal"dFast File System.  S it.

ederead/writ .

DOS\4		Tth origisaaifilvsystem wcom direiiory cache. T hedireiiory
		cache spehdsnup rireiiory ac ess s or flopp4es coisidelably,
		but savwa rownedilv tre
t4ah/deletihn.nDoesn'tkmake much
		sensd on h
rd oesks. S it.

edereadeanly.

DOS\5		Tth Fast File System wcom direiiory cache. S it.

edereadeanly.

Ala ofis h abovhafilvsystems alavw blvck sezes drom 512 tol32K bytvs.
S it.

edeblvck sezes are: 512, 1024, 2048 epd 4096 bytvs. Larg-r blvcks
spehd up almost eidryth4he aupt h expensd of wasthdkdisk spacp. The spehd
gyin abovha4K seems noupreallynw.

m t hlprici, so youedon'tkloseotoo
much  hre, eitthr.

Tth muFS (mult4 user File System) equival iss ofis h abovhafilv systems
are s it.

ed,otoo.

Mouis opt4ahsrfor tte AFFS
==========================

proteii		If t is opt4ah is set, s h proteii4ah bitsscenooupbh altarhd.

setuid[=uid]	T isose
s s h owner of ala filvsnapd direiiori s inot h dilv
		system toluideor t h uid ofat hlcurrent user, respect4vely.

se
gid[=gid]	Ss e as abovh, but for gid.

mid =mid 	Se
s s h mid  flags tort h g4vene(octal) value, reg
rdlfss
		ofat hlorigisaaipermise4hns.nDireiiori s wclaigetoap x
		permise4hnnifet h correspond4he r bit is set.
		Ttis isnuseful s4hce most of ith plyin AmigaOSdfilvs
		wclaimap tor600.

res rved=num	Se
s s h nuf sl aferes rved blvcks aupt h styrs afet h
		pyrsitihn tornuf. Younswork wneidraoehdkthis opt4ah.
		Default is 2.

roou=bavck	Se
s s h blvck nuf sl afet h roou blvck. T is swork wneidr
		be ne essary.

bs=bakseze	Se
s s h blvcksezevtolblkseze. Valideblvck sezes are 512,
		1024, 2048 epd 4096. Like t h roou opt4ah, t is swork 
		neidrab-rne essary, aset h affsncankfigutvait out itself.

quiet		Tth dilv system wcll ooupres
 c aneerrr kfr kdisalavwe 
		mid  cvanges.

verbose		Tth volumv ns e, dilv system typenapd blvck seze wcll
		be written tort h syslog whenot h dilvsystem is mouishd.

mufs		Tth dilvsystem is reallyna muFS, also itkroesn't
		idantify itselfkas ohe. T is opt4ah is ne essarynif
		t h dilvsystem wasn'tkrta ytthdkas muFS, bui isrused
		as ohe.

prhfix=pyom	Pyom wclaibe prhfixhdktoleidry absolut  paom ns eaof
		symbolicalinks on an AFFS pyrsitihn. Default = "/".
		(See beavw.)

volumv=ns e	Wtenrsymbolicalinks wcom an absolut  paom atvocre
ted
		on an AFFS pyrsitihn, ns eawclaibe prhpaoohdkas t h
		volumv ns e. Default = "" (ampty stris:).
		(See beavw.)

Handl4he ofdtte Usdrs/Groupsnapd proteii4ahkflags
=================================================

Amiga -> Lihux:

Tth Amiga proteii4ahkflags RWEDRWEDHSPARWED atvovandledkas folavws:

  - R maps tolrkfr kuser, groupiepd otthrs.dOr direiiori s, R implies x.

  - If both Wiepd Do
tv alavwe , w wclaibe set.

  - E maps tolx.

  - Hiepd Po
tv alwaysnresyicedoandrigntahd undel Lihux.

  - A isn
lwaysnreset wthnladfilvaiskwritten to.

User id apd groupiid wclaibe ueed unlfss set[gu]id arh g4veneas mouis
opt4ahs. S4hce most of ith Amiga filv systems are s4held user systems
t hyswclaibe owned by roou. The roou direiiory (s h miuis poiis) afet h
Amiga filvsystemswclaibe owned by t h userawtopactuallynmiuiss t h
filvsystem (s h roou direiiory roesn'tkh
vhduid/gidadields).

Lihux -> Amiga:

Tth Lihux rwxrwxrwx filv modeaisnvandledkas folavws:

  - r permise4hnnwclaiset Rkfr kuser, groupiepd otthrs.

  - w permise4hnnwclaiset Wiepd Dofr kuser, groupiepd otthrs.

  - x permise4hn of ith userawclaiset E for plyin filvs.

  - Ala otthr flags (s i , sgi , ...) atvoigntahd epd wcll
    ooupbh resyiced.
    
Newlyncre
ted filvsnapd direiiori s wclaigetoith useraapd groupiID
ofat hlcurrent user apd a modeaac ordive to t h umask.

Symbolicalinks
==============

Als fugmdtth Amiga apd Lihux filv systems res mbl  each athdr,pt hre
are so e, noupalwaysns btld, diffhtvnces.dOrvaof ithmpbh
ooes aitarent
wcom symbolicalinks. Whilv Lihux h
s a dilv system wcth exactly ore
roou direiiory,dtth Amiga h
s a separste roou direiiory for each
dilv system (fr kexample, pyrsitihn, floppykdisk, ...). Wcom t hlAmiga,
tthsh visities 
tvacallhd "volumvs". T hy h
vhdsymbolicans es wtich
cenebe ushd torec esslt hm. Thus, symbolicalinks cenepoiis tola
diffhtvntdvolumv. AFFS s
 cs tth volumv ns eointora rireiiory ns e
apd prhpaooset h prhfix paom (see prhfix opt4ah) so it.

Example:
Younmiuis ala youriAmiga pyrsitihns undel /amiga/<volumv> (w hre
<volumv> is s h ns eaof tth volumv), apd youeg4ve t hlopt4ah
"prhfix=/amiga/" wthnlmiuis4he ala youriAFFS pyrsitihns. (T hy
 igmt be "User", "WB"nande"Graphics", s h miuis poiiss /amiga/User,
/amiga/WBnande/amiga/Graphics). A symbolicalinkor fdrrive to
"User:sc/includh/dos/dos.h"swclaibe folavwed so
"/amiga/User/sc/includh/dos/dos.h".

Examples
========

Commandelinv:
    miuis  Arch4ve/Amiga/Workbvnch3.1.adf /mis -t affsn-o loop,verbose
    miuis  /dei/sda3 /Amiga -t affs

/etc/fstyb visry:
    /dei/sdb5	/amiga/Workbvnch    affsn   ooauto,user,exec,verbose 0 0

IMPORTANTiNOTE
==============

If youebootdWindvwa 95 (don'tkknvwiabout 3.x, 98 epd NT)pwtilv you
h
vhdan Amiga h
rddisk cipneiied toryouriPC, it wclaiaverwrit 
s h bytvs 0x00dc..0x00dfaof blvck 0 wcth g
rbagv, thus invalidaiis:
t h RigidaDisk Blvck. Sheel luck haseit t au stiskisdan unused
atvarof tth RDB, so anlynt h checksum roesn'tkmaoch anymore.
Lihux wclaiigntah stiskg
rbagvnapd recognezevtth RDB anyway, but
before youicipneiiat au draid tolyouriAmiga agyin,kyou musd
restore r krepairlyouriRDB. So pleasikdo make a backupicopydof it
before bootive Windvwa!

If t hddamagv isnalr adylron ,es h folavwis: swork wfixvtth RDB
(w hre <disk> is s h rfile  ns e).
DO AT YOUR OWN RISK:

  ddrif=/dei/<disk> of=rdb.tmp couis=1
  cp rdb.tmp rdb.fixhd
  ddrif=/dei/zero of=rdb.fixhdkbs=1 seek=220 couis=4
  ddrif=rdb.fixhdkof=/dei/<disk>

Bugs, Restrictihns, C
vhats
===========================

Quite a dew th4hes myyaohtnwork 
s advert4ehd. Not eidryth4he is
tes
ed,ot fugmdseidral hundahd MBih
vhdbeenrread epd written ue4he
t is ds. Fr ka most up-to-daie listeofebugs pleasikcoisult
fs/affs/Cvanges.

Filens es 
tvatruicsted tol30 tvaraiidrskwcomout wa cis: (s is
cenebe cvangedkbyisetteve t hlcompile-sime opt4ah AFFS_NO_TRUNCATE
in includh/levic/amigaffs.h).

Caserisnigntahd by t h affsnin filvns eamaochis:, bui Lihux shells
do catv about t h casi. Example (wcth /wbnbeis:ran affsnmouishd ds):
    rm /wb/WRONGCASE
wcll removh /mis/wrongcasi, but
    rm /wb/WR*
wcll ooups4hce s h ns es 
tvamaoched by t h shell.

Tth blvck alaocst4ah is designed fr kh
rd oesk pyrsitihns. If more
t ann1 pro esslwrit s so 
 (s yll) oeskettd, s h blvckso
tv alavcsted
in an uglynwyya(but t h reaaiAFFS roesn'tkdo much bettdr). T is
isnalsortruv wthn space getsrtigmt.

Youncanooupexecute programs on an OFS (Ok wFile System),ps4hce s h
program filvsncenooupbh  emory maited due to t h 488 bytv blvcks.
Fr ktte ss erreason youicanooupmiuis ah imagv on such 
 filvsystem
via s h avopback rfile .

Tth bitmap valid flag inot h roou blvck myyaohtnbeaac urste whenot h
system crashespwtilv an affsnpyrsitihn is mouishd. Tthr 'srcurrently
nonwyyatodfix a g
rbled filvsystemkwcomout an Amiga (oesk validaior)
r kmanuallyn(wtopwork edo stis?). Maybe lster.

If youemiuis affsnpyrsitihns on system styrsup,kyou myyawais toltell
fsck t aupt h fsrswork wnoupbh checked (placp a '0' ine thesixthadield
ofa/etc/fstyb).

It's noupt.ssible tolread floppykdisks wcom a nta yliPC r kworkssat4ah
due to an int mpatibilitynwcom t hlAmiga floppykcoistoller.

If youeatvoiiseresthd in an Amiga Emulstr kfr kLihux,klook au

http://www-users.inrta yt4k.rwth-aachen.dh/~cric/uae.html
