Speaking of Thin Clients...<br><br>Although this is not directly related to the Thin Client thread it is something I was impressed with.<br><br><div style="margin-left: 40px;"><a href="http://boot.kernel.org/">Boot Kernel Organization (BKO)</a><br>
</div><div class="gmail_quote"><br>BKO is based on a REALLY SMALL linux ... about 1 Megabyte.   It can be installed onto just 1 small partition of a USB, CD (or floppy if you have one).<br><br>Its sole purpose is to boot and provide you with a simple GUI menu system (see pictures  on the site) where you can select which OS you want to boot and then <b>BKO uses HTTPFS to download <u>and boot </u>that OS</b> for you.<br>
<br>NOTE:  on their website their list of supported OS and OS version is very outdated.   When you actually do this you will<br>            see Ubuntu 10.04 desktop and server, you will also see newer versions of fedora as well as other linux distributions.<br>
<br>I've started using this with virtual machines.   <br><br>I download the CD ISO and then use that to create a KVM virtual machine instance using that .ISO file.<br><br>Why?    <br><br>Well I use that 1 KVM VM instance to launch any new VM instance I might need.     Since it is only 1 Megabyte in size<br>
it boots nearly immediately.   I select which Linux distribution I want, what version and the BKO then downloads the selected OS and boots it.<br><br>It has worked great so far.   <br><div class="reply"> <p>
    Off of the BKO FAQ you should note:</p><p style="margin-left: 40px;">BKO is based on HTTPFS and it uses only valid HTTP requests.  It means, if you have HTTP access, you can boot with BKO.<br>

    Only problem that may occur is if you are behind HTTP proxy.  We plan to add support for HTTP proxy

    in near future. Stay tuned till then.

  </p>

  <p style="margin-left: 40px;">

    It is expected that you can use <b>Public DNS</b> system as BKO is configured to use Public dns servers instead of the servers

    provided by user or DHCP.  We will be soon fixing this problem.  Till then, you are expected to have public DNS access.

  </p>










</div>That 2nd paragraph <i>I think may be outdated</i> as I believe you can now install the BKO "server" locally instead of using the BKO.org servers to download from.<br><br>If you install your own BKO server locally then you "could" install all of the OS's you work with on it.    Then you could use your own BKO to select <b>and more importantly boot a pre-configured OS</b> !!!      I haven't checked but I am wondering if a Windows OS could be booted using BKO as well?<br>
<br>I'm thinking you could have something like a preconfigured Ubuntu (or fedora etc) desktop with x2go client configurations and applications already installed and then just use the BKO and their GPXE to boot the clients.<br>
<br>I haven't gotten as far as looking into installing it locally so my current workaround is to use BKO to boot then I use the python based Fabric library to automagically provision the OS with x2go, the apps I want etc.    <br>
<br>Fabric is really simple to use and lets you execute remote commands via scripts so you can for instance install x2go server or client very easily..     <br><br>After the Fabric script is done my virtual machine has the OS of my choice with all the apps and x2go installed.<br>
<br>Another interesting technology I discovered lately and tried out is USB over IP.    Perhaps this could be incorporated into a future feature for x2go server & client ???<br></div>
<h1 id="5554" name="5554" class="book-h1"></h1><h2>How To Set Up A USB-Over-IP Server And Client With Ubuntu 10.04 </h2>
<p>Version 1.0 <br>
  Author: Falko Timme <ft [at] falkotimme [dot] com> <br>
  <a href="http://twitter.com/falko" target="_blank"><img src="http://www.howtoforge.com/images/socialmedia/twitter.png" alt="" border="0" height="16px" width="16px"></a> <a href="http://twitter.com/falko" target="_blank">Follow me on Twitter</a><br>

Last edited 01/18/2010</p>
<p>This tutorial shows how to set up a USB-over-IP server with Ubuntu 
10.04 as well as a USB-over-IP client (also running Ubuntu 10.04). The <a href="http://usbip.sourceforge.net/" target="_blank">USB/IP Project</a>
 aims to develop a general USB device sharing system over IP network. To
 share USB devices between computers with their full functionality, 
USB/IP encapsulates "USB I/O messages" into TCP/IP payloads and 
transmits them between computers. USB-over-IP can be useful for virtual 
machines, for example, that don't have access to the host system's 
hardware - USB-over-IP allows virtual machines to use remote USB 
devices. </p>
<p>I do not issue any guarantee that this will work for you!</p>
<p> </p>
<h3>1 Preliminary Note</h3>
<p>This tutorial is based on 


 AliRezaTaleghani's tutorial <a href="http://www.howtoforge.com/how-to-modify-your-gnu-linux-box-to-serve-as-a-usb-over-ip-server" target="_blank">How To Modify Your Gnu/Linux Box To Serve As A USB Over IP Server</a>,
 but I've adjusted it for Ubuntu 10.04 (server and client). If you want 
to use a Windows client, please take a look at AliRezaTaleghani's 
tutorial - that part is still the same. </p>
<p>In this tutorial I use the server <span class="system"><a href="http://server1.example.com">server1.example.com</a></span> with the IP address <span class="system">192.168.0.100</span> and the client <span class="system"><a href="http://client1.example.com">client1.example.com</a></span> with the IP address <span class="system">192.168.0.101</span>, both running Ubuntu 10.04. These settings might differ for you, so you have to replace them where appropriate.</p>

