<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>/home/shakir &#187; linux</title>
	<atom:link href="http://www.mohdshakir.net/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mohdshakir.net</link>
	<description>My Piece Of The Web</description>
	<lastBuildDate>Fri, 16 Jul 2010 15:45:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing KDE 4.2 in Intrepid Ibex</title>
		<link>http://www.mohdshakir.net/2009/02/18/installing-kde-42-in-intrepid-ibex</link>
		<comments>http://www.mohdshakir.net/2009/02/18/installing-kde-42-in-intrepid-ibex#comments</comments>
		<pubDate>Wed, 18 Feb 2009 06:21:29 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[Nerd Public Journal?]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/?p=272</guid>
		<description><![CDATA[I&#39;ve been a KDE user since I started using Mandrake Linux 8.0, which if I remember correctly by that time bundles KDE 2. It was until recently that when Kubuntu 8.10 includes KDE 4 by default rather than KDE 3, I switched to GNOME. KDE 4 at that time for me was an unfinished product [...]]]></description>
			<content:encoded><![CDATA[<p>
	I&#39;ve been a KDE user since I started using Mandrake Linux 8.0, which if I remember correctly by that time bundles KDE 2. It was until recently that when Kubuntu 8.10 includes KDE 4 by default rather than KDE 3, I switched to GNOME.</p>
<p>
	KDE 4 at that time for me was an unfinished product where it&#39;s not ready for prime time. The desktop effects were slow, many features of KDE 3 programs were still not ported, bluetooth was not working, and most important of all I can&#39;t run it in dual screen.</p>
<p>
	This has changed recently when KDE&nbsp;team released KDE 4.2. There were so many bugfixes and improvements that I think it&#39;s time for me to go back to KDE.</p>
<p style="text-align: center;">
	<a href="http://www.mohdshakir.net/wp-content/uploads/image/200901/Screenshot-KDE-42.png"><img alt="" height="313" src="http://www.mohdshakir.net/wp-content/uploads/image/200901/mini-Screenshot-KDE-42.jpg" width="500" /></a></p>
<p>
	I&#39;ve published an article on how to install KDE 4.2 in Ubuntu 8.10 (Intrepid Ibex) at <a href="http://www.techrecipes.net/linux/install-kde-42-in-ubuntu-810-intrepid-ibex.html">Techrecipes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2009/02/18/installing-kde-42-in-intrepid-ibex/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set up dual monitor in Linux</title>
		<link>http://www.mohdshakir.net/2008/01/07/set-up-dual-monitor-in-linux</link>
		<comments>http://www.mohdshakir.net/2008/01/07/set-up-dual-monitor-in-linux#comments</comments>
		<pubDate>Mon, 07 Jan 2008 13:24:43 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2008/01/07/set-up-dual-monitor-in-linux</guid>
		<description><![CDATA[I&#8217;ve just bought ViewSonic VA2226w from Lowyat, and has been able to use it in dual monitor mode with my XPS M1330 (nvidia based) and Kubuntu. The ViewSonic that I bought is a 22&#34; LCD monitor with resolutions up to 1680&#215;1050 (only just as high as my 15.2&#34; Inspiron 6000&#8242;s screen).. I was using nvidia-config [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just bought <em>ViewSonic VA2226w</em> from <em>Lowyat</em>, and has been able to use it in dual monitor mode with my <em>XPS M1330</em> (<em>nvidia</em> based) and Kubuntu. The ViewSonic that I bought is a 22&quot; LCD monitor with resolutions up to 1680&#215;1050 (only just as high as my 15.2&quot; Inspiron 6000&#8242;s screen)..</p>
<p>I was using nvidia-config to configure the dual display, and after some trial and error, I come out with this /etc/X11/xorg.conf file:</p>
<pre>
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" RightOf "Screen1"
    Screen      1  "Screen1" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    RgbPath         "/usr/X11R6/lib/X11/rgb"
    FontPath        "unix/:7100"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "1"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "LCD"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "ViewSonic VA2226w"
    HorizSync       30.0 - 82.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Videocard0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400M GS"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Videocard1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400M GS"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Videocard0"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP: 1280x800 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Videocard1"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "CRT: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
</pre>
<p>and here&#8217;s my work desk at home (after some clean up <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>&nbsp;</p>
<p align="center"><img width="400" height="300" src="http://www.mohdshakir.net/wp-content/uploads/image/200801/dual-screen.jpg" alt="" /></p>
<p>p/s: Hope nobody mind me using the Microsoft keyboard and mouse set <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2008/01/07/set-up-dual-monitor-in-linux/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Recover lost / corrupted GRUB (MBR) entry</title>
		<link>http://www.mohdshakir.net/2008/01/04/recover-lost-corrupted-grub-entry</link>
		<comments>http://www.mohdshakir.net/2008/01/04/recover-lost-corrupted-grub-entry#comments</comments>
		<pubDate>Thu, 03 Jan 2008 18:26:25 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2008/01/04/recover-lost-corrupted-grub-entry</guid>
		<description><![CDATA[Often time the Master Boot Record (MBR) is also lost / corrupted when the we&#8217;re having problem with the partition table, and so here I extend my previous post on recovering lost partition table using the Ubuntu Live CD. First of all, let&#8217;s mount the related stuff; ubuntu@ubuntu:~$ sudo mount -o ro /dev/sda1 /media/ ubuntu@ubuntu:~$ [...]]]></description>
			<content:encoded><![CDATA[<p>Often time the Master Boot Record (MBR) is also lost / corrupted when the we&#8217;re having problem with the partition table, and so here I extend my <a href="http://www.mohdshakir.net/2008/01/03/recover-lost-partition-table-using-ubuntu-live-cd-gpart">previous post</a> on recovering lost partition table using the Ubuntu Live CD.</p>
<p>First of all, let&#8217;s mount the related stuff;</p>
<pre>
ubuntu@ubuntu:~$ sudo mount -o ro /dev/sda1 /media/
ubuntu@ubuntu:~$ sudo mount -o bind /dev/ /media/dev/
ubuntu@ubuntu:~$ sudo mount -o bind /proc/ /media/proc/
</pre>
<p>and then chroot</p>
<pre>
ubuntu@ubuntu:~$ sudo chroot /media/
</pre>
<p>Once we are in the chroot environment, run grub</p>
<pre>
bash:~# grub</pre>
<p>Assuming you are installing grub on your first harddisk, and your root filesystem in the first partition of your first harddisk, your journey should be something like this;</p>
<pre>
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]

grub&gt; root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub&gt; setup (hd0)
 Checking if &quot;/boot/grub/stage1&quot; exists... yes
 Checking if &quot;/boot/grub/stage2&quot; exists... yes
 Checking if &quot;/boot/grub/e2fs_stage1_5&quot; exists... yes
 Running &quot;embed /boot/grub/e2fs_stage1_5 (hd0)&quot;...  16 sectors are embedded.
succeeded
 Running &quot;install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf&quot;... succeeded
Done.

grub&gt; quit
</pre>
<p>Once you&#8217;re done with that, you might want to unmount whatever you have mounted before. Don&#8217;t forget to exit from the mount directory first;</p>
<pre>
ubuntu@ubuntu:~$ cd ..
ubuntu@ubuntu:~$ sudo umount /media/proc/
ubuntu@ubuntu:~$ sudo umount /media/dev/
ubuntu@ubuntu:~$ sudo umount /media
</pre>
<p>and then reboot to see if your problem is really fixed..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2008/01/04/recover-lost-corrupted-grub-entry/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Recover lost partition table using Ubuntu Live CD + gpart</title>
		<link>http://www.mohdshakir.net/2008/01/03/recover-lost-partition-table-using-ubuntu-live-cd-gpart</link>
		<comments>http://www.mohdshakir.net/2008/01/03/recover-lost-partition-table-using-ubuntu-live-cd-gpart#comments</comments>
		<pubDate>Thu, 03 Jan 2008 03:28:12 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2008/01/03/recover-lost-partition-table-using-ubuntu-live-cd-gpart</guid>
		<description><![CDATA[My friend suddenly ask me for a Ubuntu Live CD and upon being asked he told me that he has not been able to boot his machine for getting the Operating System not found error. I&#8217;m posting here on how did I helped him out with the problem for documentation. The program I used was [...]]]></description>
			<content:encoded><![CDATA[<p>My friend suddenly ask me for a Ubuntu Live CD and upon being asked he told me that he has not been able to boot his machine for getting the <em>Operating System not found</em> error. I&#8217;m posting here on how did I helped him out with the problem for documentation.</p>
<p>The program I used was <em>gpart</em>, and to use it in Ubuntu (Live CD) is to add <em>Universe</em> repository to <em>/etc/apt/sources.list</em> as this;</p>
<pre>
deb http://archive.ubuntu.com/ubuntu gutsy main restricted universe
</pre>
<p>and run this commands to install it.</p>
<pre>
ubuntu@ubuntu:~$ sudo apt-get update
ubuntu@ubuntu:~$ sudo apt-get install gpart
</pre>
<p>By running the next command, gpart will search the whole disk for possible partitions and write it&#8217;s findings to the partition table:</p>
<pre>
ubuntu@ubuntu:~$ sudo gpart /dev/sda -W /dev/sda
</pre>
<p>That&#8217;s it. Just reboot and see if your system is now bootable&#8230;</p>
<p>p/s: Other than gpart, testdisk can also be used for partition recovery, but i&#8217;m not covering it here..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2008/01/03/recover-lost-partition-table-using-ubuntu-live-cd-gpart/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Configure passwordless login in ssh</title>
		<link>http://www.mohdshakir.net/2008/01/01/configure-passwordless-login-in-ssh</link>
		<comments>http://www.mohdshakir.net/2008/01/01/configure-passwordless-login-in-ssh#comments</comments>
		<pubDate>Tue, 01 Jan 2008 12:48:38 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2008/01/01/configure-passwordless-login-in-ssh</guid>
		<description><![CDATA[This post is just a quick recap on how to configure passwordless ssh login. In my setting, herugrim is my local machine, and anduril is the remote machine with the ip address of 192.168.1.10 The first step is to (optionally) generate RSA key for use with SSH. Make sure you dont use any passphrase for [...]]]></description>
			<content:encoded><![CDATA[<p>This post is just a quick recap on how to configure passwordless ssh login.</p>
<p>In my setting, <em>herugrim</em> is my local machine, and <em>anduril</em> is the remote machine with the ip address of 192.168.1.10</p>
<p><!-- adman --></p>
<p>The first step is to (optionally) generate RSA key for use with SSH. Make sure you dont use any passphrase for this or you&#8217;ll later need to enter the passphrase upon login instead of password, which doesn&#8217;t really server our purpose here.</p>
<pre>shakir@herugrim ~ $ ssh-keygen -t rsa -C shakir@192.168.1.10
Generating public/private rsa key pair.
Enter file in which to save the key (/home/shakir/.ssh/id_rsa): /home/shakir/.ssh/id_rsa.192.168.1.10
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10.
Your public key has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10.pub.
The key fingerprint is: 11:d9:23:2e:68:05:59:d9:ac:5a:00:69:17:3a:b4:24  </pre>
<p>Now we can copy the public key to the server. Instead of doing it manually, OpenSSH has a nice program to do just what we need:</p>
<pre>shakir@herugrim ~ $ ssh-copy-id -i .ssh/id_rsa.192.168.1.10.pub shakir@192.168.1.10</pre>
<p>So now lets test if our passwordless login is successful:</p>
<pre>shakir@herugrim ~ $ ssh shakir@192.168.1.10 -i .ssh/id_rsa.192.168.1.10
shakir@anduril:~$</pre>
<p>Great, it works <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The next thing to do is to just make sure you keep your private key safe..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2008/01/01/configure-passwordless-login-in-ssh/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Voyage Linux in Wrap2c</title>
		<link>http://www.mohdshakir.net/2007/12/11/installing-voyage-linux-in-wrap2c</link>
		<comments>http://www.mohdshakir.net/2007/12/11/installing-voyage-linux-in-wrap2c#comments</comments>
		<pubDate>Tue, 11 Dec 2007 00:21:44 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[Nerd Public Journal?]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2007/12/11/installing-voyage-linux-in-wrap2c</guid>
		<description><![CDATA[Basicly this is how my home network looks like; As I&#8217;m upgrading the Linux I have in my Access Point, a.k.a. my home server, a.k.a. an SBC, I&#8217;ll just share it here in my blog. Here&#8217;s what I need: - SBC (Single Board Computer), wrap2c in my case - Storage &#8211; I&#8217;m using 2GB CF [...]]]></description>
			<content:encoded><![CDATA[<p>Basicly this is how my home network looks like;</p>
<div align="center"><img width="400" height="207" alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/home-network.jpg" /></div>
<p>As I&#8217;m upgrading the Linux I have in my Access Point, a.k.a. my home server, a.k.a. an SBC, I&#8217;ll just share it here in my blog.</p>
<p>Here&#8217;s what I need:</p>
<p align="center"><img width="300" height="400" alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/ingredients.jpg" /></p>
<p>
- SBC (Single Board Computer), <a href="http://www.wlanparts.com/product/WRAP2C">wrap2c</a> in my case<br />
- Storage &#8211; I&#8217;m using 2GB CF card here<br />
- Mini PCI wireless adapter &#8211; mine is <a href="http://www.mini-box.com/s.nl/it.A/id.387/.f">CM9</a> (Atheros based)<br />
- RS232 adapter<br />
- USB &#8211; RS232 converter (optional, as my laptop doesnt have serial port)<br />
- CF card reader<br />
- and a camera to snap the photos in this post..</p>
<p>Instead of installing Debian or or Gentoo as what I described in my previous <a href="http://www.mohdshakir.net/2006/11/29/building-a-gentoo-and-debian-chroot-environment">post</a>, I&#8217;m gonna just install <a href="http://linux.voyage.hk/">Voyage</a>, a minimal Debian based distro customised for SBCs.</p>
<p>After downloading the tarball, extract it with sudo;</p>
<pre>
shakir@herugrim ~ $ sudo tar xvjf voyage-version.tar.bz2
</pre>
<p>Time to plug in the CF card, and let&#8217;s see where it is attached to:</p>
<pre>
shakir@herugrim ~ $ cat /proc/partitions
major minor  #blocks  name
   8     0  156290904 sda
   8     1   21494938 sda1
   8     2    8795587 sda2
   8     3    2939895 sda3
   8     4          1 sda4
   8     5    9775521 sda5
   8     6  113282316 sda6
   8    16    2014992 sdb
   8    17    2014721 sdb1
</pre>
<p>Here I can see my 2Gb CF is identified as <font face="Courier New"> /dev/sdb</font>, and with this I run;</p>
<pre>
shakir@herugrim ~ $ cd voyage-version
shakir@herugrim ~/voyage-version $ less README
</pre>
<p>and follow the installation guide, which is in section 2 of the README <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To see if things really work, I&#8217;m gonna need to make sure I can use my USB RS232 converter. Let&#8217;s plug it in and see what the kernel says;</p>
<pre>usb 5-1: new full speed USB device using uhci_hcd and address 2
usb 5-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usbserial
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial Driver core
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
pl2303 5-1:1.0: pl2303 converter detected
usb 5-1: pl2303 converter now attached to ttyUSB0
usbcore: registered new interface driver pl2303
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
</pre>
<p>What&#8217;s important from the long message is that the kernel has recognized the converter, and attach it to<font face="Courier New"> /dev/ttyUSB0</font>. If your kernel doesn&#8217;t recognize the converter, fom the log you can see that it requires <font face="Courier New">pl2303</font> module, so go re-compile your kernel to have it supported..</p>
<p>After everything is connected, lets run minicom;</p>
<pre>shakir@herugrim ~ $ sudo minicom -s</pre>
<p align="center"><img alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/minicom-1.png" /></p>
<p>Select the Serial port setup option and change it to this;</p>
<p align="center"><img width="400" height="279" alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/minicom-2.png" /></p>
<p>exit;</p>
<p align="center"><img width="400" height="331" alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/minicom-3.png" /></p>
<p>power on the board, and hope for the best <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p align="center"><img width="400" height="332" alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/booting-1.png" /></p>
<p align="center"><img width="400" height="330" alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/booting-2.png" /></p>
<p align="center"><img width="400" height="332" alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/booting-3.png" /></p>
<p align="center"><img alt="" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/booting-4.png" /></p>
<p>We&#8217;ve got the login prompt, mission accomplished <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2007/12/11/installing-voyage-linux-in-wrap2c/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Huawei E220 in Gutsy Gibbon (Kubuntu)</title>
		<link>http://www.mohdshakir.net/2007/12/05/huawei-e220-in-gutsy-gibbon-kubuntu</link>
		<comments>http://www.mohdshakir.net/2007/12/05/huawei-e220-in-gutsy-gibbon-kubuntu#comments</comments>
		<pubDate>Wed, 05 Dec 2007 06:48:47 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[gutsy]]></category>
		<category><![CDATA[hsdpa]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2007/12/05/huawei-e220-in-gutsy-gibbon-kubuntu</guid>
		<description><![CDATA[I received a package earlier today, and was very happy to find out that it&#8217;s the Huawei E220 that I ordered few days ago. This Huawei E220 is a 3G card that supports speed of up to 3.6 Mbps, using HSDPA technology, and it makes me can&#8217;t wait to have it work with Gutsy Gibbon. [...]]]></description>
			<content:encoded><![CDATA[<p>I received a package earlier today, and was very happy to find out that it&#8217;s the <em>Huawei E220</em> that I ordered few days ago. <!-- google_ad_section_start -->This Huawei E220 is a 3G card that supports speed of up to 3.6 Mbps, using <em>HSDPA</em> technology, <!-- google_ad_section_end -->and it makes me can&#8217;t wait to have it work with <em>Gutsy Gibbon</em>. After struggling for quite some time, I found out that the answer to my problem was just these two lines of command:</p>
<pre>sudo modprobe -r uhci_hcd
sudo modprobe uhci_hcd
</pre>
<p>If that short version of my solution doesn&#8217;t help, please read ahead&#8230;</p>
<p>I&#8217;ve been trying to get this modem to work with <a href="https://wiki.ubuntu.com/GutsyGibbon">Gutsy Gibbon</a>, but the online howtos that I found on the net doesnt reliably work for me. </p>
<p>Weird enough for me initially as sometime I can just use <font face="Courier New">wvdial</font> (more on this afterward) and get connected, while most of the time I got various errors about the modem. With these non-reproducible errors and successes, I do some trial and error while looking at the kernel logs, and came up with this one final observation;</p>
<pre><font size="3" color="#808080">shakir@herugrim ~ $ uname -r&nbsp; # just to show the kernel I'm using, as your mileage may vary
2.6.22-14-generic
</font></pre>
<p>
At one shell I run this to see kernel messages;</p>
<pre><font size="3" color="#808080">sudo tail -f&nbsp; /var/log/messages</font></pre>
<p>and got this messages upon plugging in my <font face="Courier New">Huawei E220</font> to the USB port;</p>
<pre><font size="3" color="#808080">usb 3-1: new full speed USB device using uhci_hcd and address 5
usb 3-1: configuration #1 chosen from 1 choice
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial Driver core
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port)
option 3-1:1.0: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
</font></pre>
<p>Nice, it has detected my <font face="Courier New">Huawei E220</font> as GSM modem, and attach it to /dev/ttyUSB0. Let&#8217;s create a wvdial configuration to connect to the telco <font face="Courier New">(Celcom</font> in my case). My<font face="Courier New"> /etc/wvdial.conf </font>looks like this;</p>
<pre><font size="3" color="#808080">[Dialer Celcom3G]
Phone = *99***1#
Modem = /dev/ttyUSB0
Username = user
Password = pass
ISDN = 0
New PPPD = yes
Baud = 1843200
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &#038;C1 &#038;D2 +FCLASS=0
Modem Type = Analog Modem
</font></pre>
<p>
So let&#8217;s just connect;</p>
<pre><font size="3" color="#808080">shakir@herugrim ~ $ sudo wvdial Celcom3G
WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial<*1>: Sending: ATQ0
WvDial<*1>: Re-Sending: ATZ
WvDial<Err>: Modem not responding.
</font></pre>
<p>
Ouch, an error. The modem has been detected, what could go wrong? After some time, and no success with the available tutorials, I finally got this working, as the problem was related to the USB drivers. What I did was to reload the <font face="Courier New">uhci_hcd</font> module</p>
<pre><font size="3" color="#808080">shakir@herugrim ~ $ sudo modprobe -r uhci_hcd</font></pre>
<p>
Lets take a look at what the kernel says about this;</p>
<pre><font size="3" color="#808080">[..snipped..]
Dec  4 22:45:24 herugrim kernel: [ 1343.504000] usb 3-1: USB disconnect, address 6
Dec  4 22:45:24 herugrim kernel: [ 1343.504000] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Dec  4 22:45:24 herugrim kernel: [ 1343.504000] option 3-1:1.0: device disconnected
[..snipped..]
</font></pre>
<p>
and then lets load the module back again</p>
<pre><font size="3" color="#808080">shakir@herugrim ~ $ sudo modprobe uhci_hcd</font></pre>
<p>
and see what happens;</p>
<pre><font size="3" color="#808080">USB Universal Host Controller Interface driver v3.0
ACPI: PCI Interrupt 0000:00:1a.0[A
uhci_hcd 0000:00:1a.0: UHCI Host Controller
[..snipped..]
usb 3-1: new full speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
option 3-1:1.0: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
option 3-1:1.1: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1
option 3-1:1.2: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB2
[..snipped..]
</font></pre>
<p>
Last time the GSM modem was attached to just <font face="Courier New">/dev/ttyUSB0</font>, but now it&#8217;s also attached to <font face="Courier New">/dev/ttyUSB1</font> and <font face="Courier New">/dev/ttyUSB2</font>. And I guess it&#8217;s time to connect using <font face="Courier New">wvdial</font>;</p>
<pre><font size="3" color="#808080">WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATQ0 V1 E1 S0=0 &#038;C1 &#038;D2 +FCLASS=0
WvDial Modem<*1>: ATQ0 V1 E1 S0=0 &#038;C1 &#038;D2 +FCLASS=0
WvDial Modem<*1>: OK
WvDial<*1>: Modem initialized.
WvDial<*1>: Sending: ATDT*99***1#
WvDial<*1>: Waiting for carrier.
WvDial Modem<*1>: ATDT*99***1#
WvDial Modem<*1>: CONNECT
WvDial<*1>: Carrier detected.  Waiting for prompt.
WvDial<Notice>: Don't know what to do!  Starting pppd and hoping for the best.
WvDial<Notice>: Starting pppd at Tue Dec  4 22:49:25 2007
WvDial<Notice>: Pid of pppd: 6433
WvDial<*1>: Using interface ppp0
WvDial<*1>: local  IP address 10.188.15.175
WvDial<*1>: remote IP address 10.64.64.64
WvDial<*1>: primary   DNS address 202.188.0.133
WvDial<*1>: secondary DNS address 202.188.1.5
</font></pre>
<p>
It works, yeay <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  As usual, lets create a script for this;</p>
<pre lang="bash" line="1">
#!/bin/bash

sudo modprobe -r uhci_hcd
sudo modprobe uhci_hcd

echo "Waiting kernel to detect modem device"

# Wait till the kernel recognizes our E220
while true; do

        # Read log
        tail -n 20 /var/log/messages  > access.history
        sleep 1
        tail -n 20 /var/log/messages  > access.current

        LOG=`diff access.history access.current | grep ">" | tr -d ">"`

        # Check if it is detected
        if [[ "$LOG" =~ "converter now attached to ttyUSB1" ]]; then
                echo "Modem device detected, dialing..."
                # If it is, get out of the loop immedietly
                break
        fi
done

rm access.history access.current

# Start dialing
sudo wvdial Celcom3G
</pre>
<p><i>p/s: The script is now maintained <a href="http://www.mohdshakir.net/scripts/bash/huawei-e220-dialer">here</a>. Please go there to see the latest updates and discussions</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2007/12/05/huawei-e220-in-gutsy-gibbon-kubuntu/feed</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Nikon D40x in Ubuntu Linux</title>
		<link>http://www.mohdshakir.net/2007/11/06/nikon-d40x-in-ubuntu-linux</link>
		<comments>http://www.mohdshakir.net/2007/11/06/nikon-d40x-in-ubuntu-linux#comments</comments>
		<pubDate>Tue, 06 Nov 2007 02:53:38 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[Nerd Public Journal?]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2007/11/06/nikon-d40x-in-ubuntu-linux</guid>
		<description><![CDATA[I&#8217;ve been using Nikon D40X on my previous trip to Jakarta (and Bandung). For this I need to update my previous script as there are few differences, as the following: I set the camera to use RAW format rather than jpeg Data transfer is through the laptop&#8217;s built in MMC card slot, rather than USB [...]]]></description>
			<content:encoded><![CDATA[<p><!-- google_ad_section_start --></p>
<p>I&#8217;ve been using Nikon D40X on my previous trip to Jakarta (and Bandung). For this I need to update my previous script as there are few differences, as the following:</p>
<ul>
<li>I set the camera to use RAW format rather than jpeg</li>
<li>Data transfer is through the laptop&#8217;s built in MMC card slot, rather than USB</li>
<li>I&#8217;m now a (K)Ubuntu user <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p><!-- google_ad_section_end --></p>
<p>First step, is the software part. As RAW format is not really usable for &quot;presentation&quot;, I need to convert it to another format, say JPEG. For this I&#8217;m gonna need&nbsp; <font face="Courier New" color="#ccffff">ufraw</font>. Let&#8217;s install it;</p>
<p>&nbsp;</p>
<pre>sudo apt-get install ufraw
sudo apt-get install gimp-ufraw #optional</pre>
<p>&nbsp;</p>
<p>Using <font face="Courier New" color="#ccffff">ufraw-batch</font> (included in the <font face="Courier New" color="#ccffff">ufraw</font> package), I came up with this self explanatory, lightly commented bash script;</p>
<p>&nbsp;</p>
<pre lang="bash" line="1">
#!/bin/bash

#Set some variables
MOUNT_DIR=/media/mmc
MOUNT_DEV=/dev/mmcblk0p1
PHOTO_DIR=/home/shakir/Photos/temp/D40X
#Copy files from the MMC card
sudo mkdir $MOUNT_DIR
sudo mount -o uid=shakir,gid=shakir $MOUNT_DEV -t vfat $MOUNT_DIR
mv -v /media/mmc/dcim/100nd40x/* $PHOTO_DIR
sudo umount $MOUNT_DIR
sudo rmdir $MOUNT_DIR
cd $PHOTO_DIR
mkdir jpeg
#Convert RAW files to low quality JPEGs
for i in `ls *.nef`; do
        ufraw-batch –out-type=jpeg –out-path=jpeg/  \
          –compression=70 –size=600,600 –overwrite $i
        mv -v $i nef/
done
mkdir nef
mv *.nef nef/
</pre>
<p>&nbsp;</p>
<p>The script would generate a low quality / resolution JPEGs, based on the un-processed RAWs. The JPEGs are useful to actually help me deciding which photos are meant for deletion, and which to keep. Later I would manually go to the selected RAW files folder, and;</p>
<pre>ufraw *.nef</pre>
<p>to edit the RAW files. This final step would give me the files that I mean to keep;</p>
<pre>ufraw-batch --out-type=jpeg --out-path=jpeg/ --compression=100 --overwrite *.nef</pre>
<p>I bring back no souvenirs but these photos;</p>
<div align="center">
<img width="300" height="383" src="http://www.mohdshakir.net/wp-content/uploads/image/200711/bsd.jpg" alt="" />
</div>
<div align="center">
<img width="500" height="153" src="http://www.mohdshakir.net/wp-content/uploads/image/200711/ie.jpg" alt="" /><br />
<a href="http://www.mohdshakir.net/wp-content/uploads/image/200711/telnet-zoom.jpg"><img src="http://www.mohdshakir.net/wp-content/uploads/image/200711/telnet.jpg" alt="" /></a><br />
<img width="400" height="392" src="http://www.mohdshakir.net/wp-content/uploads/image/200711/untar.jpg" alt="" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2007/11/06/nikon-d40x-in-ubuntu-linux/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Recover deleted files with photorec</title>
		<link>http://www.mohdshakir.net/2007/10/31/data-recovery-with-photorec</link>
		<comments>http://www.mohdshakir.net/2007/10/31/data-recovery-with-photorec#comments</comments>
		<pubDate>Wed, 31 Oct 2007 04:28:28 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2007/10/data-recovery-with-photorec.html</guid>
		<description><![CDATA[I was just watching a movie while suddenly all the files except the hidden ones in my home directory were gone, just as someone issued the command sudo rm -rf /home/shakir/* To avoid further data loss, I quickly power off and boot into my Ubuntu live CD to create an image of my /home partition. [...]]]></description>
			<content:encoded><![CDATA[<p>I was just watching a movie while suddenly all the files except the hidden ones in my home directory were gone, just as someone issued the command</p>
<pre>sudo rm -rf /home/shakir/*</pre>
<p>To avoid further data loss, I quickly power off and boot into my Ubuntu live CD to create an image of my <font face="Courier New">/home</font> partition. Here&#8217;s how to see in which partition is my <font face="Courier New">/home</font> directory:</p>
<pre>shakir@herugrim ~ $ cat /proc/partitions
major minor  #blocks  name
8     0  156290904 sda
8     1   21494938 sda1
8     2    8795587 sda2
8     3    2939895 sda3
8     4          1 sda4
8     5    9775521 sda5
8     6  113282316 sda6</pre>
<p>From the partition sizes I can tell my <font face="Courier New">/home</font> partition was in the <font face="Courier New">/dev/sda6</font>, and the next step is to really create an image of the partition to safely doing the recovery process without risking of losing more data. <font face="Courier New">/media/usbdisk</font> is where my external usb harddisk is mounted</p>
<pre>sudo dd if=/dev/sda6 of=/media/usbdisk/herugrim-sda6-20071010.img</pre>
<p><font face="Courier New">Photorec</font> is part of <font face="Courier New">testdisk</font> package, and this is how to install it in ubuntu;</p>
<pre>sudo apt-get update
sudo apt-get install testdisk</pre>
<p>It&#8217;s time to actually do run the program</p>
<pre>sudo photorec /home/shakir/temp/herugrim-sda6-20071010.img</pre>
<p>After going through some options, photorec starts doing it&#8217;s job.</p>
<input width="409" type="image" height="305" src="http://www.mohdshakir.net/wp-content/uploads/image/200710/photorec.png" />
<p>Photorec stores recovered files in recup_dir.&lt;sequence&gt;/&lt;sequence&gt;.&lt;file extension&gt; in the specified target directory, which is not very useful. Here&#8217;s a script I wrote to find all the recovered JPEG files and move/rename it accordingly. Almost the same technique can be used for other file formats.</p>
<pre lang="bash" line="1">
#!/bin/bash
PHOTODIR=/home/shakir/temp/photorec
cd $PHOTODIR
mkdir JPEG
for i in `ls | grep recup`;do
	for j in `ls $i/*.jpg`; do
		if FILE=`exiv2 $j 2>/dev/null | grep timestamp | awk ‘{ print $4"-"$5 }’ | tr -d ‘:’ | grep 200`; then
			cp -v $j "JPEG/"$FILE".jpg"
		fi
	done
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2007/10/31/data-recovery-with-photorec/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Automatic backup using rsync</title>
		<link>http://www.mohdshakir.net/2007/10/09/automate-rsync</link>
		<comments>http://www.mohdshakir.net/2007/10/09/automate-rsync#comments</comments>
		<pubDate>Tue, 09 Oct 2007 00:53:03 +0000</pubDate>
		<dc:creator>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">/?p=73</guid>
		<description><![CDATA[I&#8217;ve suddenly lost all the files in my home folders, and I quickly do these to not let the impact to be as bad, if it ever recurs. Say 192.168.1.10 is my backup server (anduril), herugrim is my laptop&#8217;s name, these are the steps I did to let my laptop automatically rsync to the backup [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve suddenly lost all the files in my home folders, and I quickly do these to not let the impact to be as bad, if it ever recurs.</p>
<p>Say <font face="Courier New" color="#800000">192.168.1.10</font> is my backup server (<font face="Courier New" color="#800000">anduril</font>), <font face="Courier New" color="#800000">herugrim</font> is my laptop&#8217;s name, these are the steps I did to let my laptop automatically rsync to the backup server.</p>
<p><strong>Configure Password-less Login</strong></p>
<p class="line874">Generate RSA key for use with SSH. Make sure you dont use any passphrase.</p>
<pre>shakir@herugrim ~ $ ssh-keygen -t rsa -C shakir@192.168.1.10
Generating public/private rsa key pair.
Enter file in which to save the key (/home/shakir/.ssh/id_rsa): /home/shakir/.ssh/id_rsa.192.168.1.10
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10.
Your public key has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10.pub.
The key fingerprint is: 11:d9:23:2e:68:05:59:d9:ac:5a:00:69:17:3a:b4:24  </pre>
<p class="line874">Copy the public key to the server</p>
<pre>shakir@herugrim ~ $ ssh-copy-id -i .ssh/id_rsa.192.168.1.10.pub shakir@192.168.1.10</pre>
<p class="line874">Test if passwordless login successful</p>
<pre>shakir@herugrim ~ $ ssh shakir@192.168.1.10 -i .ssh/id_rsa.192.168.1.10
shakir@anduril:~$</pre>
<p><strong>Configure Target Directory</strong></p>
<pre>shakir@anduril:~$ mkdir backup/herugrim -p</pre>
<p><strong>Manual Rsync (test power)</strong></p>
<pre>shakir@herugrim ~ $ rsync --verbose --progress --compress --rsh=ssh --recursive --times --perms --links --delete /home/shakir anduril:/home/shakir/backup/herugrim -e &quot;ssh -i /home/shakir/.ssh/id_rsa.192.168.1.10&quot;</pre>
<p><strong>Configure cron</strong></p>
<p class="line874">At your machine To edit your crontab entry, issue this command</p>
<pre>crontab -e</pre>
<p class="line874">Add this entry to your crontab</p>
<pre>30      9       *       *       1-5     rsync --compress --rsh=ssh --recursive --times --perms --links --delete /home/shakir anduril:/home/shakir/backup/herugrim -e &quot;ssh -i /home/shakir/.ssh/id_rsa.192.168.1.10&quot;</pre>
<p class="line874">Run cron</p>
<pre>sudo /etc/init.d/cron start     #depending on your linux distro</pre>
<p>And I guess that&#8217;s all..</p>
<p>backup guys, backup&#8230; <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2007/10/09/automate-rsync/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
