Amiga filesystems Overview ========================== Not all varieties of the Amiga filesystems are supported. The Amiga currently knows 6 different filesystems: DOS\0 The old or original filesystem, not really suited for hard disks and normally not used on them, either. DOS\1 The original Fast File System. Supported. 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. DOS\3 The "international" Fast File System. Supported. 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. Not supported. DOS\5 The Fast File System with directory cache. Not supported. All of the above filesystems allow block sizes from 512 to 32K bytes. Supported block sizes are: 512, 1024, 2048 and 4096 bytes. Larger blocks speed up almost everything with the expense of wasted disk space. The speed gain above 4K seems not really worth the price, so you don't lose too much here, either. The muFS (multi user File System) equivalents of the above file systems are supported, too. Mount options for the AFFS ========================== protect If this option is set, the protection bits cannot be altered. uid[=uid] This sets the uid of the root directory (i. e. the mount point to uid or to the uid of the current user, if the =uid is omitted. gid[=gid] Same as above, but for gid. 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. use_mp The uid and gid are taken from the now covered mount point instead of the current user or value defined. 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. 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. 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. - If both R and S are set, x will be set. - H, P and E are always retained and ignored under Linux. - A is always reset when written. User id and group id will be used unless set[gu]id are given as mount options. Since most of the Amiga file systems are single user systems they will be owned by root. 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 S 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 id of the current user and a mode according to the umask. Command line example ==================== mount Archive/Amiga/Workbench3.1.adf /mnt -t affs -o loop,size=1760 mount /dev/sda3 /Amiga -t affs /etc/fstab example /dev/sdb5 /d/f affs ro Bugs, Restrictions, Caveats =========================== Quite a few things may not work as advertised. Not everything is tested, though several hundred MB have been read and written using this fs. Filenames are truncated to 30 characters without warning. Currently there are no checks against invalid characters (':') in filenames. Case is ignored by the affs in filename matching, but Linux shells do care about the case. Example (with /mnt being an affs mounted fs): rm /mnt/WRONGCASE will remove /mnt/wrongcase, but rm /mnt/WR* will not since the names are matched by the shell. The block allocation is designed for hard disk partitions. If more than 1 process writes to a (small) diskette, the blocks are allocated in an ugly way (but the real AFFS doesn't do much better). This is also true when space gets tight. The bitmap valid flag in the root block may not be accurate when the system crashes while an affs partition is mounted. There's currently no way to fix this without an Amiga (disk validator) or manually (who would do this?). Maybe later. A fsck.affs and mkfs.affs will probably be available in the future. Until then, you should do ln -s /bin/true /etc/fs/mkfs.affs It's not possible to read floppy disks with a normal PC or workstation due to an incompatibility to the Amiga floppy controller. If you are interested in an Amiga Emulator for Linux, look at http://www-users.informatik.rwth-aachen.de/~crux/uae.html