<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Vivek and the World</title>
	<atom:link href="http://exain.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://exain.wordpress.com</link>
	<description>Linux, Open Source, Psychology, Environment, Free Energy and Technology</description>
	<lastBuildDate>Thu, 19 Nov 2009 11:46:55 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='exain.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/5b14756a5b8d8077d1d4395f73dd54e2?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Vivek and the World</title>
		<link>http://exain.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://exain.wordpress.com/osd.xml" title="Vivek and the World" />
		<item>
		<title>Booting Ubuntu without Monitor plugged in / switched off</title>
		<link>http://exain.wordpress.com/2009/11/19/booting-ubuntu-without-monitor-plugged-in-switched-off/</link>
		<comments>http://exain.wordpress.com/2009/11/19/booting-ubuntu-without-monitor-plugged-in-switched-off/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 11:46:55 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[bulletproof-x]]></category>
		<category><![CDATA[bulletproofx]]></category>
		<category><![CDATA[failsafeXserver]]></category>
		<category><![CDATA[headless]]></category>
		<category><![CDATA[save energy]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu without monitor]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=47</guid>
		<description><![CDATA[There is a major issue with Ubuntu partly due to BulletproofX and the X window system, which requires the presence of a monitor for X window to start. If the monitor is switched off, or is not connected, then Ubuntu / X would not be able to detect it and thus would go into &#8220;low [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=47&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There is a major issue with Ubuntu partly due to BulletproofX and the X window system, which <strong>requires</strong> the presence of a monitor for X window to start. If the monitor is switched off, or is not connected, then Ubuntu / X would not be able to detect it and thus would go into &#8220;low graphics mode&#8221;. So, basically your GDM would not start.<br />
<P><br />
There are two scenarios in which the monitor is not connected / switched off<br />
<P></p>
<ol>
<li> You wish to save energy and thus switch off the monitor, and then remotely reboot the machine
<li> You have Ubuntu running as a Server and thus no dedicated monitor is connected to it and you remotely reboot the machine. Specially, if you have automatic login enabled along with Remote Desktop (vino/vnc) enabled, and rely on Network Manager to start your session (through Wifi perhaps). In this case, Ubuntu would go into low graphics mode, and your network manager would not be able to assign you an IP, and you have lost complete remote access to the machine. Isn&#8217;t it pathetic?
</ol>
<p><P><br />
I am still not aware on how to take care of the first part, that is, monitor switched off intentionally by you.<br />
<P><br />
However, if you are running Ubuntu as a server and have/need a GUI, then the solution is here. Thanks to <strong>nikgare</strong> / http://ubuntuforums.org/showpost.php?p=7681232&amp;postcount=8 for the pointer.</p>
<ol>
<li> Modify <code>/etc/X11/xorg.conf</code> and remove all content and add the following<BR><br />
<code>Section "Device"<br />
    Identifier     "Configured Video Device"<br />
    Driver         "vesa"<br />
EndSection</p>
<p>Section "Monitor"<br />
    Identifier     "Generic Monitor"<br />
    HorizSync 58-62<br />
    VertRefresh 75-117<br />
EndSection</p>
<p>Section "Screen"<br />
    Identifier     "Default Screen"<br />
    Device         "Configured Video Device"<br />
    Monitor        "Generic Monitor"<br />
    DefaultDepth    24<br />
    SubSection     "Display"<br />
        Depth       24<br />
        Modes      "1024x768"<br />
    EndSubSection<br />
EndSection<br />
</code></p>
<li>You also may want to disable Bulletproof-X by modify /etc/gdm/gdm.conf and commenting out the line<BR><br />
<code>#FailsafeXServer=/etc/gdm/failsafeXServer </code>
</ol>
<p><P><br />
Now reboot, and X would start without monitor plugged in. </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=47&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2009/11/19/booting-ubuntu-without-monitor-plugged-in-switched-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Skype Video on Ubuntu 64 Bit</title>
		<link>http://exain.wordpress.com/2009/06/15/skype-video-on-ubuntu-64-bit/</link>
		<comments>http://exain.wordpress.com/2009/06/15/skype-video-on-ubuntu-64-bit/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 13:35:49 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[skype 64bit]]></category>
		<category><![CDATA[skype 64bit video]]></category>
		<category><![CDATA[skype green video]]></category>
		<category><![CDATA[ubuntu 64bit]]></category>
		<category><![CDATA[video on linux skype]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=44</guid>
		<description><![CDATA[I was very happy when I had got my new Core 2 Duo E8400 processor. I immediately installed Ubuntu Jaunty 9.04 64Bit on it. Everything I wanted to use worked, except Skype.  After a lot of research, I did manage to install Skype, but the Video always gave a green screen, and crashed when I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=44&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was very happy when I had got my new Core 2 Duo E8400 processor. I immediately installed Ubuntu Jaunty 9.04 64Bit on it. Everything I wanted to use worked, except Skype.  After a lot of research, I did manage to install Skype, but the Video always gave a green screen, and crashed when I started the video. Here&#8217;s how to make it work successfully.</p>
<ol>
<li>Download the Skype for 64Bit Ubuntu OS. It is not a true 64Bit version, but manages the dependencies well. <a title="Skype for 64Bit Linux OS" href="http://www.skype.com/go/getskype-linux-ubuntu-amd64">http://www.skype.com/go/getskype-linux-ubuntu-amd64</a></li>
<li>Sign In to Skype and see all works as per requirements. You may need to go to Skype Options and fiddle with the Audio settings and select your audio card instead of pulseaudio.</li>
<li>Through Synaptic, install <strong>lib32v4l</strong>. Through console, you can do <strong>apt-get install lib32v4l</strong></li>
<li>Download <a title="Skype start script for video on 64bit Linux" href="http://exain.com/uploads/skype.start" target="_blank"><strong>skype.start</strong> script</a> (right click and select <em>Save Link As</em>) and save it in the <strong>/usr/bin</strong> directory. You may need root privileges for that. Otherwise save it on your Desktop, and use it to run Skype with Video compatibility. The privileges of the script need to be made executable. Through console you can do <strong>chmod 755 /path/to/skype.start</strong> and through GUI you can right click on the file, select Properties and under the Permissions tab, select &#8220;Allow executing file as program&#8221;. Remember, you need to start <strong>skype.start</strong> and not <strong>skype</strong> for the video to work.</li>
</ol>
<p>The new version of Skype probably will fix the issues. There has been a <a title="Skype on Linux Discussion - Year 2009" href="http://share.skype.com/sites/linux/2009/01/skype_for_linux_updates.html">long thread on Skype Forums regarding Linux </a>this where the developers have promised that it will be out &#8220;Real Soon Now(tm)&#8221;. However, a month and a half has passed. Regardless, the solution works for voice and video both, and I&#8217;m happy using it.</p>
<p>And yes, if you need the content of the <strong>skype.start</strong> script, here it is</p>
<pre>#!/bin/bash
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype</pre>
<p>Have fun Skyping!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=44&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2009/06/15/skype-video-on-ubuntu-64-bit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Auto shutdown KVM Virtual Machines on system shutdown</title>
		<link>http://exain.wordpress.com/2009/05/22/auto-shutdown-kvm-virtual-machines-on-system-shutdown/</link>
		<comments>http://exain.wordpress.com/2009/05/22/auto-shutdown-kvm-virtual-machines-on-system-shutdown/#comments</comments>
		<pubDate>Fri, 22 May 2009 08:13:17 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[auto shutdown]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[shutdown]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual machines]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=38</guid>
		<description><![CDATA[I have been  using KVM for virtualization for quite some time now, probably more than a year. Though the initial use was on the servers which were rarely shutdown, now I&#8217;ve started using it in my home envir0nment where frequent restarts or shutdowns are there. The challenge that I faced was to automatically shutdown the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=38&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have been  using <a title="KVM on Wikipedia" href="http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine">KVM</a> for virtualization for quite some time now, probably more than a year. Though the initial use was on the servers which were rarely shutdown, now I&#8217;ve started using it in my home envir0nment where frequent restarts or shutdowns are there. The challenge that I faced was to automatically shutdown the KVM virtual machines when the system was shutdown or restarted.</p>
<p>Thanks to Joern at <a href="http://www.linux-kvm.com/content/stop-script-running-vms-using-virsh">linux-kvm.com</a>, I was able to setup a script which does an auto shutdown of the Linux (basically any VM which has ssh available) machines. I am using it on Ubuntu 9.04 (Jaunty Jackalope) 64 Bit Desktop edition.</p>
<h3>Steps</h3>
<ol>
<li>Add the host file entries</li>
<li>Make sure you are able to do ssh without entering any password from root into the VMs</li>
<li>Put the script into the /etc/init.d directory.</li>
<li>Test the script before rebooting the system</li>
<li>Reboot the system to check if it worked</li>
</ol>
<h2><span id="more-38"></span></h2>
<h2>The Host File Entries</h2>
<p>The VM should  have a static IP, and not through DHCP. The VM name should be added into the <strong>/etc/hosts</strong> file. If you have a VM named Crayon with IP Address 172.16.0.5, then add the entry in the host file like the following</p>
<pre>172.16.0.5            Crayon</pre>
<p>This is important as I&#8217;m doing it through ssh, so I need to ssh into the domain by its name.</p>
<h2>Doing ssh into the VMs through root without password</h2>
<p>This is out of the scope of this document. You can look at the <a href="http://www.linuxconfig.org/Passwordless_ssh">&#8220;Passwordless ssh&#8221; post by Adam Monsen</a> on <a href="http://www.linuxconfig.org">linuxconfig.org</a></p>
<p>Just make sure, through the root login you are able to ssh into your VM without entering the password. Try it a few times.  You may need to set the root password through <strong>sudo passwd</strong> on your Ubuntu machine.</p>
<h2>The Script</h2>
<p>I have modified the script provided by <a href="http://www.linux-kvm.com/content/stop-script-running-vms-using-virsh">Joern</a>. I used ssh instead of &#8220;virsh shutdown domain&#8221; because &#8220;virsh shutdown&#8221; didn&#8217;t work at all for the Ubuntu 8.04 Server VM that I had, and for Ubuntu 9.04 Desktop VM it opened up the dialog where it asks what to do (Shutdown/Suspend/Restart etc.). It didn&#8217;t suit me well, thus I used the ssh method</p>
<p>Put the following script into <strong>/etc/init.d/shutdownvm</strong></p>
<pre>#!/bin/bash

# Original Author :
#    Joern http://www.linux-kvm.com/content/stop-script-running-vms-using-virsh
#
# Modified by : Vivek Kapoor http://exain.com
# Date: 22 May 2009

# Parameters you can modify :: START

TIMEOUT=90
LISTFILE=/root/runvm.lst
LOGFILE=/var/log/kvmshutdown.log
# Parameters you can modify :: STOP

PS=/bin/ps
SSH=/usr/bin/ssh
GREP=/bin/grep
CUT=/usr/bin/cut
VIRSH=/usr/bin/virsh
TR=/usr/bin/tr
CAT=/bin/cat
DATE=/bin/date

# Function to shutdown the virtual machine
kvmshutdown () {
COUNT=0
PID=$($PS ax|$GREP $1|$GREP kvm|$CUT -c 1-6)

echo kvmshutdown \: Shutting down $1 with pid $PID

#$VIRSH shutdown $1
$($SSH root@$1 halt)

while [ "$COUNT" -lt "$TIMEOUT" ]
do
 $PS --pid $PID
 if [ "$?" -eq "1" ]
 then
 return 0
 else
 sleep 5
 COUNT=$(($COUNT+5))
 fi
done

echo kvmshutdown \: Timeout happened. Destroying VM $1

$VIRSH destroy $1

return 1

}

# The program begins here

$VIRSH list 2&gt;/dev/null|$GREP running|$TR -s \ |$CUT -f3 -d\  &gt; $LISTFILE

VMN=`$CAT $LISTFILE`

for vm in $VMN
do
 echo "$vm" is running
 kvmshutdown "$vm"
 if [ "$?" -eq "0" ]
 then
 echo VM "$vm" normally shutdown
 echo `$DATE +%Y-%m-%d\ %H:%M:%S` VM $vm normally shutdown &gt;&gt; $LOGFILE
 else
 echo VM "$vm" destroyed !
 echo `$DATE +%Y-%m-%d\ %H:%M:%S` VM $vm destroyed &gt;&gt; $LOGFILE
 fi;
done</pre>
<p>Now for some more activities so that it initializes on halt and reboot</p>
<ol>
<li><strong>chmod 755 /etc/init.d/shutdownvm</strong></li>
<li><strong>cd /etc/rc0.d<br />
ln -s ../init.d/shutdownvm K18shutdownvm</strong></li>
<li><strong>cd /etc/rc6.d<br />
ln -s ../init.d/shutdownvm K18shutdownvm</strong></li>
</ol>
<p>I am using <strong>K18</strong> as the kvm is having K20 value, and the above script should execute before kvm.</p>
<p>The beauty of the script by Joern is, it keeps on checking if the process has shutdown. So it will not wait for the complete Timeout value &#8211; in case the machine is shutdown earlier, it will proceed further. This I found to be great.</p>
<h2>Testing the scripts</h2>
<p>You may want to comment out &#8220;<strong>virsh destroy $1</strong>&#8221; in the script while you are testing it.</p>
<p>Using root, run the script <strong>/etc/init.d/shutdownvm</strong></p>
<p>Keep on doing it as long as you don&#8217;t get the desired results. You probably would need to start your VMs a number of times to test it completely.</p>
<h2>Reboot the system</h2>
<p>Once you are satisfied that it is working as per your requirements, reboot the system. Prior to that you may want to uncomment the &#8220;<strong>virsh destroy $1</strong>&#8221; line in the script. While the system is rebooting, quickly try to shift to terminal 7 by pressing ALT+7. You should see the virtual machines being shutdown from there. If it doesn&#8217;t work successfully, you may need to do some more testing &#8211; probably the ssh connections are not getting established correctly as it is asking for password.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=38&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2009/05/22/auto-shutdown-kvm-virtual-machines-on-system-shutdown/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Searches in Google show all sites to be Harmful</title>
		<link>http://exain.wordpress.com/2009/01/31/searches-in-google-show-all-sites-to-be-harmful/</link>
		<comments>http://exain.wordpress.com/2009/01/31/searches-in-google-show-all-sites-to-be-harmful/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 15:16:03 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=33</guid>
		<description><![CDATA[Probably a bug in Google&#8217;s search engine (http://www.google.co.in), all the searches showed the message &#8220;This site may harm your computer.&#8221; today, 31 January 2009 20:22 Hrs IST (GMT +0530). I thought, one of the rare things like this should be on a blog  
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=33&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Probably a bug in Google&#8217;s search engine (<a title="Google India" href="http://www.google.co.in">http://www.google.co.in</a>), all the searches showed the message &#8220;<strong>This site may harm your computer.</strong>&#8221; today, 31 January 2009 20:22 Hrs IST (GMT +0530). I thought, one of the rare things like this should be on a blog <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="wp-caption alignnone" style="width: 567px"><img title="Google Searches" src="http://exain.com/uploads/Google_Harmful.png" alt="Google India - All Sites are Harmful for your Computer" width="557" height="440" /><p class="wp-caption-text">Google India - All Sites are Harmful for your Computer</p></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=33&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2009/01/31/searches-in-google-show-all-sites-to-be-harmful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://exain.com/uploads/Google_Harmful.png" medium="image">
			<media:title type="html">Google Searches</media:title>
		</media:content>
	</item>
		<item>
		<title>Howto &#8211; Fujitsu U1010 (U810) UMPC and Ubuntu Linux 8.04 Hardy Heron</title>
		<link>http://exain.wordpress.com/2008/10/22/howto-fujitsu-u1010-u810-umpc-and-ubuntu-linux-804-hardy-heron/</link>
		<comments>http://exain.wordpress.com/2008/10/22/howto-fujitsu-u1010-u810-umpc-and-ubuntu-linux-804-hardy-heron/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 15:15:00 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=25</guid>
		<description><![CDATA[Few weeks back I purchased a Fujitsu U1010 (U810 in US market). It ran Windows Vista. Though I have been using Ubuntu for all my computing needs, I thought let the UMPC run Windows much like my Nokia runs Symbian. However, in a matter of few days I got fedup with Vista and decided to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=25&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Few weeks back I purchased a Fujitsu U1010 (U810 in US market). It ran Windows Vista. Though I have been using Ubuntu for all my computing needs, I thought let the UMPC run Windows much like my Nokia runs Symbian. However, in a matter of few days I got fedup with Vista and decided to install Ubuntu 8.04 &#8211; there were challenges, and fortunately with the help of some good souls on internet, I overcame majority of them. Now the UMPC is running full-time Ubuntu Linux.</p>
<p><strong>Disclaimer</strong></p>
<p>The steps mentioned below may not be suitable from security point of view. Please use them at your own discretion.  I take no responsibility for anything done to your machine by following the instructions below.</p>
<p><strong>Tasks covered</strong></p>
<ol>
<li>Installation of Operating System</li>
<li>Touchscreen Configuration using evtouch &#8211; Not perfect though</li>
<li>Switching On/Off of Keyboard Lights/LEDs/Headlights</li>
<li>Rotating the screen</li>
<li>Associating the keys <strong>/</strong> , <strong>//</strong> , and <strong>Screen Rotate</strong> on the panel with their desired functions, that is, switching on keyboard lights, running handwriting recognition application and rotating the screen.</li>
<li>Using the Webcam &#8211; still painful</li>
<li>Putting the system into suspend and recovering from it successfully.</li>
</ol>
<p><strong>Much Thanks to</strong></p>
<ol>
<li><strong>Julian Brown</strong> &#8211; <a href="http://panic.cs-bristol.org.uk/~jules/fujitsu-u810-debian-install-notes.html">http://panic.cs-bristol.org.uk/~jules/fujitsu-u810-debian-install-notes.html</a> &#8211; Without him, the most important feature for me, the Keyboard lights, would not have worked.</li>
<li><strong>Nathan Eckenrode</strong> (n8k99) and <strong>LordOfThePigs</strong> &#8211; <a href="http://so.nacreo.us/2007/12/touch-me-i-sick.html">http://so.nacreo.us/2007/12/touch-me-i-sick.html</a> &#8211; For touchscreen configuration and a shell script for screen rotation</li>
<li><strong>zmiq2</strong> &#8211; <a href="http://www.umpcportal.com/modules/newbb/viewtopic.php?topic_id=2202&amp;forum=16&amp;post_id=16973">http://www.umpcportal.com/modules/newbb/viewtopic.php?topic_id=2202&amp;forum=16&amp;post_id=16973</a> &#8211; For an excellent tip on Suspend and Resume.</li>
</ol>
<p><span id="more-25"></span></p>
<p>So, we begin</p>
<hr /><strong>Installation of the OS</strong></p>
<p>I chose Ubuntu 8.04. Why? because it is a Long Term Support release, having a kernel which supports keyboard lights and was a stable release at the time of preparing this document. Intrepid Ibex/8.10 would have come at end of October 2008, which was too late for me.</p>
<p><strong>Steps</strong></p>
<ol>
<li>Download the Desktop ISO from <a href="http://www.ubuntu.com/getubuntu/download">http://www.ubuntu.com/getubuntu/download</a></li>
<li>Download unetbootin &#8211; <a href="http://unetbootin.sourceforge.net/">http://unetbootin.sourceforge.net/</a></li>
<li>Take a USB Pen Drive or SD Card.</li>
<li>Using unetbootin, select the ISO and copy it to the USB drive/SD Card. Preferably the Pen drive/SD Card shall be formatted in FAT32/FAT16 (the default format in which they come).</li>
<li>Once done, reboot the UMPC. While booting press Enter and select &#8216;Boot Menu&#8217;. If it doesn&#8217;t show the USB Drive, then it would not be enabled in the BIOS. Go into the BIOS and enable the USB Drive.</li>
<li>Booting from the SD Card slot would not work, but SD Card connected via a USB Card Reader would work.</li>
<li>Once you&#8217;re able to boot, just do the usual Ubuntu Installation.</li>
<li>Graphic card, audio, wifi, card reader and bluetooth work out of the box.</li>
</ol>
<hr /><strong>Touchscreen Configuration using evtouch</strong></p>
<p>Touchscreen works, but not as desired. The sensitivity is very low and somethings happens to it when power adapter is connected. You would not be able to use it smoothly, and forget handwriting recognition, though we&#8217;ll install the required applications.</p>
<ol>
<li>In the BIOS set the mode as touch screen instead of tablet. Please note, if you plan to use Windows alongside Linux, then setting this mode will prevent you from using handwriting recognition in Windows.</li>
<li>Install the evtouch driver through synaptic.</li>
<li>Take a backup of /etc/X11/xorg.conf file and replace it with the one available here &#8211; <a title="xorg.conf - right click and select SZave Link As" href="http://exain.com/uploads/xorg.conf" target="_blank">xorg.conf</a></li>
<li> Restart X by logging out and pressing CTRL+ALT+Backspace</li>
<li>Now the touchscreen should be working. It will work better if the UMPC is not connected to the power adapter.</li>
<li>Install cellwriter through Synaptic. It may require little bit of training before you can start using it.</li>
<li>Thank you Nathan Eckenrode and LordOfThePigs (<a href="http://so.nacreo.us/2007/12/touch-me-i-sick.html">link</a>)</li>
</ol>
<p>I had also tested the <strong>u810_tablet</strong> as was mentioned by Julian Brown <a href="http://panic.cs-bristol.org.uk/~jules/fujitsu-u810-debian-install-notes.html">here</a>, but it didn&#8217;t used to work after doing suspend, and also after screen rotation. The above method seemed to be more reliable.</p>
<hr /><strong>Switching On/Off of Keyboard Lights/LEDs/Headlights</strong></p>
<p>This was the most important thing for me and I learnt a lot about kernels while attempting this. And it works wonderfully.</p>
<p>The basics</p>
<ol>
<li>Julian Brown has written a patch for the fujitsu-laptop module in the kernel. However, as of writing this section, that patch has not been incorporated into the mainstream kernel which is targeted more towards the Fujitsu P and T series.</li>
<li>The said patch enables the keyboard light functionality and a small application which toggles the light on and off.</li>
<li>I will provide pre-compiled kernel module for those not too technically inclined, and instructions to compile it yourself for your kernel.</li>
</ol>
<p><strong>Please note: </strong>I am using Ubuntu 8.04 without the backports repository enabled. The kernel versions thus would be limited to what&#8217;s available in the regular repository. You can set the repositories via synaptic.</p>
<p><strong>Pre-compiled Binaries</strong></p>
<ol>
<li>For Kernel <strong>2.6.24-19-generic</strong>. You can check the kernel version by opening a terminal and typing <tt>uname -r</tt></li>
<li>Download the file <a href="http://exain.com/uploads/fujitsu-laptop.ko">fujitsu-laptop.ko</a> and put it in the directory <strong>/lib/modules/2.6.24-19-generic/kernel/drivers/misc</strong> &#8211; replace the one available, it doesn&#8217;t do much anyway.</li>
<li>Download the <a title="Thanks to Julian Brown" href="http://exain.com/uploads/toggle-kbd-light">toggle-kbd-light</a> application and put it in <strong>/usr/bin</strong> directory. Make it executable and set suid bit by <tt>chown root.root /usr/bin/toggle-kbd-light</tt> and <tt>chmod 6755 /usr/bin/toggle-kbd-light</tt></li>
<li>Move to section &#8216;Adding the Modules&#8217; to start using it.</li>
</ol>
<p><strong>Compiling it from source</strong></p>
<ol>
<li>You would need kernel-headers package for your kernel which you can download from synaptic. I think it comes by default.</li>
<li>Install build-essential package from synaptic.</li>
<li>Create a directory called fujitsu and copy the file <a href="http://exain.com/uploads/fujitsu-laptop.c" target="_blank">fujitsu-laptop.c</a> in it.</li>
<li>In the same fujitsu directory, create a file called <strong>Makefile</strong> and put the following content in it</li>
</ol>
<blockquote><p><tt>obj-m := fujitsu-laptop.o<br />
KDIR := /lib/modules/`uname -r`/build/<br />
PWD := $(shell pwd)<br />
default:<br />
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules</tt></p></blockquote>
<ol>
<li> Now in the terminal go into the fujitsu directory where fujitsu-laptop.c and Makefile are present, and type <strong>make</strong></li>
<li>It will create a fujitsu-laptop.ko file amongst others which you can transfer to /lib/modules/{your kernel version}/kernel/drives/misc</li>
<li>Please note that you have to do it everytime when you update the kernel.</li>
<li>Download the <a title="Thanks to Julian Brown" href="http://exain.com/uploads/toggle-kbd-light">toggle-kbd-light</a> application and put it in <strong>/usr/bin</strong> directory. Make it executable and set suid bit by <tt>chown root.root /usr/bin/toggle-kbd-light</tt> and <tt>chmod 6755 /usr/bin/toggle-kbd-light</tt></li>
<li>Much thanks to Julian Brown. You can find the source and patches available <a href="http://panic.cs-bristol.org.uk/~jules/fujitsu-u810-debian-install-notes.html">here</a>.</li>
</ol>
<p><strong>Adding the modules</strong></p>
<ol>
<li>The modules are not loaded by default. Add the following in /etc/modules<br />
led-class<br />
fujitsu-laptop</li>
<li>You can now reboot the system. Once the system has been rebooted, type <strong>toggle-kbd-light </strong>to switch the light on and off.</li>
</ol>
<hr /><strong>Rotating the screen</strong></p>
<p>The easiest thing to do. It is enabled through <strong>xrandr</strong> command.</p>
<ol>
<li>xrandr -o left  # For left</li>
<li>xrandr -o right # For right</li>
<li>xrandr -o normal # For the normal screen</li>
<li>xrandr -o inverted # For inverted screen</li>
</ol>
<p>You can use the script <a href="http://exain.com/uploads/toggle-rotate" target="_blank">toggle-rotate</a> and put it in <strong>/usr/bin</strong> directory. Make it executable by <tt>chmod 755 /usr/bin/toggle-rotate</tt></p>
<p>Now whenever  you call toggle-rotate, it will take the current screen orientation and rotate it to the next available orientation.</p>
<p><strong>Tip:</strong> To make it easier to do the rotation specially when you know which orientation you require, create a few shortcuts in your gnome-panel (<a title="Fujitsu u1010 running Ubuntu" href="http://exain.com/uploads/Fujitsu-u1010_u810_Screenshot_Ubuntu.png">screenshot here</a>) which have the commands xrandr mentioned (as above).</p>
<hr /><strong>Associating the keys </strong><strong>/ , </strong><strong>// , and </strong><strong>Screen Rotate on the panel</strong></p>
<ol>
<li>Through synaptic install cellwriter application which will used for handwriting recognition. You may not be able to use it successfully though and need to spend some time on it.</li>
<li>To detect the keys, the module <strong>fsc_btns</strong> needs to be loaded. Unfortunately I am not able to recall how I made it functional, but here are few hints
<ol>
<li>Visit <a href="http://fjbtndrv.wiki.sourceforge.net/" target="_blank">http://fjbtndrv.wiki.sourceforge.net/</a> and look at the Installation manual available there.</li>
<li>Visit <a href="http://fjbtndrv.wiki.sourceforge.net/packages" target="_blank">http://fjbtndrv.wiki.sourceforge.net/packages</a> and look at the  options for Ubuntu Hardy. I tried following the instructions, but the page maintained at <a href="http://home.versanet.de/~khnz15" target="_blank">http://home.versanet.de/~khnz15</a> does not exist anymore <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </li>
</ol>
</li>
<li>Once you are able to load fsc_btns module, then the process is comparatively easy. Create a file <strong>.xbindkeysrc</strong> in your home directory and put the following in there.</li>
<blockquote><p>#Lights<br />
&#8220;toggle-kbd-light&#8221;<br />
m:0&#215;0 + c:105</p>
<p>#Screen Rotation<br />
&#8220;toggle-rotate&#8221;<br />
m:0&#215;0 + c:203</p>
<p>#Handwriting Recognition<br />
&#8220;cellwriter&#8221;<br />
m:0&#215;0 + c:99</p></blockquote>
<li>Now run xbindkeys and check that clicking on the / button shall switch on the keyboard headlights, the // button shall open up the cellwriter application and the Screen Rotate key shall rotate the screen.</li>
<li>The Window (Super Key) that is there on your keyboard is anyways useless, so let us convert that to a TAB key which shall make the task of working on your system a bit easier since you would not have to press Fn+Space to use a TAB.</li>
<li>Create a file <strong>.xmodmaprc</strong> in your home directory and put the following line in it</li>
<blockquote><p>keysym Super_L = Tab</p></blockquote>
<li>Run xmodmap and now you can use the Super Key as the TAB key. However, I am not sure why, but this combination does not work for ALT+TAB <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </li>
<li>Now let us put all of this in the system startup so that they execute every time the system starts.
<ol>
<li>Go to Systems -&gt; Preferences -&gt; Sessions</li>
<li>Under the startup applications, click Add &#8211; you need to do this thrice since there are three applications that we will initialize. Under the command, enter</li>
<blockquote><p>cellwriter<br />
xbindkeys<br />
xmodmap ~/.xmodmaprc</p></blockquote>
</ol>
</li>
</ol>
<p>Logout and log back in and it should be functioning.</p>
<hr /><strong>Using the webcam &#8211; it functions, but not as desired<br />
</strong></p>
<p>Though I was able to use the webcam successfully, but the changes don&#8217;t persist across reboots. The image appears upside down, and you have to follow the steps exactly as I mention below to use it as desired.</p>
<ol>
<li>The webcam drivers that come by default don&#8217;t function too well. It is a Ricoh webcam. You need to download and compile the drivers from <a href="http://wiki.mediati.org/Installation" target="_blank">http://wiki.mediati.org/Installation</a></li>
<li>Certainly, in the above website the packages are available for Hardy. You can use them too, but they are available for Kernel 2.6.24-21 which we are not using. It is available in the backports repository. There is no problem using them, but then you need to compile the keyboard lights (fujitsu-laptop) module on your own since I am not using the backports repository.</li>
<li>Install subversion from synaptic.</li>
<li>On a terminal, type <code>svn co http://svn.mediati.org/svn/r5u870/trunk r5u870</code></li>
<li>After the process is done, you will see a <strong>r5u870</strong> directory. Go inside that directory.</li>
<li>Type <code>make</code> and <code>make install</code></li>
<li>This shall create the driver and you can now load it through <code>modprobe r5u870</code></li>
<li>Add the following in /etc/modules</li>
<blockquote><p>r5u870<br />
uvcvideo</p></blockquote>
<li>Reboot the system. The drivers should be loaded automatically now. You can check that by typing <code>lsmod | grep r5</code></li>
<li>Install xawtv through synaptic.</li>
<li>Run xawtv &#8211; it shall open up a pop-up. Click OK. Now right click on the xawtv window, it will display a window. Do a Vertical Flip and it shall immediately display your picture via the webcam and is in the correct orientation.</li>
<li>Now you can close xawtv. The webcam will now function in Ekiga and Skype without problems. I was randomly able to make it work in gnome&#8217;s Cheese also.</li>
<li><strong>Please note that if you put the system to suspend, then you will not get the option of flipping the screen vertically, which would lead to an inverted image. It shall be done before the system is put to suspend, that is, on a fresh reboot. </strong></li>
</ol>
<hr /><strong>Putting the system into suspend and recovering from it successfully</strong></p>
<p>Much thanks to <strong>zmiq2</strong> regarding this.</p>
<ol>
<li>In the file <strong>/etc/default/acpi-support</strong>, search for the line starting with &#8216;MODULES&#8217; and replace it with</li>
<blockquote><p>MODULES=&#8221;ath_pci r5u870 uvcvideo videodev v4l1_compat v4l2_common&#8221;</p></blockquote>
<li>In the file <strong>/usr/lib/pm-utils/default</strong>, add the following</li>
<blockquote><p>SUSPEND_MODULES=&#8221;ath_pci ath_rate_sample ath_hal r5u870 uvcvideo videodev v4l1_c<br />
ompat v4l2_common&#8221;</p></blockquote>
<li> Now close the screen of the UMPC and it shall go into suspend. After you open the screen, the PC shall return from suspend and ask for the password.</li>
<li>It has been working wonderfully till now and I have kept it on suspend for more than 10 days without a reboot, and no problems. Everything works, including the Video.</li>
</ol>
<hr /><strong>What I was not able to do</strong></p>
<ol>
<li>Making the internal microphone work.</li>
<li>Making the Fn, the two arrow keys, and the CTRL+ALT+DEL key work.</li>
<li>Make the Fingerprint Scanner work.</li>
</ol>
<p>That is all. It is serving all the desired purpose for me till now. Everything is working absolutely fine and since I put the system to suspend only, the webcam issue doesn&#8217;t trouble me much. Hope, by reading this article, you would go through comparatively less agony.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=25&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2008/10/22/howto-fujitsu-u1010-u810-umpc-and-ubuntu-linux-804-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Thunderbird Active Directory LDAP lookups &#8211; hang issues</title>
		<link>http://exain.wordpress.com/2008/07/29/thunderbird-active-directory-ldap-lookups-hang-issues/</link>
		<comments>http://exain.wordpress.com/2008/07/29/thunderbird-active-directory-ldap-lookups-hang-issues/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 08:20:14 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[Address Book]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=21</guid>
		<description><![CDATA[I was facing a lot of issues doing LDAP lookups on my company&#8217;s LDAP server. The searches were happening but they were very very slow, so most of the times while replying to an e-mail and selecting addresses, the Thunderbird application just hung.
I am using Ubuntu 7.10 with Thunderbird 2.0.0.14 in my office which has [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=21&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was facing a lot of issues doing LDAP lookups on my company&#8217;s LDAP server. The searches were happening but they were very very slow, so most of the times while replying to an e-mail and selecting addresses, the Thunderbird application just hung.</p>
<p>I am using Ubuntu 7.10 with Thunderbird 2.0.0.14 in my office which has an Active Directory Setup. The comment as posted on <a href="http://www.linux.com/articles/114010">http://www.linux.com/articles/114010</a> with the comment permalink being <a href="http://www.linux.com/?module=comments&amp;func=display&amp;cid=1147932">http://www.linux.com/?module=comments&amp;func=display&amp;cid=1147932</a></p>
<p>The solution for me was, just using <strong>Port 3268</strong> instead of Port 389 which is common for LDAP. I am a happy man now <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exain.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exain.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=21&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2008/07/29/thunderbird-active-directory-ldap-lookups-hang-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Locations in India &#8211; GPS Co-ordinates</title>
		<link>http://exain.wordpress.com/2008/07/17/locations-in-india-gps-co-ordinates/</link>
		<comments>http://exain.wordpress.com/2008/07/17/locations-in-india-gps-co-ordinates/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 09:00:45 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Travel]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[india]]></category>
		<category><![CDATA[locations]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=14</guid>
		<description><![CDATA[I have compiled a small list of locations which I happened to visit after purchasing my GPS device. Thought would post it online &#8211; maybe it can be of some help.





Location


City


Latitude


Longitude


Latitude


Longitude




Greater Noida Authority


Greater Noida


28° 29&#8242; 13.1634&#8243;


77° 30&#8242; 26.0634&#8243;


28.48699


77.50724




Sector 03


Greater Noida


28° 31&#8242; 58.6554&#8243;


77° 28&#8242; 44.328&#8243;


28.53296


77.47898




Damdama Lake


Haryana


28° 18&#8242; 22.644&#8243;


77° 07&#8242; 12.1074&#8243;


28.30629


77.12003




Spice World


Noida


28° 35&#8242; 12.99&#8243;


77° 20&#8242; 27.61&#8243;


28.586942


77.341003




Kasauli Castle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=14&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have compiled a small list of locations which I happened to visit after purchasing my GPS device. Thought would post it online &#8211; maybe it can be of some help.</p>
<p><span id="more-14"></span></p>
<table border="0">
<tbody>
<tr>
<td style="vertical-align:top;">
<p class="line891"><strong>Location</strong></p>
</td>
<td style="vertical-align:top;">
<p class="line891"><strong>City</strong></p>
</td>
<td style="vertical-align:top;">
<p class="line891"><strong>Latitude</strong></p>
</td>
<td style="vertical-align:top;">
<p class="line891"><strong>Longitude</strong></p>
</td>
<td style="vertical-align:top;">
<p class="line891"><strong>Latitude</strong></p>
</td>
<td style="vertical-align:top;">
<p class="line891"><strong>Longitude</strong></p>
</td>
</tr>
<tr>
<td>
<p class="line862">Greater Noida Authority</p>
</td>
<td>
<p class="line862">Greater Noida</p>
</td>
<td>
<p class="line862">28° 29&#8242; 13.1634&#8243;</p>
</td>
<td>
<p class="line862">77° 30&#8242; 26.0634&#8243;</p>
</td>
<td>
<p class="line862">28.48699</p>
</td>
<td>
<p class="line862">77.50724</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Sector 03</p>
</td>
<td>
<p class="line862">Greater Noida</p>
</td>
<td>
<p class="line862">28° 31&#8242; 58.6554&#8243;</p>
</td>
<td>
<p class="line862">77° 28&#8242; 44.328&#8243;</p>
</td>
<td>
<p class="line862">28.53296</p>
</td>
<td>
<p class="line862">77.47898</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Damdama Lake</p>
</td>
<td>
<p class="line862">Haryana</p>
</td>
<td>
<p class="line862">28° 18&#8242; 22.644&#8243;</p>
</td>
<td>
<p class="line862">77° 07&#8242; 12.1074&#8243;</p>
</td>
<td>
<p class="line862">28.30629</p>
</td>
<td>
<p class="line862">77.12003</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Spice World</p>
</td>
<td>
<p class="line862">Noida</p>
</td>
<td>
<p class="line862">28° 35&#8242; 12.99&#8243;</p>
</td>
<td>
<p class="line862">77° 20&#8242; 27.61&#8243;</p>
</td>
<td>
<p class="line862">28.586942</p>
</td>
<td>
<p class="line862">77.341003</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Kasauli Castle Resort</p>
</td>
<td>
<p class="line862">Kasauli</p>
</td>
<td>
<p class="line862">30° 53&#8242; 56.04&#8243;</p>
</td>
<td>
<p class="line862">76° 58&#8242; 40.116&#8243;</p>
</td>
<td>
<p class="line862">30.89890</p>
</td>
<td>
<p class="line862">76.97781</p>
</td>
</tr>
<tr>
<td>
<p class="line862">NH22</p>
</td>
<td>
<p class="line862">Koti</p>
</td>
<td>
<p class="line862">30° 48&#8242; 14.112&#8243;</p>
</td>
<td>
<p class="line862">77° 00&#8242; 01.7274&#8243;</p>
</td>
<td>
<p class="line862">30.80392</p>
</td>
<td>
<p class="line862">77.00048</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Timber Trail</p>
</td>
<td>
<p class="line862">Parwanoo</p>
</td>
<td>
<p class="line862">30° 50&#8242; 09.42&#8243;</p>
</td>
<td>
<p class="line862">76° 58&#8242; 54.624&#8243;</p>
</td>
<td>
<p class="line862">30.83595</p>
</td>
<td>
<p class="line862">76.98184</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Verka Milk Bar, NH22</p>
</td>
<td>
<p class="line862">Lehli</p>
</td>
<td>
<p class="line862">30° 29&#8242; 53.9874&#8243;</p>
</td>
<td>
<p class="line862">76° 48&#8242; 13.2474&#8243;</p>
</td>
<td>
<p class="line862">30.49833</p>
</td>
<td>
<p class="line862">76.80368</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Mirchi Restaurant</p>
</td>
<td>
<p class="line862">On way to Chandigarh</p>
</td>
<td>
<p class="line862">30° 14&#8242; 02.112&#8243;</p>
</td>
<td>
<p class="line862">76° 51&#8242; 11.6634&#8243;</p>
</td>
<td>
<p class="line862">30.23392</p>
</td>
<td>
<p class="line862">76.85324</p>
</td>
</tr>
<tr>
<td>
<p class="line862">Sunil &amp; Company (Linus Air Compressor), Safdarjung Enclave</p>
</td>
<td>
<p class="line862">New Delhi</p>
</td>
<td>
<p class="line862">28° 34&#8242; 03.0&#8243;</p>
</td>
<td>
<p class="line862">77° 11&#8242; 49.4&#8243;</p>
</td>
<td>
<p class="line862">28.567501</p>
</td>
<td>
<p class="line862">77.197065</p>
</td>
</tr>
</tbody>
</table>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exain.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exain.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=14&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2008/07/17/locations-in-india-gps-co-ordinates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Doing GPS Conversion &#8211; Degrees to Latitude Longitude and vice versa</title>
		<link>http://exain.wordpress.com/2008/07/17/doing-gps-conversion-degrees-to-latitude-longitude-and-vice-versa/</link>
		<comments>http://exain.wordpress.com/2008/07/17/doing-gps-conversion-degrees-to-latitude-longitude-and-vice-versa/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 08:25:28 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[degree]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[latitude]]></category>
		<category><![CDATA[longitude]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=12</guid>
		<description><![CDATA[Converting Degrees to Latitude Longitude
INDIA is North East (NE)

The whole units of degrees will remain the same (i.e. in 121.135° longitude, start with 121°).
Multiply the decimal by 60 (i.e. .135 * 60 = 8.1).
The whole number becomes the minutes (8&#8242;).
Take the remaining decimal and multiply by 60. (i.e. .1 * 60 = 6).
The resulting number [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=12&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Converting Degrees to Latitude Longitude</strong></p>
<p>INDIA is North East (NE)</p>
<ol type="1">
<li>The whole units of degrees will remain the same (i.e. in 121.135° longitude, start with 121°).</li>
<li>Multiply the decimal by 60 (i.e. .135 * 60 = 8.1).</li>
<li>The whole number becomes the minutes (8&#8242;).</li>
<li>Take the remaining decimal and multiply by 60. (i.e. .1 * 60 = 6).</li>
<li>The resulting number becomes the seconds (6&#8243;). Seconds can remain as a decimal.</li>
<li>Take your three sets of numbers and put them together, using the symbols for degrees (°), minutes (&#8216;), and seconds (&#8220;) (i.e. 121°8&#8242;6&#8243; longitude)</li>
</ol>
<p>You can do it fast by visiting <a class="http" href="http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html">http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html</a></p>
<p><strong>Convert Degree, Minutes, Seconds to Latitude and Longitude</strong></p>
<ol type="1">
<li>latitude and longitude in a decimal format: 42.1361</li>
<li>latitude and longitude in degree, minute, second format: 42deg, 08min, 10sec</li>
<li>To convert coordinates from degrees, minutes, seconds format to decimal format, use this easy formula:</li>
<p><tt>degrees + (minutes/60) + (seconds/3600)</tt></p>
<pre>The example coordinate above would be calculated as:

42 + (8/60) + (10/3600) = 42.1361
or
42 + (.1333) + (.0028 ) = 42.1361</pre>
</ol>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exain.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exain.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=12&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2008/07/17/doing-gps-conversion-degrees-to-latitude-longitude-and-vice-versa/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Build a home of the future : Part 1 &#8211; the basics</title>
		<link>http://exain.wordpress.com/2008/07/16/build-a-home-of-the-future-part-1-the-basics/</link>
		<comments>http://exain.wordpress.com/2008/07/16/build-a-home-of-the-future-part-1-the-basics/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 20:46:39 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[home automation]]></category>
		<category><![CDATA[speech recognition]]></category>
		<category><![CDATA[text to speech]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=8</guid>
		<description><![CDATA[A selected few would want to delve into this. No, this post is not about how the houses of the future would be. For that you may visit http://news.bbc.co.uk/2/hi/europe/7348940.stm
This post is about how you, as a Linux enthusiast, can take a combination of all wonderful applications available, and leverage them to create something which defines [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=8&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A selected few would want to delve into this. No, this post is not about how the houses of the future would be. For that you may visit <a href="http://news.bbc.co.uk/2/hi/europe/7348940.stm">http://news.bbc.co.uk/2/hi/europe/7348940.stm</a></p>
<p>This post is about how you, as a Linux enthusiast, can take a combination of all wonderful applications available, and leverage them to create something which defines what you are. This is no howto, and I just skim the surface as I myself am trying to figure out how to work out all this.</p>
<p>Following is where I am coming from : You wake up in the morning, ask for the time and weather outside. The system responds back. You give voice commands to take backups of the system, check your e-mails, record voice messages, play music, make phone calls, and watch your favorite TV channels. Then you leave for office. The home is now under surveillance mode. Any activity which happens behind your back is emailed to you instantly as a video. The primary power fails and the system switches to the secondary power. There are solar cells on top of your building which are charging the batteries. You come back with some friends of yours. You put the system in silent mode and record all activity that happens. Its night time now and you go to bed. The infra-red cameras keep a watch on the house.</p>
<p>Next day is a weekend, and you plan a trip outside. You get ready your stuff and take out the mini-computer which is connected with your base station wirelessly. The mini computer has GPS inbuilt which keeps a track of where you are and communicates it back to the base station. Your backpack has solar cells which keep charging the mini-computer. You are continuously updated of what&#8217;s happening back at home.</p>
<p>All of this is possible, though with some expenditure on the hardware front. Here&#8217;s what I think you would need</p>
<p><strong>Hardware</strong></p>
<ol>
<li><strong>Base Station</strong> : A laptop/battery powered device for the base station. A desktop would also do but power consumption may be a concern. A wifi router, UPS, a set of speakers and a good microphone and internet connection would be necessary.</li>
<li><strong>Power Generation</strong> : Solar Cells, and a battery system which they can charge</li>
<li><strong>Electrical Devices Control</strong> : I&#8217;ve heard about X10 and http://www.smarthome.com &#8211; am not sure as none of them is available here (in India).</li>
<li><strong>Mini-Computer</strong> : A Gumstix motherboard with USB, Flash Memory, Wifi, GPS and LCD screen.</li>
<li><strong>Monitoring</strong> : A infra-red webcam. A wireless one would be better, but USB one would also do.</li>
<li><strong>Internet Connection</strong> : A USB based internet connection device which allows you to connect from anywhere. Shall be compatible with Linux &amp; wvdial.</li>
</ol>
<p><strong>Software</strong></p>
<ol>
<li><strong>Speech Recognition</strong> : HTK, Julius/Julian</li>
<li><strong>Text to Speech</strong> : Festival, with MBROLA</li>
<li><strong>Motion Detection</strong> : motion</li>
<li><strong>Scripting Language</strong> : PHP and bash &#8211; this will help in defining and acting upon commands</li>
<li><strong>Home Automation</strong> : Mister House</li>
<li><strong>Others</strong> : wvdial for net connection, audacity for audio recording, mail tools for sending out e-mails, Apache for providing a connectivity to base station</li>
</ol>
<p>The intention is to create a home of the future, today. I would keep on adding stuff here as and when I find time; the first one probably would be about Speech Recognition. I personally believe that the technology is available, and if used effectively, it can be really exciting.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exain.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exain.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=8&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2008/07/16/build-a-home-of-the-future-part-1-the-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Storage Nirvana &#8211; Unlimited Storage using LVM, iSCSI and AoE</title>
		<link>http://exain.wordpress.com/2008/02/10/storage-nirvana-unlimited-storage-using-lvm-iscsi-and-aoe/</link>
		<comments>http://exain.wordpress.com/2008/02/10/storage-nirvana-unlimited-storage-using-lvm-iscsi-and-aoe/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 17:32:07 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[AoE]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=7</guid>
		<description><![CDATA[This is some random test<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=7&subd=exain&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you want to have unlimited space like what google.com is doing with gmail, then here&#8217;s what you need to do. I used Ubuntu Feisty Fawn and Gutsy Gibbon to test out the solution.</p>
<ol>
<li>Setup and understand the usage of a LVM</li>
<li>Setup iSCSI or AoE for network devices so that network storage can be used easily</li>
<li>Setup RAID so that redundancy can be provided to LVM Physical Volumes</li>
</ol>
<p class="line867"><strong>Important:</strong> Following steps may corrupt your data or partitions. Use them at your own risk. Also, I have listed down the steps as I went ahead doing them. They may not be accurate in your environment or all scenarios may not be covered. I would recommend going through the entire article before attempting anything.</p>
<p class="line867">
<p><strong>Assumptions</strong></p>
<ol>
<li>You are comfortable using Linux and fdisk</li>
<li>You have backed up your data so that in case something goes wrong, nothing is lost</li>
<li>You can connect to network and have access to more than 1 Linux machine to do the testing</li>
</ol>
<p><strong>This article is not complete and does not include the iSCSI and AoE related information as of now. I am working on it and will update it soon. However, you may continue on this page and learn about the LVM</strong> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p class="line867">
<h2><span id="more-7"></span>Setup a LVM</h2>
<p class="line862">Much help from <a class="http" href="http://linuxhelp.blogspot.com/2005/04/creating-lvm-in-linux.html">http://linuxhelp.blogspot.com/2005/04/creating-lvm-in-linux.html</a></p>
<p class="line867">
<h3>Quick Steps</h3>
<ol>
<li>Identify the partitions which are to be used. These are referred to as physical volumes (pv). The steps are
<ol>
<li>Identify the partitions such as /dev/hda1, /dev/sda1 etc.</li>
<li>Set the correct partition type of Linux LVM, which is 8e</li>
<li>Format them using pvcreate</li>
</ol>
</li>
<li>Create a Volume Group (vg) which consists of the partitions identified above. THis is the place where you would add/remove partitions to increase/decrease space.</li>
<li>Creating the Logical Volumes (lv) which are partitions that you can format (using ext3 or gfs etc.).</li>
<li>Use the partitions created as per your requirements. Add them into /etc/fstab if necessary.</li>
</ol>
<p class="line874">So, diagrammatically it is something like the following</p>
<p class="line867"><img src="http://exain.com/uploads/blog/LVMDiagram.png" alt="LVM Diagram" width="600" height="438" /></p>
<p class="line867">
<h3>Analysis</h3>
<p class="line874">So the analysis is</p>
<ol>
<li>We can add/remove partitions in a volume group, that too on the fly.</li>
<li>A logical volume is created from the volume group. Its size is defined in extents.
<ol>
<li>So, whenever we want, we can increase the size, or decrease the size as per requirements.</li>
<li>If there are two partitions, /backup and /recordings and we have space available in /recordings, then we can reduce the size of /recordings and add it to /backup</li>
</ol>
</li>
</ol>
<p class="line867">
<h3>Hands On LVM</h3>
<p class="line874">Following is what I did for experimentation</p>
<ol>
<li>
<p class="line862">Install <tt>lvm2</tt> through synaptic</p>
</li>
<li>
<p class="line862">Create the partitions and tag them as LVM. Three partitions created &#8211; /dev/sda5, /dev/sda6 and /dev/sda7, 500 MB each. Tagged them as LVM (code <tt>8e</tt> available in <tt>fdisk</tt>)</p>
</li>
<li>
<p class="line862">Reboot the machine as the <tt>lvm2</tt> needs to be initialized, and since changes in the partitions were done, they also need to be initialized</p>
</li>
<li>
<p class="line862">Ran the command <tt>pvcreate</tt></p>
<ol>
<li><tt>pvcreate /dev/sda5 /dev/sda6 /dev/sda7</tt></li>
</ol>
</li>
<li>
<p class="line862">Ran <tt>vgscan</tt> to check if any Volume Groups were present. None were</p>
</li>
<li>
<p class="line862">Created a Volume Group using <tt>vgcreate</tt> for a total size of 1 GB.</p>
<ol>
<li><tt>vgcreate my_disks /dev/sda5 /dev/sda6</tt> # For Extent Size of 4 MB which means 256 GB of maximum space supported by that VG</li>
<li>I could have also used <tt>vgcreate -s 16 my_disks /dev/sda5 /dev/sda6</tt> for Extent Size of 16 MB so that I can use a maximum space of 1 TB. Since this is an experiment, no such need is necessary.</li>
</ol>
</li>
<li>
<p class="line862">Ran <tt>vgdisplay</tt> to view the details of the <tt>my_disks</tt> volume group</p>
</li>
<li>Created a logical volume using
<ol>
<li><tt>lvcreate -l 75 -n vol1 my_disks</tt></li>
<li><tt>- l 75</tt> means 75 extents. Considering the size of 4 MB per extent, the total size of the logical volume would be 4&#215;75 = 300 MB</li>
<li><tt>vol1</tt> is the name of the logical volume. This can now be formatted.</li>
<li>Verify it using <tt>lvdisplay</tt></li>
</ol>
</li>
<li>
<p class="line862">Created another logical volume <tt>vol2</tt> of 75 extents.</p>
</li>
<li>Formatted both the volumes in ext3. I am using ext3 only because I have experience using it, and it is possible to resize it while still being mounted (online resize as of now is supported only for growing a partition, not shrinking)
<ol>
<li><tt>mkfs.ext3 /dev/my_disks/vol1</tt></li>
<li><tt>mkfs.ext3 /dev/my_disks/vol2</tt></li>
</ol>
</li>
<li>
<p class="line862">Mounted the partitions in <tt>/lvm</tt></p>
<ol>
<li><tt>mkdir /lvm</tt></li>
<li><tt>mkdir /lvm/recordings /lvm/data</tt></li>
<li><tt>mount /dev/my_disks/vol1 /lvm/data</tt></li>
<li><tt>mount /dev/my_disks/vol2 /lvm/recordings</tt></li>
</ol>
</li>
<li>
<p class="line862">Added the following entries in <tt>/etc/fstab</tt> so that they auto mount on reboot</p>
<ol>
<li><tt>/dev/my_disks/vol1 /lvm/data     ext3    defaults        0       3</tt></li>
<li><tt>/dev/my_disks/vol2 /lvm/recordings     ext3    defaults        0       3</tt></li>
</ol>
</li>
<li>
<p class="line862">Rebooted the system and all was fine <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</li>
</ol>
<p class="line867">
<h3>Important executables</h3>
<ol>
<li>
<p class="line891"><tt>pvcreate</tt></p>
</li>
<li>
<p class="line891"><tt>pvmove</tt></p>
</li>
<li>
<p class="line891"><tt>pvdisplay</tt></p>
</li>
<li>
<p class="line891"><tt>vgdisplay</tt></p>
</li>
<li>
<p class="line891"><tt>vgextend</tt></p>
</li>
<li>
<p class="line891"><tt>vgreduce</tt></p>
</li>
<li>
<p class="line891"><tt>lvdisplay</tt></p>
</li>
<li>
<p class="line891"><tt>lvresize</tt></p>
</li>
<li>
<p class="line891"><tt>resize2fs</tt></p>
</li>
</ol>
<p class="line867">
<h2>Test Cases for LVM</h2>
<p class="line867">
<h3>A. /lvm/data needs 400 MB of space instead of existing 300 MB which can be taken from the Volume Group available</h3>
<ol>
<li>Extents required : 100</li>
<li>Commands
<ol>
<li><tt>lvresize -l 100 /dev/my_disks/vol1</tt></li>
<li><tt>resize2fs /dev/my_disks/vol1 400M</tt></li>
</ol>
</li>
</ol>
<p class="line862">It did online resizing (<tt>resize2fs</tt>) only because we were growing the partition and it was <tt>ext3</tt> on Kernel 2.6.</p>
<p class="line867">
<h3>B. /lvm/data needs to be resized to 800 MB (200 extents), but space available in volume group (my_disks) is only 268 MB (67 extents)</h3>
<ol>
<li>Extents required : 200</li>
<li>Extents available : 67</li>
<li>Commands
<ol>
<li><tt>lvresize -l 200 /dev/my_disks/vol1</tt></li>
</ol>
</li>
</ol>
<p class="line874">It shows an error message of insufficient extents.</p>
<p class="line867">
<h3>C. Free up extents in vol2 so that they can be used in vol1 (for Case B.)</h3>
<ol>
<li>Extents to be freed : 33</li>
<li>Current Extents : 75 (300 MB)</li>
<li>Commands
<ol>
<li><tt>umount  /lvm/recordings</tt></li>
<li><tt>e2fsck -f /dev/my_disks/vol2</tt></li>
<li><tt>resize2fs /dev/my_disks/vol2 168M</tt></li>
<li><tt>lvresize -l 42 /dev/my_disks/vol2</tt> # This gave a warning which I ignored</li>
<li><tt>vgdisplay</tt> # 100 Extents available</li>
<li>Run Case B. again &#8211; It works!!</li>
</ol>
</li>
</ol>
<p class="line862">The command <tt>e2fsck</tt> needs to be run before <tt>resize2fs</tt>, otherwise <tt>resize2fs</tt> would give an error.</p>
<p class="line867">
<h3>D. The Logical Volume (vol2) of 42 extents has data upto 120 MB (30 extents) and has to be resized to 28 extents</h3>
<ol>
<li>Commands
<ol>
<li><tt>mount /lvm/recordings</tt></li>
<li><tt>cd /lvm/recordings</tt></li>
<li>Created a 120 MB file using <tt>dd if=/dev/zero of=myfile bs=12280 count=1024</tt></li>
<li><tt>echo "hi" &gt;&gt; myfile</tt></li>
<li><tt>md5sum myfile</tt> # To verify what happens if data is reduced. This helps verify corruption if it occurs</li>
<li><tt>umount  /lvm/recordings</tt></li>
<li><tt>e2fsck -f /dev/my_disks/vol2</tt></li>
<li><tt>resize2fs /dev/my_disks/vol2 112M</tt></li>
</ol>
</li>
</ol>
<p class="line862">This reports an error. So it will not resize when there is data <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p class="line874">Try again, but this time increase it to 140 MB (35 extents)</p>
<ol>
<li><tt>lvresize -L 140M /dev/my_disks/vol2</tt></li>
<li><tt>resize2fs /dev/my_disks/vol2 140M</tt></li>
<li><tt>mount /lvm/recordings</tt></li>
</ol>
<p class="line862">It works!. Doing <tt>md5sum /lvm/recordings/myfile</tt> is accurate.</p>
<p class="line867">
<h3>E. vgdisplay has 242 extents of which only 7 are free. Now add the /dev/sda7 partition without unmounting anything</h3>
<ol>
<li>Commands
<ol>
<li> <tt>vgextend my_disks /dev/sda7</tt></li>
</ol>
</li>
</ol>
<p class="line874">And it is extended without unmounting anything. Total Extents available : 363</p>
<p class="line867">
<h3>F. Hard Disk /dev/sda6 has gone bad and has to be taken out from service. So it&#8217;s data has to be moved</h3>
<ol>
<li>Commands
<ol>
<li><tt>modprobe dm-mirror</tt> # This has to be done as <tt>dm-mirror</tt> module is not loaded by default. You may add it in <tt>/etc/modules</tt></li>
<li><tt>pvmove /dev/sda6</tt></li>
</ol>
</li>
</ol>
<p class="line867"><tt>pvmove</tt> is used to move the data of a physical volume residing inside a volume group. This helps removing the physical volume easily.</p>
<p class="line862">Now removing the pv <tt>/dev/sda6</tt> from the volume group</p>
<ol>
<li> <tt>vgreduce my_disks /dev/sda6</tt></li>
</ol>
<p class="line862">And it works too! Doing a <tt>md5sum</tt> also is successful, so no data got corrupted.</p>
<p class="line867">
<h3>G. System got corrupted and is now unbootable. Now the data needs to be retrieved from the logical volumes.</h3>
<ol>
<li>Restart the machine boot using a Ubuntu Gutsy Gibbon (7.10) Alternate Install CD. The Alternate install CD has a rescue mode available.</li>
<li>Start the rescue mode</li>
<li>
<p class="line862">The volume groups and logical volumes (<tt>/dev/my_disks</tt>, <tt>/dev/my_disks/vol1</tt>, and <tt>/dev/my_disks/vol2</tt>) were available and I was able to mount them successfully. <tt>md5sum</tt> also returned correct results.</p>
</li>
</ol>
<p class="line874">It seems that Ubuntu Rescue detects the LVM volumes and initializes them so that they&#8217;re usable.</p>
<p class="line867">
<h3>Observations</h3>
<ul>
<li>Over a Wifi network using iscsi was painfully slow if I tried using pvmove. So, if there was an iscsi target /dev/sdb1 which was on a different machine (machine B), and I wanted to remove /dev/sdb1 from my LVM on machine A, then I used &#8220;pvmove /dev/sdb1&#8243;. So it moved all the information available in /dev/sdb1 to extents available on my LVM on machine A which took ages (9m14sec for 50 MB of data). However, reversing the scene, wherein /dev/sdb1 was part of my volume group, and I wanted to free up a partition on my machine A (say /dev/sda8), then &#8220;pvmove /dev/sda8&#8243; worked flawlessly and was fast. No such problems occured when using ethernet.</li>
<li>AoE has better performance as compared to iSCSI in cases of pvmove. I was able to transfer 836 MB of data in approx 1.35 minutes as compared to 2.19 minutes for iSCSI.</li>
<li>iSCSI seems to be more reliable than AoE. Using AoE my system was hung a few times, and there were other issues which didn&#8217;t seem fit to be in production where anyone can be asked to manage a machine. Case in question is, it stuck when doing vgscan/lvdisplay and i was able to view the listing only after I somehow managed to rmmod aoe &#8211; probably I&#8217;d mounted the partition back (using vblade) and then only it started working. But another issue was, though I was able to do &#8216;pvmove /dev/sda8&#8242; (of machine A) successfully with the network traffic appearing on machine B (sdb1), but when I tried to do &#8216;pvmove /dev/sdb1&#8242;, it gave some ioctl related errors and within 16 seconds said that 100% of the data was transferred. A md5sum was also successful! I don&#8217;t know what happened here.</li>
</ul>
<p class="line867">
<h3>Errors Encountered</h3>
<ul>
<li>/dev/sdc1: read failed after 0 of 4096 at 0: Input/output error</li>
</ul>
<p class="line874">This had occured because I had made changes in fdisk to the primary hard disk. So it was not syncronized properly. Once reboot was done, all was fine.</p>
<p>One more problem occured &#8211; if you restart open-iscsi then open-iscsi changes the device name from /dev/sdb1 to /dev/sdc1 which causes the above mentioned problem. This needs to be worked upon.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/exain.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/exain.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&blog=2191018&post=7&subd=exain&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2008/02/10/storage-nirvana-unlimited-storage-using-lvm-iscsi-and-aoe/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://exain.com/uploads/blog/LVMDiagram.png" medium="image">
			<media:title type="html">LVM Diagram</media:title>
		</media:content>
	</item>
	</channel>
</rss>