ltsp_localdev By Scott Balneaves, sbalneav@ltsp.org (Aug 5, 2004) Introduction: ltsp_localdev provides floppy and cdrom access for ltsp terminals. ltsp_localdev provides reading of CDRoms, and reading and writing to floppies. Theory of operation: An ltsp kernel containing the supermount module (http://supermount-ng.sourceforge.net/) is booted on the LTSP workstation. We chose the supermount module because unlike any of the other autmounters, it has no timeout, and the media can be ejected at any point. At this point, during the normal LTSP workstation startup, the RC file for starting local device services is started. It reads the devices that need to be exported from the lts.conf file, and loads the appropriate kernel modules, and mounts the appropriate devices using supermount. Then, the Samba filesharing program is started on the workstation. On the server, you can configure your automounter to mount and unmount the shares as needed. We used Samba because the supermount mounter doesn't work with NFS exports, but will work with Samba exports. Local device support was added in this way for several reasons. Firstly, it doesn't require any recompiling of the servers kernel, as using other access methods such as enbd would. Secondly, it allows the user to eject media whenever they want without having to wait for a timeout period. Unfortunately, using this method doesn't allow a user to format floppies, or burn CD-R's, but it is fast, efficient, and makes few demands on the server. Requirements: You must install the ltsp_localdev package. Your server must support SMB mounts (i.e. Have the smbmount command installed) Your server must also have the automounter installed. Installing ltsp_localdev: ltsp_localdev is available with the other ltsp packages via the ltspadmin utility. Configuring ltsp_localdev-0.01: ltsp_localdev currently supports "regular" floppy and cdrom drives (i.e. atapi cdrom's) as well as USB attached cdroms and floppies. Configuration is done in the lts.conf file, by specifying what the device is to share, and what the share name will be. You'll need these later on when you set up the automounter on your server platform. In the lts.conf file, for the workstation that you want to have devices in, you'll add entries like the following. We'll assume the workstation is called ws001. [ws001] LOCAL_DEVICE_01 = /dev/hdc:cdrom LOCAL_DEVICE_02 = /dev/fd0:floppy Here, LOCAL_DEVICE_01 is an atapi cdrom connected as the secondary master, and LOCAL_DEVICE_02 is the first floppy drive. We assign them share names of "cdrom" and "floppy" respectively. You should now be able to boot your workstation. Please note that if you're running a workstation that has less than 64 megs of memory in it, you'll need to turn on NFS_SWAP in your lts.conf file. On the server, you'll need to make sure that your automounter is running. On RedHat based systems, you can usually accomplish this by first turning it on with "chkconfig autofs on", then edit the files necessary. On Debian systems, make sure the "smbfs" and "autofs" packages are installed. On my system, you need to edit /etc/auto.master to look like the following: # /etc/auto.master /misc /etc/auto.misc --timeout=60 Then, you'll need to add the following lines to your /etc/auto.misc file: ws001cd -fstype=smbfs,workgroup=LTSP,guest ://ws001/cdrom ws001fl -fstype=smbfs,workgroup=LTSP,fmask=666,dmask=777,guest,username=nobody,rw ://ws001/floppy The first entry shows setting up an automount for ws001cd. The second, a little more complicated, is for a floppy. The extra options are to make sure the mount is performed correctly so that a regular user can read and write to the floppy. Notice the share names we used at the end of the line: //ws001/cdrom and //ws001/floppy. Those are the share names we configured in the lts.conf file. The entry name at the beginning indicates the direcory under /misc that we want to mount to. So, at this point, you can launch Konqueror, or whatever, and look in /misc/ws001cd or /misc/ws001fl, and you should see the contents of the CDRom and floppy (assuming you have one mounted) immediately. Note that with the supermount device driver, you should be able to eject the floppy or cdrom whenever they're idle, and not have to wait for a timeout. As a second example, here we have a DisklessWorkstations.com Jammin 150, with a cdrom and floppy attached via usb. Getting them to work is almost as easy, we simply need to add a few more module lines to turn on usb support: [ws001] MODULE_01 = usbcore MODULE_02 = usb-uhci MODULE_03 = usb-storage LOCAL_DEVICE_01 = /dev/sr0:cdrom LOCAL_DEVICE_02 = /dev/sda1:floppy Here, we've simply needed to load the usbcore module, to support the usb port, usb-uhci, as the ports on the Jammin 150 are UHCI (Uniform Host Controller Interface) usb ports, and the usb-storage module, so that the usb cdrom and floppy will be recognized. The automounter configuration would be the same as the first example.