<?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>Tech Scribblings &#187; linux</title>
	<atom:link href="http://tech.pedersen-live.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.pedersen-live.com</link>
	<description></description>
	<lastBuildDate>Tue, 10 Nov 2009 05:16:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Set up SLES/SuSE for imaging or as a virtual machine</title>
		<link>http://tech.pedersen-live.com/2009/08/set-up-slessuse-for-imaging-or-as-a-virtual-machine/</link>
		<comments>http://tech.pedersen-live.com/2009/08/set-up-slessuse-for-imaging-or-as-a-virtual-machine/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 21:17:54 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[imaging]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://tech.pedersen-live.com/?p=55</guid>
		<description><![CDATA[I test software on SLES/SLED machines and it is always a pain trying to prepare images for re-use in other locations. SuSE uses hardware specific IDs for booting and configuring network interfaces by default so if you try to make an image and use it on another machine you are out of luck. Also, making [...]]]></description>
			<content:encoded><![CDATA[<p>I test software on SLES/SLED machines and it is always a pain trying to prepare images for re-use in other locations. SuSE uses hardware specific IDs for booting and configuring network interfaces by default so if you try to make an image and use it on another machine you are out of luck. Also, making VMWare images and cloning them creates all new hardware IDs as well so no cloning of the VMs either. Today I finally found a good way to fix all these problems so that network interfaces are set up automatically upon boot for DHCP and GRUB won&#8217;t boot using the /dev/disks/by-id/ location but just the /dev/sdaX location.</p>
<p>I found these tips on the Novell Cool Solutions page. One from <a href="http://www.novell.com/communities/node/1516/imaging-sled-10-sp1-workstation" target="_blank">http://www.novell.com/communities/node/1516/imaging-sled-10-sp1-workstation</a> and another from <a href="http://www.novell.com/communities/node/5789/automatic-network-configuration-and-edirectory-configuration-bootable-vmware-images" target="_blank">http://www.novell.com/communities/node/5789/automatic-network-configuration-and-edirectory-configuration-bootable-vmware-images</a>.</p>
<p>There are just two general steps that need to take place. First, make it so GRUB boots using the device name and not the device ID. To do this:</p>
<ol>
<li>Open Yast</li>
<li>Navigate to System -&gt; Partitioner</li>
<li>For each partition that will be mounted click Edit, Fstab Options, and select Device name rather than Device ID</li>
<li>Apply those settings</li>
<li>Now open Yast -&gt; System -&gt; Bootloader</li>
<li>For each entry click edit and for the root device select the proper device name</li>
<li>Apply those settings and you are done</li>
</ol>
<p>The second issue has to do with the device ID of the network card changing and so it is not configured for DHCP on boot. To make all your network interfaces configure automatically with DHCP on boot you need to be able to generate ifcfg-eth-id network configuration files for the interfaces on boot. To do this</p>
<ol>
<li>Download <a href="http://files.pedersen-live.com/buildeth0" target="_self">this buildeth0 script</a> from (This was taken from a set of scripts on the second Novell link above)
<ol>
<li>If you are running SLES/SLED 11 then download <a href="http://files.pedersen-live.com/buildeth0.sle11" target="_blank">this script</a> and rename it to buildeth0</li>
</ol>
</li>
<li>Copy the script buildeth0 to /etc/init.d/.  Be sure to chmod 755 the script so it will execute.</li>
<li>Now, add the script to the default run-levels rc3 and rc5 by running &#8220;chkconfig -a buildeth0&#8243;</li>
</ol>
<p>This script requires that the persistent names are enforced and generated when your machine boots. This is already on by default in SLES/SLED. When the machine boots it will check all the devices connected and create persistent names for any ethernet device in /etc/udev/rules.d/30-net_persistent_names.rules. The script will check that file for any entries. It will then check to see if each of those entries have configuration information setup in /etc/sysconfig/network/ifcfg-eth-id-&#8230; if not it will generate that file automatically and configure the interface with DHCP. When the network is setup it will see the configuration there and configure the interface with DHCP.</p>
<p>To prepare for taking an image you should remove all the configuration information already setup for your machine so that when the new device boots it doesn&#8217;t wait for non-existing interfaces to be set up.</p>
<ol>
<li>rm /etc/sysconfig/network/ifcfg-eth-id*</li>
<li>Edit /etc/udev/rules.d/30-net_persistent_names.rules and remove any SUBSYSTEM==&#8221;net&#8221; lines. (Don&#8217;t just comment them out)</li>
</ol>
<p>That&#8217;s it, just shutdown and take a snapshot/image of the machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.pedersen-live.com/2009/08/set-up-slessuse-for-imaging-or-as-a-virtual-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the number of files in a directory</title>
		<link>http://tech.pedersen-live.com/2008/12/find-the-number-of-files-in-a-directory/</link>
		<comments>http://tech.pedersen-live.com/2008/12/find-the-number-of-files-in-a-directory/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 05:07:46 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tech.pedersen-live.com/?p=12</guid>
		<description><![CDATA[So I needed to find the number of files in a directory recursively. I found a great way to figure that out on Linux that has helped me a couple times now. I definitely need to remember it&#8230;anyway here is is:
find /my/directory -type f &#124;wc -l
If you need to find the number of directories recursively [...]]]></description>
			<content:encoded><![CDATA[<p>So I needed to find the number of files in a directory recursively. I found a great way to figure that out on Linux that has helped me a couple times now. I definitely need to remember it&#8230;anyway here is is:</p>
<p>find /my/directory -type f |wc -l</p>
<p>If you need to find the number of directories recursively then do:</p>
<p>find /my/directory -type d | wc -l</p>
<p>Find will just print out all the files it finds. It you tell find a type to find it will only print files of that type (f for file, d for directory). wc will just count the number of lines in the output</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.pedersen-live.com/2008/12/find-the-number-of-files-in-a-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Numpad not working in Ubuntu</title>
		<link>http://tech.pedersen-live.com/2008/12/numpad-not-working-in-ubuntu/</link>
		<comments>http://tech.pedersen-live.com/2008/12/numpad-not-working-in-ubuntu/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 04:13:49 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tech.pedersen-live.com/?p=8</guid>
		<description><![CDATA[For the last several months on my Ubuntu machine at work the numpad has not been working. It has been so frustrating. I would turn the numlock on and off and nothing would seem to get it to work.
I thought it was something wrong with the keyboard or possibly after a kernel update one of [...]]]></description>
			<content:encoded><![CDATA[<p>For the last several months on my Ubuntu machine at work the numpad has not been working. It has been so frustrating. I would turn the numlock on and off and nothing would seem to get it to work.</p>
<p>I thought it was something wrong with the keyboard or possibly after a kernel update one of the drivers changed and killed it for some reason. I was on Hardy and haven&#8217;t taken the time to update to Intrepid yet. I just figured after I update to Intrepid it would fix the problem. Turns out it probably would have but I fixed it without having to upgrade yet.</p>
<p>This problem actually has to do with Gnome&#8217;s Accessibility settings! I found out that if I type 2,4,6, or 8 on the key pad it moved the mouse around by tiny amounts, almost unnoticeable.</p>
<p>To fix the problem I just went to System -&gt; Preferences -&gt; Assistive Technologies, clicked on Mouse Accessibility, selected the mouse keys tab and unchecked the &#8220;Allow to control the pointer with keyboard&#8221; option. That fixed it!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.pedersen-live.com/2008/12/numpad-not-working-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Filesystem</title>
		<link>http://tech.pedersen-live.com/2008/11/ssh-filesystem/</link>
		<comments>http://tech.pedersen-live.com/2008/11/ssh-filesystem/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 00:49:25 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://tech.pedersen-live.com/?p=6</guid>
		<description><![CDATA[Holy cow, this about blew my mind. I was working on a simple little website that had no FTP access so I was just planning on copying all the files down to check out the site and see how things were working. Obviously it is not fun to do that. Well I did have SSH [...]]]></description>
			<content:encoded><![CDATA[<p>Holy cow, this about blew my mind. I was working on a simple little website that had no FTP access so I was just planning on copying all the files down to check out the site and see how things were working. Obviously it is not fun to do that. Well I did have SSH access to the server and so I was trying to see what images were which, well, I didn&#8217;t really want to scp all the files I wanted to preview one-by-one. Oh, and I didn&#8217;t have root access and wasn&#8217;t sure if it had NFS available or not. That&#8217;s when I found out about sshfs!</p>
<p>With sshfs I can mount all the files locally over an SSH connection! To do this I:</p>
<p>sudo apt-get install sshfs</p>
<p>Edit /etc/modules and add a line that says &#8216;fuse&#8217; if it is not there already</p>
<p>Add myself to the fuse user group:</p>
<p>sudo adduser username fuse</p>
<p>Then just mount the filesystem:</p>
<p>sshfs username@host:/path/to/remote/files /media/mount-point</p>
<p>Then to unmount do:</p>
<p>fusermount -u /media/mount-point</p>
<p>That&#8217;s it. It was so nice to work on all the files using my local tools and apps. Obviously this is not the best idea for changing a production server but it just provides a little nicer look at the remote files.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.pedersen-live.com/2008/11/ssh-filesystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnome Default Programs</title>
		<link>http://tech.pedersen-live.com/2008/11/gnome-default-programs/</link>
		<comments>http://tech.pedersen-live.com/2008/11/gnome-default-programs/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 04:30:51 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tech.pedersen-live.com/?p=3</guid>
		<description><![CDATA[I had installed Adobe Reader to replace the default eVince document viewer. The problem was that PDFs I opened in Nautilus still opened with eVince. I wanted to know how to fix it so it would always open with Adobe Reader.
In order to do that you need to navigate to the file you want to [...]]]></description>
			<content:encoded><![CDATA[<p>I had installed Adobe Reader to replace the default eVince document viewer. The problem was that PDFs I opened in Nautilus still opened with eVince. I wanted to know how to fix it so it would always open with Adobe Reader.</p>
<p>In order to do that you need to navigate to the file you want to open with a certain program in Nautilus. Right click on the file and click on Properties. Open the &#8220;Open With&#8221; tab. Select the program you want to open the file.</p>
<p>Thats it! So easy, and much better than the Windows way of doing it, you just have to know where to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.pedersen-live.com/2008/11/gnome-default-programs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