<p> </p>
<h3>2 Installing And Using USB/IP On The Server</h3>
<p class="highlight">server1:</p>
<p>We can install <span class="system">usbip</span> as follows:</p>
<p class="command">aptitude install usbip</p>
<p>Afterwards we load the <span class="system">usbip</span> kernel modules:</p>
<p class="command">modprobe usbip<br>
modprobe usbip_common_mod</p>
<p>To check if they really got loaded, run:</p>
<p class="command">lsmod | grep usbip</p>
<p>The output should be similar to this one:</p>
<p class="system">root@server1:~# lsmod | grep usbip<br>
usbip                  15124  0<br>
usbip_common_mod       13605  1 usbip<br>
root@server1:~#</p>
<p>To make sure that both modules get loaded automatically whenever you boot the system, you can add them to <span class="system">/etc/modules</span>:</p>
<p class="command">vi /etc/modules</p>
<table class="" align="center" bgcolor="#cccccc" border="1" cellpadding="2" cellspacing="0" width="90%">
  <tbody><tr>
    <td class="">
      <pre>[...]
usbip
usbip_common_mod</pre>
    </td>
  </tr>
</tbody></table>
<p>Now we can start the <span class="system">usbip</span> daemon:</p>
<p class="command">usbipd -D</p>
<p class="system">root@server1:~# usbipd -D<br>
  Bind usbip.ko to a usb device to be exportable!<br>
root@server1:~#</p>
<p>Now attach a USB device that you want to export to the server - I'm using a SanDisk USB flash drive here. </p>
<p>Execute the command </p>
<p class="command">lsusb </p>
<p> to find the corresponding Vendor/Device ID which is in the form of: </p>
<p class="system">Bus XXX Device YYY: ID VendorID:DeviceID </p>
<p>The output on my server is as follows:</p>
<p class="system">root@server1:~# lsusb<br>
  Bus 001 Device 002: ID 0781:5151 SanDisk Corp. Cruzer Micro Flash Drive<br>
  Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br>
root@server1:~#</p>
<p>The Vendor/Device ID of my SanDisk USB flash drive is <span class="system">0781:5151</span>. </p>
<p>Now run</p>
<p class="command">usbip_bind_driver --list</p>
<p>The output on my server is as follows:</p>
<p class="system">root@server1:~# usbip_bind_driver --list<br>
List USB devices<br>
 - busid 1-1 (0781:5151)<br>
         1-1:1.0 -> usb-storage<br>
<br>
root@server1:~#</p>
<p>As you see, the Vendor/Device ID of my SanDisk USB flash drive (<span class="system">0781:5151</span>) corresponds to the BUSID <span class="system">1-1</span>. We need this BUSID to attach the USB device to the server:</p>

<p class="command">usbip_bind_driver --usbip 1-1</p>
<p class="system">root@server1:~# usbip_bind_driver --usbip 1-1<br>
** (process:765): DEBUG:  1-1:1.0       -> usb-storage<br>
** (process:765): DEBUG: unbinding interface<br>
** (process:765): DEBUG: write "add 1-1" to /sys/bus/usb/drivers/usbip/match_busid<br>
** Message: bind 1-1 to usbip, complete!<br>
root@server1:~#</p>
<p>That's it, we can now use the SanDisk USB flash drive on a remote <span class="system">usbip</span> client. </p>
<p>BTW, if you run...</p>
<p class="command">netstat -tap</p>
<p>... you should see that the <span class="system">usbip</span> daemon is listening on port 3240 so please make sure that this port isn't blocked by your firewall:</p>
<p class="system">root@server1:~# netstat -tap<br>
Active Internet connections (servers and established)<br>
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name<br>
tcp        0      0 *:ssh                   *:*                     LISTEN      537/sshd<br>
tcp        0      0 *:3240                  *:*                     LISTEN      762/usbipd<br>
tcp        0     52 server1.example.com:ssh <a href="http://192.168.0.199:4024">192.168.0.199:4024</a>      ESTABLISHED 667/0<br>
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      537/sshd<br>
root@server1:~#</p><br><div class="copyright-footer">Copyright © 2010 Falko Timme<br>All Rights Reserved.
</div><h1 id="5555" name="5555" class="book-h2"><font size="4">How To Set Up A USB-Over-IP Server And Client With Ubuntu 10.04 - Part 2</font></h1><ul><h3>3 Installing And Using USB/IP On The Client </h3><p class="highlight">
client1:</p><p>We must  install <span class="system">usbip</span> on the client as well:</p><p class="command">aptitude install usbip</p><p>Afterwards we load the <span class="system">vhci-hcd</span> kernel module:</p><p class="command">
modprobe vhci-hcd</p><p>To check if it really got loaded, run:</p><p class="command">lsmod | grep vhci_hcd</p><p>The output should be similar to this one:</p><p class="system">root@client1:~# lsmod | grep vhci_hcd<br>
vhci_hcd               19800  0<br>
usbip_common_mod       13605  1 vhci_hcd<br>
root@client1:~#</p><p>To make sure that the module gets loaded automatically whenever you boot the system, you can add it to <span class="system">/etc/modules</span>:</p><p class="command">vi /etc/modules</p><table class="" align="center" bgcolor="#cccccc" border="1" cellpadding="2" cellspacing="0" width="90%">

  <tbody><tr>
    <td class="">
      <pre>[...]
