📄 affs.txt
字号:
Overview of Amiga Filesystems=============================Not all varieties of the Amiga filesystems are supported for reading andwriting. The Amiga currently knows six different filesystems:DOS\0 The old or original filesystem, not really suited for hard disks and normally not used on them, either. Supported read/write.DOS\1 The original Fast File System. Supported read/write.DOS\2 The old "international" filesystem. International means that a bug has been fixed so that accented ("international") letters in file names are case-insensitive, as they ought to be. Supported read/write.DOS\3 The "international" Fast File System. Supported read/write.DOS\4 The original filesystem with directory cache. The directory cache speeds up directory accesses on floppies considerably, but slows down file creation/deletion. Doesn't make much sense on hard disks. Supported read only.DOS\5 The Fast File System with directory cache. Supported read only.All of the above filesystems allow block sizes from 512 to 32K bytes.Supported block sizes are: 512, 1024, 2048 and 4096 bytes. Larger blocksspeed up almost everything at the expense of wasted disk space. The speedgain above 4K seems not really worth the price, so you don't lose toomuch here, either.The muFS (multi user File System) equivalents of the above file systemsare supported, too.Mount options for the AFFS==========================protect If this option is set, the protection bits cannot be altered.setuid[=uid] This sets the owner of all files and directories in the file system to uid or the uid of the current user, respectively.setgid[=gid] Same as above, but for gid.mode=mode Sets the mode flags to the given (octal) value, regardless of the original permissions. Directories will get an x permission if the corresponding r bit is set. This is useful since most of the plain AmigaOS files will map to 600.reserved=num Sets the number of reserved blocks at the start of the partition to num. You should never need this option. Default is 2.root=block Sets the block number of the root block. This should never be necessary.bs=blksize Sets the blocksize to blksize. Valid block sizes are 512, 1024, 2048 and 4096. Like the root option, this should never be necessary, as the affs can figure it out itself.quiet The file system will not return an error for disallowed mode changes.verbose The volume name, file system type and block size will be written to the syslog when the filesystem is mounted.mufs The filesystem is really a muFS, also it doesn't identify itself as one. This option is necessary if the filesystem wasn't formatted as muFS, but is used as one.prefix=path Path will be prefixed to every absolute path name of symbolic links on an AFFS partition. Default = "/". (See below.)volume=name When symbolic links with an absolute path are created on an AFFS partition, name will be prepended as the volume name. Default = "" (empty string). (See below.)Handling of the Users/Groups and protection flags=================================================Amiga -> Linux:The Amiga protection flags RWEDRWEDHSPARWED are handled as follows: - R maps to r for user, group and others. On directories, R implies x. - If both W and D are allowed, w will be set. - E maps to x. - H and P are always retained and ignored under Linux. - A is always reset when a file is written to.User id and group id will be used unless set[gu]id are given as mountoptions. Since most of the Amiga file systems are single user systemsthey will be owned by root. The root directory (the mount point) of theAmiga filesystem will be owned by the user who actually mounts thefilesystem (the root directory doesn't have uid/gid fields).Linux -> Amiga:The Linux rwxrwxrwx file mode is handled as follows: - r permission will set R for user, group and others. - w permission will set W and D for user, group and others. - x permission of the user will set E for plain files. - All other flags (suid, sgid, ...) are ignored and will not be retained. Newly created files and directories will get the user and group IDof the current user and a mode according to the umask.Symbolic links==============Although the Amiga and Linux file systems resemble each other, thereare some, not always subtle, differences. One of them becomes apparentwith symbolic links. While Linux has a file system with exactly oneroot directory, the Amiga has a separate root directory for eachfile system (for example, partition, floppy disk, ...). With the Amiga,these entities are called "volumes". They have symbolic names whichcan be used to access them. Thus, symbolic links can point to adifferent volume. AFFS turns the volume name into a directory nameand prepends the prefix path (see prefix option) to it.Example:You mount all your Amiga partitions under /amiga/<volume> (where<volume> is the name of the volume), and you give the option"prefix=/amiga/" when mounting all your AFFS partitions. (Theymight be "User", "WB" and "Graphics", the mount points /amiga/User,/amiga/WB and /amiga/Graphics). A symbolic link referring to"User:sc/include/dos/dos.h" will be followed to"/amiga/User/sc/include/dos/dos.h".Examples========Command line: mount Archive/Amiga/Workbench3.1.adf /mnt -t affs -o loop,verbose mount /dev/sda3 /Amiga -t affs/etc/fstab entry: /dev/sdb5 /amiga/Workbench affs noauto,user,exec,verbose 0 0IMPORTANT NOTE==============If you boot Windows 95 (don't know about 3.x, 98 and NT) while youhave an Amiga harddisk connected to your PC, it will overwritethe bytes 0x00dc..0x00df of block 0 with garbage, thus invalidatingthe Rigid Disk Block. Sheer luck has it that this is an unusedarea of the RDB, so only the checksum doesn't match anymore.Linux will ignore this garbage and recognize the RDB anyway, butbefore you connect that drive to your Amiga again, you mustrestore or repair your RDB. So please do make a backup copy of itbefore booting Windows!If the damage is already done, the following should fix the RDB(where <disk> is the device name).DO AT YOUR OWN RISK: dd if=/dev/<disk> of=rdb.tmp count=1 cp rdb.tmp rdb.fixed dd if=/dev/zero of=rdb.fixed bs=1 seek=220 count=4 dd if=rdb.fixed of=/dev/<disk>Bugs, Restrictions, Caveats===========================Quite a few things may not work as advertised. Not everything istested, though several hundred MB have been read and written usingthis fs. For a most up-to-date list of bugs please consultfs/affs/Changes.Filenames are truncated to 30 characters without warning (thiscan be changed by setting the compile-time option AFFS_NO_TRUNCATEin include/linux/amigaffs.h).Case is ignored by the affs in filename matching, but Linux shellsdo care about the case. Example (with /wb being an affs mounted fs): rm /wb/WRONGCASEwill remove /mnt/wrongcase, but rm /wb/WR*will not since the names are matched by the shell.The block allocation is designed for hard disk partitions. If morethan 1 process writes to a (small) diskette, the blocks are allocatedin an ugly way (but the real AFFS doesn't do much better). Thisis also true when space gets tight.You cannot execute programs on an OFS (Old File System), since theprogram files cannot be memory mapped due to the 488 byte blocks.For the same reason you cannot mount an image on such a filesystemvia the loopback device.The bitmap valid flag in the root block may not be accurate when thesystem crashes while an affs partition is mounted. There's currentlyno way to fix a garbled filesystem without an Amiga (disk validator)or manually (who would do this?). Maybe later.If you mount affs partitions on system startup, you may want to tellfsck that the fs should not be checked (place a '0' in the sixth fieldof /etc/fstab).It's not possible to read floppy disks with a normal PC or workstationdue to an incompatibility with the Amiga floppy controller.If you are interested in an Amiga Emulator for Linux, look athttp://www-users.informatik.rwth-aachen.de/~crux/uae.html
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -