magazine logo
Welcome to the official Attitude website - Europe's #1 C64 scene disk magazine
How To Setup FUSECFS Driver?
by DJ Gruby/Oxyron

While working on "Attitude #10" I have been communicating with a bunch of individuals, requesting their support with music, graphics, articles, votesheets and opinions. Surprisingly, I was not the only one asking questions. Within one of the email messages I have received from Visac/Cult, who is one of the authors of the IDE64 project, I had been asked to write a short tutorial regarding the making of the CFS driver for FUSE working. I did not hesitate, and answered "Sure, I can do that!"

With this example I would like you to realize how easy it is to support a C64 disk magazine like "Attitude". You does not really have to be an active composer or graphic artist. You do not have to spend your whole evening with a text editor in front of your eyes if you find it too boring. But coming up with an idea, and mailing it to the editors, can be a huge help, and it will not take more than a minute, I guess. You will soon realize how much you have just helped those poor guys trying to keep the magazine alive with just a few small steps! Reassuming, if you have an idea for an interesting article, do not hesitate to let us know! If you do not have the time to write it, but if you had the time you would surely know what to write about, please share this idea with us.

After this small digression, let me now go back and focus clearly on the main subject of this text...

HOW TO SET UP FUSECFS DRIVER?

Since I have managed to set it up working correctly on my Fedora-based Linux some time ago, I thought that this would be a good idea to share my knowledge about it on the pages of "Attitude" disk magazine. Visac/Cult had assured me that there were some Linux users with IDE64, although it would be very hard to estimate their number. Well, hey guys, are you there? ;) I hope that you will find it interesting to find out more about the basic steps to set up the CFS driver for FUSE. So before you go on with the actual setup, a couple of questions might have been already come up. So let me fully introduce you to the subject of this article.

WHAT IS FUSE?

FUSE (Filesystem in Userspace) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. FUSE also aims to provide a secure method for non-privileged users to create and mount their own filesystem implementations [1].

WHAT IS FUSECFS?

FUSECFS is a CFS 0.11 filesystem driver for systems supporting FUSE, e.g. Linux, FreeBSD [2]. The FUSECFS driver allows you to access IDE64 HDD contents directly from your PC just as if you were accessing any other filesystem like ext4, ntfs, vfat, etc.

WHERE CAN I GET IT?

Currently the latest available version of FUSECFS driver is 1.1 and it can be downloaded from IDEDOS project page: http://idedos.ide64.org (check the "FUSECFS" section for the most recent download available).

The author of FUSECFS driver, Soci/Singular, emphasizes a couple of differences between the driver itself and the original IDE64 DOS, supplying us some advice regarding its usage. The first and the most important issue is that these driver fragments the filesystem quite a lot on a parallel file write. This warns us of copying more files simultaneously to an IDE64 device. Additionally there is no fragmentation avoidance built into the current version of the FUSECFS driver. But what might be considered the biggest disadvantage is the fact that special C64 filenames cannot be handled correctly and create invalid UTF-8 sequences. Furthermore filename convertion may also be a subject to change in future versions. But if all these inconveniences have not yet discouraged you from using it, please continue reading!

GET IT TO WORK!

First you need to get the latest sources of FUSE. Access the http://fuse.sourceforge.net website, and follow the "Download stable release" link. Click on the "Download Now!" button and save the file onto your local HDD. After downloading the archive access your download directory, depack the source code and start to compile it:

$ tar xzvf fuse-2.8.1.tar.gz
$ cd fuse-2.8.1
$ ./configure
$ make

That's all? Yes, that's all you need to do to have the latest version successfully compiled. Yeah, I know, that was easy... Now you are about to perform the target task...

COMPILING A DRIVER

If you have already obtained theFUSECFS driver, you can unpack it and start the compilation process, but first I recommend you to copy the downloaded file into a directory, which has been earlier used for compiling FUSE:

$ tar xjvf fusecfs-1.1.tar.bz2
$ cd fusecfs-1.1

If you had then typed "make" the right away, you would have seen a bunch of unpleasant error messages. That is because the PKG_CONFIG_PATH environment variable has not been pointing to the directory containing "fuse.pc", resulting in inability to find FUSE package. You'd better do the right thing and set up the pkg-config search path to a proper directory:

$ export PKG_CONFIG_PATH=..

Now you need to help your C compiler to find all the necessary header files. The easiest way to accomplish that is to add appropriate CFLAGS parameter to the Makefile by issuing the following command:

$ perl -i -pe 's!CFLAGS :=!CFLAGS := -I../include!' Makefile

The very last thing to do is to give some hints to a linker, so it is able to link against previously compiled FUSE libraries. Let's modify Makefile's LDFLAGS parameter using the following command:

$ perl -i -pe 's!LDFLAGS :=!LDFLAGS := -L../lib/.libs!' Makefile

Compile a driver now:

$ make

A "cfs011mount" executable should appear in your current working directory by now and it should be ready for use. You admit that the whole compilation process was very easy, don't you?

If you experience any difficulties compiling the driver, feel free to drop me an email, and we shall try to work out a proper solution together.

HOW TO USE IT?

In order to mount an HDD with IDE64 partition, use the following command:

$ cfs011mount <DEVICE_FILE> <MOUNT_POINT>

Where <DEVICE_FILE> identifies your HDD, and <MOUNT_POINT> is a directory within your filesystem. For example:

$ cfs011mount /dev/sdb /mnt/ide64

Please note that you have to provide the actual device file, not a specific partition, as the first input parameter to the "cfs011mount" utility. This requirement raises from the fact that the IDE64 filesystem stores some important data within a disk boot sector. You actually do not need to worry what kind of information is that, but in case you wonder this is: the identification string, a global disklabel, a pointer to the IDE64 partition list plus its backup, and the last disk sector address. Since the information about IDE64 DOS partition is stored within an MBR, you mount the whole disk, not just a CF-type partition, as you would normally do.

After mounting an IDE64 device you are able to browse and edit the whole disk contents just like you do with your usual PC stuff. Copy your files here and there, and when your work is done, unmount the device file with the following command:

$ fusermount -u <MOUNT_POINT>

Which in our case would be:

$ fusermount -u /mnt/ide64

CLOSING WORDS

I hope that this small article has been useful for you to get a basic understanding of FUSECFS driver, its capabilities and limitations, also to realize how easy it is to compile and use it. Special thanks must go to Soci/Singular for writing this handy piece of code being so useful for accessing the data within your IDE64 disk directly from your PC.

Regards,
DJ Gruby/Oxyron.

REFERENCES

[1] Filesystem in Userspace: http://fuse.sourceforge.net/
[2] IDEDOS Project Page: http://idedos.ide64.org/

   Add/view comments on this article (comments: 0)

SCENE GROUPS
 
OPINION POLL
Do you believe we are
able to cope with
releasing "Attitude"
on a regular basis?

yes no

 YES: 281 (70.60%)
NO:117 (29.40%) 

NEWS COMMENTS

ART COMMENTS

STATISTICS
all visits:

visits today:


website started:
23/09/2004
 
Official Webpage
of Attitude
Copyright 2004-2018
 
DJ Gruby/TRIAD