vhci-hcd</pre>
    </td>
  </tr>
</tbody></table><p>Now connect to the <span class="system">usbip</span> server and get a list of available USB devices:</p><p class="command">usbip -l 192.168.0.100</p><p>(<span class="system">192.168.0.100</span> is the IP address of the <span class="system">usbip</span> server.)</p>
<p>You should find the SanDisk USB flash drive in the output (BUSID <span class="system">1-1</span>):</p><p class="system">root@client1:~# usbip -l 192.168.0.100<br>
- 192.168.0.100<br>
     1-1: SanDisk Corp. : Cruzer Micro Flash Drive (0781:5151)<br>
        : /sys/devices/pci0000:00/0000:00:07.2/usb1/1-1<br>
        : (Defined at Interface level) (00/00/00)<br>
        :  0 - Mass Storage / SCSI / Bulk (Zip) (08/06/50)<br>
<br>
root@client1:~#</p><p>To attach that device to the client, run:</p><p class="command">usbip -a 192.168.0.100 1-1</p><p class="system">root@client1:~# usbip -a 192.168.0.100 1-1<br>
8 ports available</p><p class="system">port 0 attached<br>
root@client1:~#</p><p>Now run...</p><p class="command">lsusb</p><p>... and you should find the remote USB device in the output on the client:</p><p class="system">root@client1:~# lsusb<br>
Bus 001 Device 002: ID 0781:5151 SanDisk Corp. Cruzer Micro 256/512MB Flash Drive<br>
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
root@client1:~#</p><p>You can now use the remote USB device as if it was a local USB device
 (e.g. mount it, format it, write to it, read form it, etc.). </p><p> </p><h3>4 Detaching A Remote USB Device </h3><p>A remote USB device can be detached as follows:</p><p class="highlight">client1:</p><p>Run...</p><p class="command">
usbip --port</p><p>... to find out the port that the remote USB device uses on the client - in this case it's port <span class="system">00</span>: </p><p class="system">root@client1:~# usbip --port<br>
8 ports available<br>
<br>
Port 00: <Port in Use> at High Speed(480Mbps)<br>
       SanDisk Corp. : Cruzer Micro 256/512MB Flash Drive (0781:5151)<br>
       1-1 -> usbip://<a href="http://192.168.0.100:3240/1-1">192.168.0.100:3240/1-1</a>  (remote devid 00010002 (bus/dev 001/002))<br>
       1-1:1.0 used by usb-storage<br>
           /sys/class/bsg/1:0:0:0/device<br>
           /sys/class/scsi_device/1:0:0:0/device<br>
           /sys/class/scsi_disk/1:0:0:0/device<br>
           /sys/class/scsi_host/host1/device<br>
           /sys/class/usb_endpoint/usbdev1.4_ep02/device<br>
           /sys/class/usb_endpoint/usbdev1.4_ep81/device<br>
           /sys/block/sdb/device<br>
Port 01: <Port Available><br>
Port 02: <Port Available><br>
Port 03: <Port Available><br>
Port 04: <Port Available><br>
Port 05: <Port Available><br>
Port 06: <Port Available><br>
Port 07: <Port Available><br>
root@client1:~#</p><p>We need the port number to detach the device:</p><p class="command">usbip -d 00</p><p class="system">root@client1:~# usbip -d 00<br>
8 ports available</p><p class="system">port 0 detached<br>
root@client1:~#</p><p>On the server, we use the BUSID (<span class="system">1-1</span>) to bind the USB device to the local system (the <span class="system">--other</span> switch binds the device to the local system so that it is not available over the network anymore):</p>
<p class="highlight">server1:</p><p class="command">usbip_bind_driver --other 1-1</p><p class="system">root@server1:~# usbip_bind_driver --other 1-1<br>
  ** (process:7333): DEBUG: write "del 1-1" to /sys/bus/usb/drivers/usbip/match_busid<br>
  ** Message: bind 1-1 to other drivers than usbip, complete!<br>
root@server1:~#</p><p>Now go back to the client and check if the remote USB device is still available:</p><p class="highlight">client1:</p><p class="command">lsusb</p><p>If all goes well, it shouldn't be listed anymore:</p>
<p class="system">root@client1:~# lsusb<br>
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
root@client1:~#</p><p>   </p><h3>5 Links</h3><ul><li>USB/IP Project: <a href="http://usbip.sourceforge.net/" target="_blank">http://usbip.sourceforge.net/</a></li><li>Ubuntu: <a href="http://www.ubuntu.com/" target="_blank">http://www.ubuntu.com/</a></li>
</ul><br><div class="copyright-footer">Copyright © 2010 Falko Timme<br>All Rights Reserved.
</div></ul>