<?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>PCR&#039;s notepad &#187; Linux</title>
	<atom:link href="http://notepad.patheticcockroach.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://notepad.patheticcockroach.com</link>
	<description>The area in patheticcockroach.com where the EEG isn&#039;t isoelectric</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:11:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to safely erase (wipe out) files or folders on Linux</title>
		<link>http://notepad.patheticcockroach.com/2717/safely-erasing-wipe-out-files-or-folders-on-linux/</link>
		<comments>http://notepad.patheticcockroach.com/2717/safely-erasing-wipe-out-files-or-folders-on-linux/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 07:08:15 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2717</guid>
		<description><![CDATA[I suppose it&#8217;s good practice to wipe out sensitive data from a server before giving it back to your host. On Windows, when I want to safely delete files I use Eraser (NB: versions 5.8.x and 6 suck pretty back &#8211; for instance they just fail to install for me, seemingly because of a bad [...]]]></description>
			<content:encoded><![CDATA[<p>I suppose it&#8217;s good practice to wipe out sensitive data from a server before giving it back to your host. On Windows, when I want to safely delete files I use <a href="http://eraser.heidi.ie/">Eraser</a> (NB: versions 5.8.x and 6 suck pretty back &#8211; for instance they just fail to install for me, seemingly because of a bad packed runtime &#8211; You can get <a href="http://sourceforge.net/projects/eraser/files/Eraser%205/">version 5.7 from Sourceforge</a>, although its shell integration won&#8217;t work in Windows 7). On Linux, until now I had pretty much no idea. But as often, this kind of pretty basic and useful software can be found in usual packages with simple names. And here we are talking about package &#8220;wipe&#8221;, of course <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>To install it, pretty straightforward (NB: I&#8217;m using Ubuntu, should be the same on Debian; on Fedora should be the same but with yum):<br />
<code>apt-get install wipe</code></p>
<p>And then to run it, for basic use it will take ALMOST (see below the warning about wildcards) the same kind of options as &#8220;rm&#8221;:<br />
<code>myLaptop:/home/david$ wipe -r thisFolder<br />
Okay to WIPE 1 directory ? (Yes/No) y<br />
Please answer "Yes" or "No".<br />
Okay to WIPE 1 directory ? (Yes/No) Yes<br />
Wiping ubuntu-11.10-dvd-amd64.iso, pass 9  (12)   [     213 /     5994]</code></p>
<p>The default setting is 34 overwrite passes, which is huge and slow, but I guess helpful if you are paranoid. If you want fewer passes, use -Q [number of passes]. The <a href="http://linux.die.net/man/1/wipe">manual</a> might be an interesting read, too.</p>
<p>A very important warning about using wildcards: DO NOT use <code>wipe -r .*</code>. As <a href="http://us.generation-nt.com/answer/just-info-never-do-wipe-help-200181791.html">reported there</a>, this pattern matches <code>..</code> so wipe will then browse around and erase the whole disk if you&#8217;re running it as root (and even if you&#8217;re not, it will likely get to places where you didn&#8217;t want it to go). This is not a bug, it&#8217;s actually a feature. rm not matching <code>..</code> when you call it on <code>.*</code> is a safeguard, but when you&#8217;re using wipe chances are that it&#8217;s more of a problem to miss deletions than to do too many of them, thus this aggressive behavior. I didn&#8217;t try it but most likely this is true of <code>wipe -r *</code> too.</p>
<p>If you want to erase all the dot files in a folder, you can either use <code>wipe .??*</code> or move on level up and do <code>wipe -r theFolder</code>, like I did in my example.</p>
<p>Edit: actually, I did gave a shot at wipe -q -r .* on a virtual box, it didn&#8217;t wipe everything out, as can be seen from the output:<br />
<code>root@xxxxx:~# wipe -q -r .*<br />
Okay to WIPE 9 regular files and 7 directories ? (Yes/No) Yes<br />
Will not remove .<br />
Will not remove ..<br />
Operation finished.</code></p>
<p>Finally, I thought that could be useful on Windows so I checked out: unfortunately wipe is not available in Cygwin as of today.</p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2717/safely-erasing-wipe-out-files-or-folders-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Various fixes to random small Linux problems</title>
		<link>http://notepad.patheticcockroach.com/2344/various-fixes-to-random-small-linux-problems/</link>
		<comments>http://notepad.patheticcockroach.com/2344/various-fixes-to-random-small-linux-problems/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 14:24:02 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2344</guid>
		<description><![CDATA[Not enough material to make a full post, but I don&#8217;t want to waste my search results. error while loading shared libraries: [library name]: &#8220;wrong ELF class: ELFCLASS32&#8243; This occurs on 64 bits Linux. It means that you are attempting to use the 32 bits version of the mentioned library while the program you want [...]]]></description>
			<content:encoded><![CDATA[<p>Not enough material to make a full post, but I don&#8217;t want to waste my search results.</p>
<h2>error while loading shared libraries: [library name]: &#8220;wrong ELF class: ELFCLASS32&#8243;</h2>
<p>This occurs on 64 bits Linux. It means that you are attempting to use the 32 bits version of the mentioned library while the program you want to run requires the 64 bits version. The solution is obviously to install the 64 bits version of the lib. <a href="http://forums.opensuse.org/archives/sf-archives/archives-64-bit/342593-wrong-elf-class.html">Source</a>.</p>
<h2>[library name]: cannot open shared object file: No such file or directory</h2>
<p>It means that the mentioned library is missing. If you&#8217;re running on a Linux environment without administrative privilege (like, say, your lab&#8217;s cluster) and need a quick fix before the sysop installs the library properly, you can grab the library on another installation, place it in your personal folder, and add this folder to the path, like this:<br />
<code>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/where/you/placed/the/library</code><br />
<a href="http://www.linuxquestions.org/questions/linux-software-2/libtermcap-so-2-cannot-open-shared-object-file-no-such-file-or-directory-216721/">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2344/various-fixes-to-random-small-linux-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing non-working Catalyst Control Center administrative part in Kubuntu</title>
		<link>http://notepad.patheticcockroach.com/2276/fixing-non-working-catalyst-control-center-administrative-part-in-kubuntu/</link>
		<comments>http://notepad.patheticcockroach.com/2276/fixing-non-working-catalyst-control-center-administrative-part-in-kubuntu/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 11:30:48 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[AMD]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2276</guid>
		<description><![CDATA[Under Linux, the ATI/AMD Catalyst Control Center (CCC) can be opened in 2 different ways: as a simple user or as an administrative user. If you are to modify pretty much any setting, you&#8217;ll want to open it as administrative user indeed. The problem is, in Kubuntu, the link to the administrator (sudoer) version of [...]]]></description>
			<content:encoded><![CDATA[<p>Under Linux, the ATI/AMD Catalyst Control Center (CCC) can be opened in 2 different ways: as a simple user or as an administrative user. If you are to modify pretty much any setting, you&#8217;ll want to open it as administrative user indeed. The problem is, in Kubuntu, the link to the administrator (sudoer) version of the Control Center is broken: it uses <code>amdxdg-su -c amdcccle</code>, which pops up some odd-looking sudo prompt and then does nothing. The fix is simple: fix the link with a working sudoing thingy, which in KDE would simply be kdesudo. So, you need to fix the link (or create a new one), pointing it to <code>kdesudo amdcccle</code>.</p>
<p>If you don&#8217;t know how to do this: just right-click on the start menu icon and select &#8220;Edit Applications&#8221;. Then browse to &#8220;Settings&#8221;, and you&#8217;ll find current Catalyst links there.</p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2276/fixing-non-working-catalyst-control-center-administrative-part-in-kubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enable proprietary graphics drivers in Kubuntu</title>
		<link>http://notepad.patheticcockroach.com/2271/enable-proprietary-graphics-drivers-in-kubuntu/</link>
		<comments>http://notepad.patheticcockroach.com/2271/enable-proprietary-graphics-drivers-in-kubuntu/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 18:07:10 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2271</guid>
		<description><![CDATA[It&#8217;s always been a pain in the *** to manually install proprietary video drivers in Linux. Well, at least for NVIDIA and AMD drivers in Fedora and Ubuntu/Kubuntu. The key issue is: every time you upgrade the kernel not only you need to reinstall the graphics drivers but you&#8217;ll have to do it in terrible [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always been a pain in the *** to manually install proprietary video drivers in Linux. Well, at least for NVIDIA and AMD drivers in Fedora and Ubuntu/Kubuntu. The key issue is: every time you upgrade the kernel not only you need to reinstall the graphics drivers but you&#8217;ll have to do it in terrible conditions, ie in recovery mode, because graphics drivers compiled for the previous kernel will just crash everything under the new kernel. Fortunately, in Ubuntu, you can now (I don&#8217;t remember when that option appear, that was a big while ago) automatically install proprietary drivers. The option for this would pop up somewhere on the task bar any time applicable, and then those automatically installed drivers wouldn&#8217;t make a mess of your system with every kernel upgrade. The only drawback is that you end up with quite outdated drivers, though.</p>
<p>Anyway, after that crappy Unity I had to move to Kubuntu, where I had a hard time finding that automated proprietary drivers installation. I eventually found a solution <a href="http://nancib.wordpress.com/2010/08/13/quick-tip-enable-proprietary-video-drivers-on-a-new-kde-install/">there</a>, but the paths indicated there are no longer valid: the proprietary drivers can now be found in the <em>start menu &rarr; Applications &rarr; System &rarr; Additional Drivers</em>. Actually, just typing &#8220;drivers&#8221; in the start menu should bring you to the right place, I guess I should try to use this thing to its full potential <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2271/enable-proprietary-graphics-drivers-in-kubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Switching your SATA hard drive from IDE to AHCI</title>
		<link>http://notepad.patheticcockroach.com/2168/switching-your-sata-hard-drive-from-ide-to-ahci/</link>
		<comments>http://notepad.patheticcockroach.com/2168/switching-your-sata-hard-drive-from-ide-to-ahci/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 08:53:55 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2168</guid>
		<description><![CDATA[AHCI (for Advanced Host Controller Interface) is a standard defined by Intel for operating SATA devices (see Wikipedia for some technical gibberish ). Bottom-line is, switching an SATA hard drive from IDE to AHCI will probably give you a nice speed boost, as you can see in this article (in French, sorry). It&#8217;s supported natively [...]]]></description>
			<content:encoded><![CDATA[<p>AHCI (for Advanced Host Controller Interface) is a standard defined by Intel for operating SATA devices (see <a href="http://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface">Wikipedia</a> for some technical gibberish <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ). Bottom-line is, switching an SATA hard drive from IDE to AHCI will probably give you a nice speed boost, as you can see in <a href="http://www.tt-hardware.com/test/hardware/passer-en-ahci-vraiment-la-galere">this article</a> (in French, sorry). It&#8217;s supported natively in Windows Vista/7 and Linux starting with kernel 2.6.19.</p>
<p>From what I read, there are many potential issues for switching from IDE to AHCI under Windows XP and Vista, and I can&#8217;t test those so I just won&#8217;t cover them. Basically on Windows XP you&#8217;ll need to install AHCI drivers, on Windows Vista you&#8217;ll need to apply the latest updates.</p>
<p>For Windows 7, the drivers are already there, but you need to activate them. That is, if you install Windows 7 on a drive already configured in AHCI, you have nothing to do, all will be handled automatically, but if your hard drive was configured in IDE when you installed Windows 7, then you&#8217;ll need to enable AHCI drivers manually. To do so:</p>
<ul>
<li>Launch regedit (hit start button, type &#8220;regedit&#8221; and hit enter)</li>
<li>Navigate to the <code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\iaStorV</code> key, and change the <em>Start</em> value from 3 to 0</li>
<li>Do the same with key <code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msahci</code></li>
</ul>
<p>That&#8217;s it, your Windows 7 is now ready to run on an AHCI drive. Now you just need to make the switch from IDE to AHCI in your BIOS.</p>
<p>Source: <a href="http://support.microsoft.com/kb/922976">Microsoft Knowledge Base &#8211; Error message when you start a Windows 7 or Windows Vista-based computer after you change the SATA mode of the boot drive: &#8220;STOP 0x0000007B INACCESSABLE_BOOT_DEVICE&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2168/switching-your-sata-hard-drive-from-ide-to-ahci/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few more playing with LVM: creating, mounting and removing a partition</title>
		<link>http://notepad.patheticcockroach.com/2102/a-few-more-playing-with-lvm-creating-mounting-and-removing-a-partition/</link>
		<comments>http://notepad.patheticcockroach.com/2102/a-few-more-playing-with-lvm-creating-mounting-and-removing-a-partition/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 14:31:40 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2102</guid>
		<description><![CDATA[The way 1&#038;1 provide their &#8220;cloud&#8221; (btw, it looks like my feeling about this meaningless word was right, after all ) is really unusual to me and gives me quite a few things to learn about. That&#8217;s how half a year ago I posted about extending and shrinking LVM volumes. It however had an important [...]]]></description>
			<content:encoded><![CDATA[<p>The way 1&#038;1 provide their &#8220;cloud&#8221; (btw, it looks like my feeling about this meaningless word <a href="http://www.gnu.org/philosophy/words-to-avoid.html#CloudComputing">was right, after all</a> <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) is really unusual to me and gives me quite a few things to learn about. That&#8217;s how half a year ago I posted about <a href="http://notepad.patheticcockroach.com/1262/second-impressions-on-1and1-again-or-how-to-deal-with-lvm/">extending and shrinking LVM volumes</a>. It however had an important limitation: once the filesystem is extended, it&#8217;s in most cases not possible to shrink it, so you can forget about shrinking the volume unless you don&#8217;t mind losing the whole partition.<br />
My workaround for that was just to increase volume size on a strict need-more-space basis, which of course leads to quite a massive waste of unused space. A few days ago, I finally searched a way to implement a better solution: creating a new LVM partition. So with all the unused space we can create a temporary partition that we can use to store temporary stuff, and when we need to expand the production partitions, we can just erase the temp partition, expand the prod partitions, then create a new temp partition over the remaining space.</p>
<p>The steps are actually fairly simple:</p>
<ul>
<li>find out the name of your LVM volume(s) and group(s): <code>pvs</code></li>
<li>let&#8217;s say you have a group named &#8220;vg00&#8243; with 50 GiB free space, and we want to create a volume named &#8220;espace1&#8243; which would take all this space. First we check what volumes are already in that group: <code>lvdisplay /dev/vg00</code><br />
Then we create the &#8220;espace1&#8243; volume: <code>lvcreate -L50G -nespace1 vg00</code></li>
<li>now we format it, say, in ext3: <code>mkfs -t ext3 -m 0 -v /dev/vg00/espace1</code><br />
Note that the &#8220;-m 0&#8243; means that we claim back the 5% (&#8220;-m 5&#8243;) space usually reserved for root. This is good for a storage partition, but not a good idea for a system partition.</li>
<li>then we create the mounting point, for instance: <code>mkdir /home/espace1</code></li>
<li>and all we have to do now is to mount it: <code>mount -t ext3 /dev/vg00/espace1 /home/espace1</code></li>
</ul>
<p>That&#8217;s it, your new partition is ready. You can also check out the results using <code>df -h</code>. You&#8217;ll probably want to make sure it&#8217;s automatically mounted at boot time, too: for this just add a line in <code>/etc/fstab</code> (<code>nano /etc/fstab</code>). For instance here&#8217;s our fstab file (note the last line with our new partition):</p>
<pre>/dev/xvda1      /               ext3    defaults        1 1
/dev/xvda2      none            swap    sw
/dev/vg00/usr   /usr            xfs     defaults        0 2
/dev/vg00/var   /var            xfs     defaults        0 2
/dev/vg00/home  /home           xfs     defaults,usrquota       0 2
devpts          /dev/pts        devpts  gid=5,mode=620  0 0
none            /proc           proc    defaults        0 0
none            /tmp    tmpfs   defaults        0 0
/dev/vg00/espace1  /home/espace1    ext3   defaults     0 2</pre>
<p>Finally, to destroy it, you just need to unmount it first, so:<br />
<code>umount /dev/vg00/espace1</code> => unmount<br />
<code>lvremove /dev/vg00/espace1</code> => delete the volume</p>
<p>This time that&#8217;s all, the circle of life of the volume is complete <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Here are the sources I used, in the last one you&#8217;ll also find how to create the whole LVM thing, not just a volume within it like we did here:</p>
<ul>
<li><a href="http://www.ubuntux.org/edit-fstab-to-mount-partition-at-startup">Ubuntux &#8211; Edit fstab to mount partition at startup</a></li>
<li><a href="http://tldp.org/HOWTO/LVM-HOWTO/createlv.html">LVM How-to &#8211; 11.7. Creating a logical volume</a></li>
<li><a href="http://www.walkernews.net/2007/07/02/how-to-create-linux-lvm-in-3-minutes/">Walker News &#8211; How To Create Linux LVM In 3 Minutes</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2102/a-few-more-playing-with-lvm-creating-mounting-and-removing-a-partition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

