
Installation
============


Standalone module - you downloaded njbfs-x.x.tar.gz

In order to build the module, you need to have the kernel headers installed.
All Linux distributions should install the headers by default. The headers
are located in '/usr/include/linux' and friends.

Also make sure you have the Linux kernel 2.4.x, where x stands for the
latest release. USB support is most stable here.

Executing

    make install

as root, in the directory where you
uncompressed the archive should build and install the njbfs.o module.

    insmod njbfs

will insert the module.

If you're looking for some really neat stuff, try the autofs/automount and
njbfs combination. Run 'make install_automount' and you'll get an
automountable '/mnt/njbfs' directory.

If you're not up to playing with the automounter (you really should :), here are the mount commands to mount your NJB. 

    mount -t njbfs -o dir=tracks    none /mnt/njbfs/tracks
    mount -t njbfs -o dir=playlists none /mnt/njbfs/playlists
    mount -t njbfs -o dir=albums    none /mnt/njbfs/albums
    mount -t njbfs -o dir=artists   none /mnt/njbfs/artists

And for those who do not like typing those long commands, put these in your /etc/fstab

    none /mnt/njbfs/tracks njbfs dir=tracks 0 0
    none /mnt/njbfs/playlists njbfs dir=playlists 0 0
    none /mnt/njbfs/albums njbfs dir=albums 0 0
    none /mnt/njbfs/artists njbfs dir=artists 0 0


[Note: Most Linux distros will try to mount all entries in /etc/fstab on boot. You may or may not like the results.] 


If you have 'usbmgr' running, I recommend automatic installation of 'njbfs'
when you plug the device into the computer. Edit '/etc/usbmgr/usbmgr.conf' as root
and add

# Nomad Jukebox [Creative]
vendor 0x0471 product 0x0222 module njbfs

somewhere in the category 'MP3 player'. Then execute 'rcusbmgr restart'.

You're done.

Uninstallation
==============

     umount /mnt/njbfs/tracks

as root should unmount the njbfs, and

     rmmod njbfs

removes the module from the kernel.

Of course, everything can be uninstalled: just execute 'make uninstall' or
'make uninstall_automount'.

Note:
The Makefile may fail during installation at the line  'rcautofs restart'.
The 'rc' control executables are part of the SuSe Linux distribution.
On other distributions, there are similar executables called 'service'.
Try 'service autofs restart' and the like, or consult the manuals.
