<?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>Sérgio's blog &#187; Linux</title>
	<atom:link href="http://www.smachado.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smachado.com</link>
	<description>About computers, software, gadgets, programming and more....</description>
	<lastBuildDate>Sun, 16 May 2010 20:40:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Skype on Ubuntu Linux 10.04</title>
		<link>http://www.smachado.com/2010/05/skype-on-ubuntu-linux-10-04/</link>
		<comments>http://www.smachado.com/2010/05/skype-on-ubuntu-linux-10-04/#comments</comments>
		<pubDate>Sun, 16 May 2010 20:40:15 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=158</guid>
		<description><![CDATA[There are some issues with version 2.1.0.81 of Skype on Ubuntu Linux (possibly other distributions as well).
The first issue is the default theme on Skype versus the one for Ubuntu. The default theme on Skype configured menu text with dark colors and the default Ubuntu theme configures menus with dark background. This makes the menu [...]]]></description>
			<content:encoded><![CDATA[<p>There are some issues with version 2.1.0.81 of Skype on Ubuntu Linux (possibly other distributions as well).</p>
<p>The first issue is the default theme on Skype versus the one for Ubuntu. The default theme on Skype configured menu text with dark colors and the default Ubuntu theme configures menus with dark background. This makes the menu text mostly invisible.</p>
<p>Luckily by moving the mouse pointer over the menu the background highlight makes the text visible.</p>
<p>To change this permanently select &#8220;Options&#8221; from the Skype menu on the bottom left corner of the Skype window or press CTRL+O.</p>
<p>On the &#8220;General&#8221; section change the style from &#8220;Cleanlooks&#8221; to &#8220;Desktop Settings&#8221;. Close and restart Skype. Now you should see the menu text clearly.</p>
<p>The second issue is a problem with the video camera. This might or might not happen to you. It is a known problem with a workaround on the Skype <a title="Skype Linux release notes" href="https://developer.skype.com/LinuxSkype" target="_blank">release notes</a>:</p>
<blockquote><p>Skype does not work well with newer version of GSPCA Webcams driver (Linux Kernel &gt;=2.6.27), possible workaround:</p>
<ul>
<li>Ubuntu 32 bit: install &#8220;libv4l-0&#8243; package and launch Skype with: LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype</li>
<li>Ubuntu 64 bit: install &#8220;lib32v4l-0&#8243; package and launch Skype with: LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype</li>
</ul>
<li>Other distributions might have the same library, but may have a different path.</li>
</blockquote>
<p>In my case I already had the package ??libv4l-0 installed. If that&#8217;s not your case, or if you&#8217;re not sure, run on a terminal window:</p>
<p>sudo aptitude install libv4l-0</p>
<p>With the library installed you cannot simply start Skype from the start menu because the variable LD_PRELOAD needs to be customized for Skype.</p>
<p>So you have to start it from a terminal window or change Ubuntu menu. To change Ubuntu menu do the following:</p>
<ul>
<li>Open the System &gt; Preferences menu and select &#8220;Main Menu&#8221;</li>
<li>On the left select the &#8220;Internet&#8221; menu and on the right select &#8220;Skype&#8221;.</li>
<li>Click &#8220;Properties&#8221;.</li>
<li>On &#8220;Command:&#8221; replace the default command with: bash -c &#8220;LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype&#8221;</li>
</ul>
<p>Now every time you start Skype your video should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2010/05/skype-on-ubuntu-linux-10-04/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Move grub from internal disk to external storage</title>
		<link>http://www.smachado.com/2010/01/move-grub-from-internal-disk-to-external-storage/</link>
		<comments>http://www.smachado.com/2010/01/move-grub-from-internal-disk-to-external-storage/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 14:09:48 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=148</guid>
		<description><![CDATA[When I installed Ubuntu Linux on my USB 8GB stick I didn&#8217;t noticed where grub was being installed. After a while I noticed that I could only boot my Windows installation (on the internal hard drive) via the USB 8GB stick.
What happened was that Ubuntu install changed the master boot record (MBR) of my internal [...]]]></description>
			<content:encoded><![CDATA[<p>When I installed Ubuntu Linux on my USB 8GB stick I didn&#8217;t noticed where grub was being installed. After a while I noticed that I could only boot my Windows installation (on the internal hard drive) via the USB 8GB stick.</p>
<p>What happened was that Ubuntu install changed the master boot record (MBR) of my internal drive and set it up to load the remaining of Grub (it is split in 2 because otherwise it wouldn&#8217;t fit on the MBR) from the USB storage.</p>
<p>To fix this I could use the Windows tools (fixmbr) but that requires me to boot using the recovery console and login as system administrator. Although using fixmbr would restore the Windows boot loader it would erase grub and make the USB storage  not bootable.</p>
<p>What worked for me was MbrFix from sysint (www.sysint.no). REMARK: following the instructions below might make your computer unusable and eventually make you lose data.</p>
<p>First I got the list of partitions on my internal disk:</p>
<pre>C:\&gt;MbrFix.exe /drive 0 listpartitions
# Boot Size (MB) Type
1 Yes     76316    7  NTFS or HPFS
2             0    0  None
3             0    0  None
4             0    0  None</pre>
<p>Next I saved my internal disk mbr to a file:</p>
<pre>C:\&gt;MbrFix.exe /drive 0 savembr Backup_MBR_0.bin</pre>
<p>Next I listed my partitions on my USB disk drive:</p>
<pre>C:\&gt;MbrFix.exe /drive 1 listpartitions
# Boot Size (MB) Type
1          6440  131  Linux native (usually ext2fs)
2          1223  130  Prime
3             0    0  None
4             0    0  None</pre>
<p>Now I want to put grub on my USB disk:</p>
<pre>C:\&gt;MbrFix.exe /drive 1 restorembr Backup_MBR_0.bin
You are about to Restore MBR,
are you sure (Y/N)? Y</pre>
<p>Now let&#8217;s see how the partition looks like:</p>
<pre>C:\&gt;MbrFix.exe /drive 1 listpartitions
# Boot Size (MB) Type
1 Yes     76316    7  NTFS or HPFS
2             0    0  None
3             0    0  None
4             0    0  None</pre>
<p>Ups! what happened there? My Linux partitions are gone&#8230; Let me try and fix this&#8230;</p>
<pre>C:\&gt;MbrFix.exe /drive 1 /partition 1 setpartitiontype 131
You are about to Set partition type,
are you sure (Y/N)? Y
Partition 1, type before: 7 NTFS or HPFS
Partition 1, type after: 131 Linux native (usually ext2fs)

C:\&gt;MbrFix.exe /drive 1 /partition 2 setpartitiontype 130
You are about to Set partition type,
are you sure (Y/N)? Y
Partition 2, type before: 0 None
Partition 2, type after: 130 Prime

C:\&gt;MbrFix.exe /drive 1 listpartitions
# Boot Size (MB) Type
1 Yes     76316  131  Linux native (usually ext2fs)
2             0  130  Prime
3             0    0  None
4             0    0  None</pre>
<p>Looks like by setting the partition types back to their original values solved the problem.. yes it did.. ufff&#8230;</p>
<p>Now let&#8217;s restore the original Windows boot loader on the internal disk:</p>
<pre>C:\Documents and Settings\machados\My Documents\Downloads&gt;MbrFix.exe /drive 0 fixmbr
You are about to Fix MBR,
are you sure (Y/N)? Y</pre>
<p>Now I could boot the system without the USB disk connected to my laptop.</p>
<p>I could also boot my Linux system by connected the USB disk and selecting &#8220;boot from usb storage&#8221; from my bios boot menu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2010/01/move-grub-from-internal-disk-to-external-storage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing VirtualBox additional tools on Ubuntu 9.10 Karmic Koala</title>
		<link>http://www.smachado.com/2009/11/installing-virtualbox-additional-tools-on-ubuntu-9-10-karmic-koala/</link>
		<comments>http://www.smachado.com/2009/11/installing-virtualbox-additional-tools-on-ubuntu-9-10-karmic-koala/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 20:22:21 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=146</guid>
		<description><![CDATA[This procedure was tested on VirtualBox 3.0.12 for Windows and Ubuntu 9.10 Server 32 bit as Guest.
To be able to enjoy seamless integration between the host operating system and the VirtualBox guest you have to install VirtualBox Additional Tools on the guest operating system.
To do so, follow the steps:
Ensure you have a working Internet connection.
Step [...]]]></description>
			<content:encoded><![CDATA[<p>This procedure was tested on VirtualBox 3.0.12 for Windows and Ubuntu 9.10 Server 32 bit as Guest.</p>
<p>To be able to enjoy seamless integration between the host operating system and the VirtualBox guest you have to install VirtualBox Additional Tools on the guest operating system.</p>
<p>To do so, follow the steps:</p>
<p>Ensure you have a working Internet connection.</p>
<p><strong>Step 1:</strong></p>
<p>Install requirements for the Additional Tools:</p>
<p>sudo apt-get install gcc linux-source-virtual linux-headers-virtual dkms</p>
<p>Reboot after installation.</p>
<p><strong>Step 2:</strong></p>
<p>After logging in again find the Install Additional Tools option on the Devices menu.</p>
<p>Then on your guest mount the cdrom:</p>
<p>sudo mount /media/cdrom</p>
<p><strong>Step 3:</strong></p>
<p>Now install the tools:</p>
<p>cd /media/cdrom</p>
<p>./VBoxLinuxAdditions-x86.run</p>
<p>This will install the additional tools for virtual box.</p>
<p>Reboot your system and you&#8217;re all set.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2009/11/installing-virtualbox-additional-tools-on-ubuntu-9-10-karmic-koala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: mirroring my usb installation for more space</title>
		<link>http://www.smachado.com/2009/10/linux-mirroring-my-usb-installation-for-more-space/</link>
		<comments>http://www.smachado.com/2009/10/linux-mirroring-my-usb-installation-for-more-space/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:39:05 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=136</guid>
		<description><![CDATA[I recently installed Ubuntu 9.10 Beta on a 4GB USB drive and was running my laptop from it. Although the Ubuntu default installation from the Live CD took less than the same installation from Fedora 12 I quickly found that I needed more space for the system (/home included). So I needed to move the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed Ubuntu 9.10 Beta on a 4GB USB drive and was running my laptop from it. Although the Ubuntu default installation from the Live CD took less than the same installation from Fedora 12 I quickly found that I needed more space for the system (/home included). So I needed to move the system to a larger USB drive. This article explains how I moved my system from a 4GB USB drive to a 8GB USB drive including partition resizing.</p>
<p>My laptop has 2 limitations. One, it doesn&#8217;t have a CD-ROM drive. Second, it only has 3 USB ports. I got a Pioneer DVR-XD09 external hard drive. This drive takes 2 USB ports because of power requirements and that means that if I boot from the live CD I only have 2 remaining port for other external drive.</p>
<p>So I did the following:</p>
<p><strong>Step 1:</strong></p>
<p>Boot from the 4GB USB installation. Install gparted using Ubuntu Software Center from Applications menu.</p>
<p>Delete any partition  existing on the 8GB USB drive using gparted. Make sure you select the correct drive.</p>
<p><strong>Step 2:</strong></p>
<p>Boot Ubuntu Live CD 9.10.</p>
<p><strong>Step 3:</strong></p>
<p>Mount the internal hard drive. It has enough space for an image of the USB installation.</p>
<p><strong>Step 4:</strong></p>
<p>Plug in the USB where the system is installed (4GB) . Unmount it.</p>
<p><strong>Step 5:</strong></p>
<p>Make an image to the internal harddrive with the dd command:</p>
<p>dd if=/dev/sdc/ of=/media/internal_drive/ubuntu-image</p>
<p><strong>Step 6:</strong></p>
<p>Unplug the 4GB USB drive. Plug in the 8GB USB drive. Unmount it.</p>
<p><strong>Step 7:</strong></p>
<p>Copy the Ubuntu image to the 8GB USB drive using dd:</p>
<p>dd if=/media/internal_drive/ubuntu-image of=/dev/sdc</p>
<p><strong>Step 8:</strong></p>
<p>Boot the system from the 4GB USB drive.</p>
<p>Plug the 8GB drive. Using gpartd remove the swap drive on the 8GB drive.</p>
<p>Use uuidgen and tune2fs to change the uuid of the root partition on the 8GB drive:</p>
<p>$ sudo -i</p>
<p># uuidgen<br />
0b2eaab8-fddb-41fc-85f9-12ff421ce984</p>
<p># tune2fs -U 0b2eaab8-fddb-41fc-85f9-12ff421ce984 /dev/sdc1</p>
<p><strong>Step 9:</strong></p>
<p>Open gparted (or click Refresh Devices from GParted menu if you didn&#8217;t close GParted on last step).</p>
<p>Select the 8GB device. Select partition 1 (/dev/sdc1 in my ca.se). Press the mouse right button and select resize/move.</p>
<p>Drag the right edge of the partition until your happy with the free space for the swap partition. I left 1.20 GiB for the swap partition.</p>
<p>Right-click the unallocated space and select New.</p>
<p>On File System select linux-swap and press Add.</p>
<p>Back to GParted main window Apply the changes.</p>
<p>Close GParted.</p>
<p><strong>Step 10:</strong></p>
<p>Mount the new root partition using the Ubuntu Places menu.</p>
<p>On a terminal window change to the etc folder on that partition:</p>
<p>$ sudo -i</p>
<p># cd /media/0b2eaab8-fddb-41fc-85f9-12ff421ce984/etc/</p>
<p>Check the previous UUID values on fstab:</p>
<p># cat fstab | grep UUID=<br />
# for a device; this may be used with UUID= as a more robust way to name<br />
UUID=4c557514-3b1e-47b2-ad53-475e26f0e520 /               ext4    errors=remount-ro 0       1<br />
UUID=1042ef8e-bcf0-4890-a5b0-fe24a1aec625 none            swap    sw              0       0</p>
<p>Backup your fstab:</p>
<p># cp fstab fstab.old</p>
<p>Get the new values:</p>
<p># blkid /dev/sdc1<br />
/dev/sdc1: UUID=&#8221;0b2eaab8-fddb-41fc-85f9-12ff421ce984&#8243; TYPE=&#8221;ext4&#8243;<br />
# blkid /dev/sdc2<br />
/dev/sdc2: UUID=&#8221;d8989008-f39c-42f4-81ad-5c1a70c8b3c9&#8243; TYPE=&#8221;swap&#8221;</p>
<p>Replace the old values for the new ones:</p>
<p># sed &#8217;s/4c557514-3b1e-47b2-ad53-475e26f0e520/0b2eaab8-fddb-41fc-85f9-12ff421ce984/&#8217; fstab.old &gt; fstab</p>
<p># sed &#8217;s/1042ef8e-bcf0-4890-a5b0-fe24a1aec625/d8989008-f39c-42f4-81ad-5c1a70c8b3c9/&#8217; fstab &gt; fstab.new</p>
<p>Now your fstab should have the new values:</p>
<p># cat fstab | grep UUID=<br />
# for a device; this may be used with UUID= as a more robust way to name<br />
UUID=0b2eaab8-fddb-41fc-85f9-12ff421ce984 /               ext4    errors=remount-ro 0       1<br />
UUID=d8989008-f39c-42f4-81ad-5c1a70c8b3c9 none            swap    sw              0       0</p>
<p><strong>Step 11:</strong></p>
<p>Now you need to install GRUB on the 8GB USB drive.</p>
<p>First, the UUID of the root partition needs to be corrected also:</p>
<p># cd ../boot/grub</p>
<p># cp grub.cfg grub.cfg.old</p>
<p># sed &#8217;s/4c557514-3b1e-47b2-ad53-475e26f0e520/0b2eaab8-fddb-41fc-85f9-12ff421ce984/&#8217; grub.cfg.old &gt; grub.cfg</p>
<p>Install grub on 8GB USB device:</p>
<p>First check if sdc is on device.map:</p>
<p># cat device.map<br />
(hd0)	/dev/sda<br />
(hd1)	/dev/sdb</p>
<p>Add the missing device:</p>
<p># echo &#8220;(hd2)   /dev/sdc&#8221; &gt;&gt; device.map</p>
<p># grub-setup -d ./ -r &#8216;(hd1,1)&#8217; -m ./device.map &#8216;(hd2)&#8217;</p>
<p># grub-install &#8211;root-directory=/media/0b2eaab8-fddb-41fc-85f9-12ff421ce984/ /dev/sdc</p>
<p><strong>Step 12:</strong></p>
<p>Shutdown the system. Remove the 4GB drive and plugin the 8GB drive.</p>
<p>Turn on the system.</p>
<p>Now I have 50% of free space instead of the 5% I had before migrating my system from an 4GB USB drive to an 8GB  USB drive.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 978px; width: 1px; height: 1px;"># tune2fs -U 0b2eaab8-fddb-41fc-85f9-12ff421ce984 /dev/sdc1</div>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2009/10/linux-mirroring-my-usb-installation-for-more-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash: window size is too short, how do I change it?</title>
		<link>http://www.smachado.com/2009/08/bash-window-size-is-too-short-how-do-i-change-it/</link>
		<comments>http://www.smachado.com/2009/08/bash-window-size-is-too-short-how-do-i-change-it/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 15:56:42 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=106</guid>
		<description><![CDATA[So I&#8217;m logged on to a Linux server using Bash shell over an ssh connection using Poderosa client.
When I time a long command for some reason the cursor at some point moves over to the beginning of the same line overwriting the command and everything becomes a mess. This is specially annoying while typing something [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m logged on to a Linux server using Bash shell over an ssh connection using Poderosa client.</p>
<p>When I time a long command for some reason the cursor at some point moves over to the beginning of the same line overwriting the command and everything becomes a mess. This is specially annoying while typing something you would like to cut and paste on an email for example.</p>
<p>So, what&#8217;s going on?</p>
<p>Bash has a variable that reports the number of columns setup:</p>
<pre>$ echo $COLUMNS
80</pre>
<p>Interesting, it is configured for 80 columns but my terminal window has 137 columns. Why is that?</p>
<p>There&#8217;s a Bash setting that will adapt the window size after each command:</p>
<dl>
<blockquote><dt><code>checkwinsize</code> </dt>
<dd>If set, Bash checks the window size after each command and, if necessary, updates the values of     <code>LINES</code> and <code>COLUMNS</code>. </dd>
</blockquote>
</dl>
<p>Let&#8217;s see what is it&#8217;s current value:</p>
<pre>$ shopt -p | grep checkwinsize
shopt -u checkwinsize</pre>
<p>That means it is disabled&#8230; Let&#8217;s enable it:</p>
<pre>$ shopt -s checkwinsize</pre>
<p>Now it is enable. Let&#8217;s check the COLUMNS value now:</p>
<pre>$ echo $COLUMNS
137</pre>
<p>Great!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2009/08/bash-window-size-is-too-short-how-do-i-change-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the configuration of Redhat Cluster Manager</title>
		<link>http://www.smachado.com/2009/08/changing-the-configuration-of-redhat-cluster-manager/</link>
		<comments>http://www.smachado.com/2009/08/changing-the-configuration-of-redhat-cluster-manager/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 15:20:32 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=102</guid>
		<description><![CDATA[The Redhat cluster manager uses a cluster configuration system (man ccs) which can be managed by the ccs_tool tool.
To change the configuration file /etc/cluster/cluster.conf you have to follow the steps outlined below on the first node of your cluster:

backup current cluster.conf
copy /etc/cluster/cluster.conf to say /tmp/cluster.conf
make the necessary changes to /tmp/cluster.conf

Change also the config_version attribute of [...]]]></description>
			<content:encoded><![CDATA[<p>The Redhat cluster manager uses a cluster configuration system (man ccs) which can be managed by the ccs_tool tool.</p>
<p>To change the configuration file /etc/cluster/cluster.conf you have to follow the steps outlined below on the first node of your cluster:</p>
<ol>
<li>backup current cluster.conf</li>
<li>copy /etc/cluster/cluster.conf to say /tmp/cluster.conf</li>
<li>make the necessary changes to /tmp/cluster.conf
<ol>
<li>Change also the config_version attribute of the cluster tag at line 2 increasing the value by 1.</li>
</ol>
</li>
<li>run ccs_tool with the update option:  ccs_tool update /tmp/cluster.conf</li>
<li>if you&#8217;re using cman then run:  cman_tool version -r &lt;new config version&gt;</li>
</ol>
<p>If you don&#8217;t do item 5. and you&#8217;re using cman then your nodes will not be able to rejoin the cluster. To recover do the following:</p>
<ol>
<li>On the first node run cman_tool version -r &lt;new config version&gt;.</li>
<li>On the other nodes restart the cman service.</li>
<li>Restart ccsd</li>
<li>Start rgmanager</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2009/08/changing-the-configuration-of-redhat-cluster-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix Quick Reference</title>
		<link>http://www.smachado.com/2009/06/postfix-quick-reference/</link>
		<comments>http://www.smachado.com/2009/06/postfix-quick-reference/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 19:48:33 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=78</guid>
		<description><![CDATA[These are the most usefull commands for Postfix queue management:
Print a queue: postqueue -p
Delete a message: postsuper -d &#60;Queue ID&#62;
Delete all messages: postsuper -d ALL
Display a message: postcat -q &#60;Queue ID&#62;
]]></description>
			<content:encoded><![CDATA[<p>These are the most usefull commands for Postfix queue management:</p>
<p>Print a queue: postqueue -p</p>
<p>Delete a message: postsuper -d &lt;Queue ID&gt;</p>
<p>Delete all messages: postsuper -d ALL</p>
<p>Display a message: postcat -q &lt;Queue ID&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2009/06/postfix-quick-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco VPN Client: Remote peer is no longer responding.</title>
		<link>http://www.smachado.com/2009/02/cisco-vpn-client-remote-peer-is-no-longer-responding/</link>
		<comments>http://www.smachado.com/2009/02/cisco-vpn-client-remote-peer-is-no-longer-responding/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 15:56:28 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=23</guid>
		<description><![CDATA[If you have a profile that used to work and is no longer working for you this might help&#8230; or not&#8230; The message &#8220;Remote peer is no longer responding&#8221; is used on more than one failure scenario.
Increase the log level on /etc/opt/cisco-vpnclient/vpnclient.ini:
[main]
BinDirPath=/usr/local/bin
EnableLog=1
[LOG.IKE]
LogLevel=15
[LOG.CM]
LogLevel=3
[LOG.CVPND]
LogLevel=3
[LOG.XAUTH]
LogLevel=3
[LOG.CERT]
LogLevel=3
[LOG.IPSEC]
LogLevel=15
[LOG.CLI]
LogLevel=3
[LOG.FIREWALL]
LogLevel=15
[LOG.PPP]
LogLevel=1
[LOG.DIALER]
LogLevel=1
[LOG.GUI]
LogLevel=1
Now Run:
# ipseclog ipseclog.txt &#38;
Cisco Systems VPN Client Version 4.8.02 (0030)
Copyright (C) 1998-2007 Cisco [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a profile that used to work and is no longer working for you this might help&#8230; or not&#8230; The message &#8220;Remote peer is no longer responding&#8221; is used on more than one failure scenario.</p>
<p>Increase the log level on /etc/opt/cisco-vpnclient/vpnclient.ini:</p>
<p>[main]<br />
BinDirPath=/usr/local/bin<br />
EnableLog=1<br />
[LOG.IKE]<br />
LogLevel=15<br />
[LOG.CM]<br />
LogLevel=3<br />
[LOG.CVPND]<br />
LogLevel=3<br />
[LOG.XAUTH]<br />
LogLevel=3<br />
[LOG.CERT]<br />
LogLevel=3<br />
[LOG.IPSEC]<br />
LogLevel=15<br />
[LOG.CLI]<br />
LogLevel=3<br />
[LOG.FIREWALL]<br />
LogLevel=15<br />
[LOG.PPP]<br />
LogLevel=1<br />
[LOG.DIALER]<br />
LogLevel=1<br />
[LOG.GUI]<br />
LogLevel=1</p>
<p>Now Run:</p>
<p># ipseclog ipseclog.txt &amp;<br />
Cisco Systems VPN Client Version 4.8.02 (0030)<br />
Copyright (C) 1998-2007 Cisco Systems, Inc. All Rights Reserved.<br />
Client Type(s): Linux<br />
Running on: Linux i686 #1 SMP Wed Feb 11 23:58:12 EST 2009 i686<br />
Config file directory: /etc/opt/cisco-vpnclient</p>
<p>[1] 5143<br />
#</p>
<p>And now try connecting again.</p>
<p>After it fails check /var/log/ipseclog.txt and try finding DEL_REASON_PEER_NOT_RESPONDING.</p>
<p>Then if the profile you&#8217;re using has EnableNAT=1 try changing to EnableNAT=0 and try connecting again.</p>
<p>This solved the problem for me.</p>
<p>If you still have the problem try also restarting your Internet connection or the network service (Fedora):</p>
<p># /etc/init.d/network restart</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2009/02/cisco-vpn-client-remote-peer-is-no-longer-responding/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Bash: send a running process to background</title>
		<link>http://www.smachado.com/2009/02/bash-send-a-running-process-to-background/</link>
		<comments>http://www.smachado.com/2009/02/bash-send-a-running-process-to-background/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 10:03:31 +0000</pubDate>
		<dc:creator>smachado</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=19</guid>
		<description><![CDATA[Say you start a process and you forget to add the &#38; character at the end of the line to send it to the background. You don&#8217;t need to restart the process if you&#8217;re using bash (and probably other shells &#8211; check the documentation of the one you&#8217;re using).
To send the running process to the [...]]]></description>
			<content:encoded><![CDATA[<p>Say you start a process and you forget to add the &amp; character at the end of the line to send it to the background. You don&#8217;t need to restart the process if you&#8217;re using bash (and probably other shells &#8211; check the documentation of the one you&#8217;re using).</p>
<p>To send the running process to the background so that you get the shell prompt back to enter more commands you have to press CTRL+Z while the process is running. The process will be temporarily suspended until you send it to the foreground with the <em>bg [jobspec]</em> command.</p>
<p>Let&#8217;s see an example:</p>
<p>[root@localhost log]# tail -f cron<br />
Feb 26 11:01:01 localhost CROND[5731]: (root) CMD (run-parts /etc/cron.hourly)<br />
Feb 26 12:01:01 localhost CROND[5743]: (root) CMD (run-parts /etc/cron.hourly)<br />
Feb 26 13:01:01 localhost CROND[5836]: (root) CMD (run-parts /etc/cron.hourly)<br />
Feb 26 14:01:01 localhost CROND[6097]: (root) CMD (run-parts /etc/cron.hourly)<br />
Feb 26 15:01:01 localhost CROND[6132]: (root) CMD (run-parts /etc/cron.hourly)<br />
Feb 27 04:26:15 localhost crond[2844]: (CRON) STARTUP (1.2)<br />
Feb 27 04:26:16 localhost crond[2844]: (CRON) INFO (running with inotify support)<br />
Feb 27 04:26:20 localhost anacron[2912]: Anacron 2.3 started on 2009-02-27<br />
Feb 27 04:26:20 localhost anacron[2912]: Will run job `cron.daily&#8217; in 65 min.<br />
Feb 27 04:26:20 localhost anacron[2912]: Jobs will be executed sequentially<br />
^Z<br />
[1]+  Stopped                 tail -f cron<br />
[root@localhost log]# jobs -l<br />
[1]+  4107 Stopped                 tail -f cron<br />
[root@localhost log]# bg 1<br />
[1]+ tail -f cron &amp;<br />
[root@localhost log]# jobs -l<br />
[1]+  4107 Running                 tail -f cron &amp;<br />
[root@localhost log]# fg 1<br />
tail -f cron<br />
^C<br />
[root@localhost log]# jobs -l<br />
[root@localhost log]#</p>
<p>As you see when you press CTRL+Z (or ^Z) the process is suspended (stopped). You can see the list of jobs and their state by running <em>jobs -l</em>. This job was given the number <em>1</em>. We can then send it to the background with <em>bg 1</em> or bring it back to the foreground with <em>fg 1</em>. At the end I kill the process by pressing CTRL+C (^C).</p>
<p>You can stop the job with ^Z and then send it to the background using <em>bg </em>with no additional argument<em>s.</em> Actually you can use the character % as a job name. Let&#8217;s see the following example:</p>
<p># tail -f test1<br />
line 1<br />
line 2<br />
^Z<br />
[1]+  Stopped                 tail -f test1<br />
# %1 &amp;<br />
[1]+ tail -f test1 &amp;<br />
# jobs -l<br />
[1]+  3855 Running                 tail -f test1 &amp;<br />
# tail -f test2<br />
file 2 line 1<br />
file 2 line 2<br />
^Z<br />
[2]+  Stopped                 tail -f test2<br />
# %% &amp;<br />
[2]+ tail -f test2 &amp;<br />
#<br />
# jobs -l<br />
[1]-  3855 Running                 tail -f test1 &amp;<br />
[2]+  3857 Running                 tail -f test2 &amp;<br />
# %-<br />
tail -f test1<br />
^Z<br />
[1]+  Stopped                 tail -f test1<br />
# jobs -l<br />
[1]+  3855 Stopped                 tail -f test1<br />
[2]-  3857 Running                 tail -f test2 &amp;<br />
# kill %1</p>
<p>[1]+  Stopped                 tail -f test1<br />
# kill %2<br />
[1]+  Terminated              tail -f test1<br />
# jobs -l<br />
[2]+  3857 Terminated              tail -f test2<br />
# jobs -l</p>
<p>The + flag on the output of <em>jobs -l</em> indicates the <em>current</em> job and the &#8211; flag indicates the <em>previous</em> job. The %% and %+ <em>names</em> refer to the <em>current</em> job while %- refers to the <em>previous</em> job. So instead of <em>fg 1</em> you can use <em>%1.</em> And instead of <em>bg 1</em> you can use <em>%1 &amp;</em>. And so on&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2009/02/bash-send-a-running-process-to-background/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 4.2 and nforce drivers (forcedeth issue)</title>
		<link>http://www.smachado.com/2008/12/centos-42-and-nforce-drivers-forcedeth-issue/</link>
		<comments>http://www.smachado.com/2008/12/centos-42-and-nforce-drivers-forcedeth-issue/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 13:23:11 +0000</pubDate>
		<dc:creator>Sergio</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.smachado.com/?p=11</guid>
		<description><![CDATA[Today I had to install CentOS 64 bit on a desktop built on an ASUS P5N32-E SLI motherboard. This motherboard features a nForce 680i SLI chipset and other fancy stuff that are likely to cause trouble to Linux distributions, specially old versions.
I decided to go for CentOS 4.2 just because I had it available on [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to install CentOS 64 bit on a desktop built on an <a title="ASUS P5N32-E SLI motherboard" href="http://www.asus.com/products.aspx?modelmenu=1&amp;model=1459&amp;l1=3&amp;l2=11&amp;l3=397" target="_blank">ASUS P5N32-E SLI motherboard</a>. This motherboard features a nForce 680i SLI chipset and other fancy stuff that are likely to cause trouble to Linux distributions, specially old versions.</p>
<p>I decided to go for CentOS 4.2 just because I had it available on a DVD from a magazine, it was 64-bit and as an entreprise distribution it should be stable.</p>
<p>Installation was straightforward although I had to specify the drivers to use for hard disk (sata_nv) just before it started.</p>
<p>Upon login into my new installation I noticed I didn&#8217;t had any ethernet interfaces configured. This motherboard has two gigabit ethernet interfaces. They should use forcedeth driver from nvidia but they&#8217;re not working. Loading forcedeth manually didn&#8217;t do it . Also using options msi=0 msix=0 also didn&#8217;t do it.</p>
<p>So I decided to download the most recent kernel package for CentOS 4 which is kernel-smp-2.6.9-78.0.8.EL.x86_64.rpm. I downloaded from another computer to an usb stick and copied over to my CentOS 4 host. Then as root I executed the command: <em>rpm -i  kernel-smp-2.6.9-78.0.8.EL.x86_64.rpm</em> and rebooted.</p>
<p>After booting using the new kernel the system was able to find my ethernet devices. Aditionally it also found my onboard sound card.</p>
<p>After configuring them I was able to get network on my new system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smachado.com/2008/12/centos-42-and-nforce-drivers-forcedeth-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
