- Smart File System, Walkthrough -
This "how-to" is more or less a walkthrough made due to the high amount
of questions regarding SFS posted on several forums and mailing lists.
This walkthrough covers everything from editing the kicklayout to the usage of tools like Media ToolBox and it's divided into sections for easier reading.
1. SLB
2. Kicklayout
3. MTB
4. Shell Commands
- SLB -
1. SLB is the Amiga One Booter. This is so the Hard Drive can be booted from UBoot and when you're using SFS you've got 2 options:
1.1. If you want your drive to be fully SFS (all partitions including boot) you will need to use the slb_V2
1.2. If You want your drive to be mixed with various file systems (e.g., Linux/MOL and OS4) and for boot partition FFS then use the SLB that supports all modes (it's on the pre-release CD (slb_v2 1.8b), the one on later CDs will not work)
-Additional:-
1.b. Additionally this SLB doesn't work if the Linux and AmigaOS4 boot partitions are on different drives, there is a long thread on amigaworld.net about it.
- Kicklayout -
-- WARNING!!!! , DO NOT PUT SFS INTO THE RDB OF THE HDD!!!!! --
Kicklayout is the kernel configuration file AmigaOS4 uses and this is where you activate things like SmartFileSystem and so on and all you have to make sure you do in here is:
2.1. Open the kicklayout file with your favourite text editor and enter this line into nodebug and debug sections (if not already present):
"MODULE Kickstart/SmartFileSystem"
2.2. And also make sure that the file SmartFileSystem is located in the SYS:Kickstart/ drawer.
2.3. You should not have SmartFileSystem in L: like with older versions of AmigaOS and if you do, delete that.
2.4. Make sure diskcache.library.kmod is in the SYS:Kickstart/ drawer as well as in the kicklayout file "MODULE Kickstart/diskcache.library.kmod" and that its not commented out.
- Additional -
SFS is already in the kicklayout when booting the AmigaOS4 PreRelease CD.
Please note that DiskCache is not a must but certainly recommended.
-- WARNING!!!! DO NOT PUT SFS INTO THE RDB OF THE HDD!!!!! --
- Media ToolBox -
Media ToolBox is simmilar to the tool that's called "hdtoolbox" on former AmigaOs releases.
-- WARNING!!!! DO NOT PUT SFS INTO THE RDB OF THE HDD!!!!! --
3.1. In the MTB icon tooltype you set the device you want to use for example “sii0680ide.device” if the drive you want to edit is on your SiL ATA PCI card. The default of Media Toolbox is to list all the devices a drive can be on and allow the user to select the device each time its ran, this can become a bit tiresome.
3.2. When you have selected the device you will be presented with the main menu of MTB and here it will show the units present on the controller/device you chose. Select the drive you want to set SFS up on and press the Edit RDB/Reinstall button and head down to the AmigaOne Boot Code section. Here select the Install AmigaOne Booter and choose the SLB file from SYS:L/ (L:) that supports SFS. Select Accept changes and then go back into the main menu of MTB again.
3.3. Edit Partitions and FileSystems, this is very different from earlier AmigaOS versions so pay attention to this section. SFS must NOT be placed in the RDB of the Hard Drive like earlier as it's now a Kickstart module and should only be used as described in this walkthrough.
3.3a Set the size of your partitions and make sure that the first partition (boot partition) starts at the very beginning of the hard drive. Then do the following on all drives that you want SFS installed on:
3.3b Set the name of the partition and make sure you don't name it something that you already have used or will use on other partitions and remember to select automount on all partitions and bootable on the partition you want to install OS4 onto.
3.3c Select the partition you want to use SFS and press select filesystem / edit details and in the filesystem chooser select Custom FileSystem and type in the identifier for SFS which is 53465300 and press Enter and you will now see SFS/00 appear to the right of where you typed the identifier in.
3.3d Blocksize should always be 512 with SFS to get the best performance.
3.3e Maxtransfer Should be (A1200ppc/A4000ppc OS4) 1FE00 and A1/Sii0680/Sii3112 it should be 0x7FFFFFFF
3.3f Mask should be (A1200ppc/A4000ppc OS4) 0xFFFFFFFE and A1/Sii0680/Sii3112 it should be 0xFFFFFFFE
Now when you have done this to all drives just accept changes and save and reboot.
3.4. Formatting the drive, important!
When formatting the partitions in Workbench select quick format and only quick format.
3.4b. If you want special options (no .recycled directory, case sensitive etc.) you have to use SFSFormat from the Aminet SFS archive.
-- Additional bug info --
When you start MTB from now on and then select the Hard Drive in the main menu which has SFS installed on it you will be presented with a warning that it can't find the SFS filesystem in ROM. This is a bug and just "select any" to continue. This bug has since been addressed and in the next public release this problem should be gone.
-- WARNING!!!! DO NOT PUT SFS INTO THE RDB OF THE HDD!!!!! --
- Shell Commands -
This section covers some of the core things one should remember when using SFS.
4.1. SFSQuery (version 1.1 works fine on AOS4 and doesn't need ixemul, available from the official SFS website at http://home.vtal.de/js/) outputs like this:
10.OS4:> sfsquery tonyboot:
SFSquery information for tonyboot: (SFS Version 1.235)
Start/end-offset : 0x00000000:00102000 - 0x00000000:3baf6000
Device API : (standard)
Bytes/block : 512 Total blocks : 1953696
Cache accesses : 1932316 Cache misses : 3973 (0%)
Read-ahead cache : 8x 8192 bytes (Copyback)
Flush timeout : act. 20s - inact. 0.5s
Max Name Length : 107
DOS buffers : 1000
SFS settings : [RECYCLED]
10.OS4:> version sfsquery
SFSquery 1.1
This tool is great to use when setting buffers on your HD, the cache misses line and the % section is the important part here and if its missing caches (the one in the example misses 0% so thats good and its currently using 1000 in buffers, set buffers in MTB on each partition and experiment to find the best value but keep in mind it uses memory so don't add more than is needed. (Partition in the example is 1GB big)
4.2. Undelete / trashcan:
If you deleted a file or several which you really need to get back then SFS can do this but its default is only the last 360 files deleted (any size as long as there was enough space on the drive when deleted).
To gain access to the undelete dir open a shell and type the name of the partition where the file(s) was placed and press enter and then type .recycled to go into the dir.
(I recommend you to use Directory Opus or other file managers for this as it's a bit tiresome to do the file management from shell) Editors note: nothing wrong with a shell :P
In the example that follows I deleted my yam Address Book (uhoh) and I want to restore it.
11.Ram:> os4:
11.OS4:> .recycled
11.OS4:.recycled> dir
.addressbook
11.OS4:.recycled>
To restore this file just copy (or move) it back to where it belongs and you will have to do that manually or just use DirectoryOpus or similar.
11.OS4:.recycled>copy .addressbook yam:
11.OS4:.recycled>
--- IMPORTANT --
Please note that when you delete a file it will always go into the .recycled dir and it will say that it's deleted, but the files in .recycled will still take space on the drive though not saying so in the free space info.
Example: I deleted lots of huge files on a smaller partition and started to fill it up with new files when everything started to go very slow, this is because it has to remove the .recycled files itself and thats a slow process while doing copy /move at the same time.
Always delete files in .recycled regularly (if the files are big like ISO's and your low on space) to make sure you always have the free space which the drive says it has.
If you got a temp drive of some sort (like IBrowse cache or a download partition) which you move data back and forth to then I would recommend you look at the NORECYCLED option of SFSformat.
Finally, when using SFS always keep backups of your stuff because if SFS crashes there is no way back! so do backups.
This is just a guide and I (ToAks) am in no ways responsible for any damage, loss of data etc.
-- Additional .recycled information --
If you use SFSFormat for formatting there is a "SHOWRECYLED" option, that way you don't have to type in .recycled but can select it in the Workbench, DirOpus etc. as a normal dir entry.
Written by: ToAks
Thanks to Jörg Strohmayer and drHirudo for reading through/testing and cleaning up some typo's etc.
Edited by Darren "Ryu" Glenn
Published: 17th Febuary 2005
|