<?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>ieatpenguin &#187; Linux</title>
	<atom:link href="http://r-dunn.co.uk/ieatpenguin/category/software/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://r-dunn.co.uk/ieatpenguin</link>
	<description>an odd little man in an odd little world</description>
	<lastBuildDate>Mon, 26 Jul 2010 14:57:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Mounting a network drive in Linux (Ubuntu)</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/mounting-a-network-drive-in-linux/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/mounting-a-network-drive-in-linux/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 12:54:25 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=571</guid>
		<description><![CDATA[This is a very simple thing to do, it isn&#8217;t however as simple as one might think if you are coming from a Windows background, and are used to mapping a network drive from the Tools menu. As a note this is a guide for Ubuntu, although I have it working fine on both Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very simple thing to do, it isn&#8217;t however as simple as one might think if you are coming from a Windows background, and are used to mapping a network drive from the Tools menu. As a note this is a guide for Ubuntu, although I have it working fine on both Ubuntu and Fedora, use the appropriate package manager/command line for Fed and the rest is the same.</p>
<p>First, we need to make sure that samba is installed:</p>
<blockquote><p>sudo apt-get install smbfs</p></blockquote>
<p>Next, we need to make a directory to mount the drive too. As an example, I&#8217;ve just reinstalled my Ubuntu (and Fedora) distribution, and so want to map the music drive on my server. I chose /media/ as the logical place to stick my network drives:</p>
<blockquote><p>sudo mkdir /media/music</p></blockquote>
<p>Next we need to tell the file system table where the drives are, and where to mount them. We also need to include our login credentials (will cover this later).</p>
<blockquote><p>gksudo gedit /etc/fstab</p></blockquote>
<p>Scroll to the bottom of the file and add the following:</p>
<blockquote><p>#Mounting Network Drives<br />
//SERVER/SHARE-NAME /MOUNT-POINT smbfs credentials=/credentials-file-location</p></blockquote>
<p>To make the above make a bit more sense, here is my configuration:</p>
<blockquote><p>//192.168.1.50/Music /media/music smbfs credentials=/home/russell/credentials.smbcredentials<br />
//192.168.1.50/Videos /media/videos smbfs credentials=/home/russell/credentials.smbcredentials<br />
//192.168.1.50/Software /media/software smbfs credentials=/home/russell/credentials.smbcredentials</p></blockquote>
<p>What this will do is to check within the credentials file (more on this at the bottom) your username and password for your server (I am running a Windows Home Server as an example).</p>
<p>Next, we need to make the filesystem mount the drive, which we do simply with:</p>
<blockquote><p>sudo mount -a</p></blockquote>
<p>Finally, we need to make that credentials file. Simply navigate to your chosen directory (I stuck it in my /home/russell directory for ease), create a new file with the following information:</p>
<blockquote><p>username=<em>username</em><br />
password=<em>password</em></p></blockquote>
<p>And save it with the same filename you gave the /fstab/. Thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/mounting-a-network-drive-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync and Bash</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/rsync-and-bash/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/rsync-and-bash/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 10:02:26 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=560</guid>
		<description><![CDATA[Have had an interesting morning delving into Bash, on MSN with Jasper, which is not something I get to do often enough. The upshot was a nice and fairly sophisticated rsync script to backup some files, which I won&#8217;t paste here as it&#8217;s Jaspers baby. However, I did think up a [much] simpler script to [...]]]></description>
			<content:encoded><![CDATA[<p>Have had an interesting morning delving into Bash, on MSN with Jasper, which is not something I get to do often enough.</p>
<p>The upshot was a nice and fairly sophisticated rsync script to backup some files, which I won&#8217;t paste here as it&#8217;s Jaspers baby.</p>
<p>However, I did think up a [much] simpler script to enable a quick and dirty backup of any particular folder to any particular media.</p>
<blockquote><p>
#!/bin/bash<br />
sudo rsync -av &#8211;progress &#8211;delete &#8211;log-file=/dir/$(date +%Y%m%d)_rsync.log /dir /media/dirBackup
</p></blockquote>
<p>You can of course exclude certain files from the backup with:</p>
<blockquote><p>
&#8211;exclude &#8220;/dir/.jpg&#8221;
</p></blockquote>
<p>Naturally, no one wants to type it out everytime and so lets make it into an executable script:</p>
<blockquote><p>
sudo chmod +x /path/rsync-backup.sh
</p></blockquote>
<p>So you now have an executable script you can call whenever you want, or you can of course create a cron job and have it run automatically.</p>
<hr />
Here&#8217;s a slightly more sophisticated backup script that revolves on a weekly basis, and then clears out any backups that are older then this.</p>
<blockquote><p>
#!/bin/sh<br />
# directory to backup<br />
BDIR=/home/$USER</p>
<p># excludes file<br />
EXCLUDES=$HOME/cron/excludes</p>
<p># name of the backup machine<br />
BSERVER=server</p>
<p># password on the backup server<br />
export RSYNC_PASSWORD=</p>
<p># lets get down to it<br />
BACKUPDIR=`date +%A`<br />
OPTS=&#8221;&#8211;force &#8211;ignore-errors &#8211;delete-excluded &#8211;exclude-from=$EXCLUDES<br />
      &#8211;delete &#8211;backup &#8211;backup-dir=/$BACKUPDIR -a&#8221;</p>
<p>export PATH=$PATH:/bin:/usr/bin:/usr/local/bin</p>
<p># the following line clears the last weeks incremental directory<br />
[ -d $HOME/emptydir ] || mkdir $HOME/emptydir<br />
rsync &#8211;delete -a $HOME/emptydir/ $BSERVER::$USER/$BACKUPDIR/<br />
rmdir $HOME/emptydir</p>
<p># now the actual transfer<br />
rsync $OPTS $BDIR $BSERVER::$USER/current
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/rsync-and-bash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A long read, but worth it.</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/a-long-read-but-worth-it/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/a-long-read-but-worth-it/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 10:49:07 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=157</guid>
		<description><![CDATA[Happy 17th birthday Linux. In the Beginning was the Command Line by Neal Stephenson.]]></description>
			<content:encoded><![CDATA[<p>Happy 17th birthday Linux.</p>
<p><a title="In the Beginning was the Command Line" href="http://artlung.com/smorgasborg/C_R_Y_P_T_O_N_O_M_I_C_O_N.shtml">In the Beginning was the Command Line</a> by Neal Stephenson.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/a-long-read-but-worth-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nvidia, Forcedeth and Ubuntu (Hardy Heron)</title>
		<link>http://r-dunn.co.uk/ieatpenguin/software/nvidia-forcedeth-and-hardy-heron/</link>
		<comments>http://r-dunn.co.uk/ieatpenguin/software/nvidia-forcedeth-and-hardy-heron/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 09:52:44 +0000</pubDate>
		<dc:creator>Russell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://r-dunn.co.uk/ieatpenguin/?p=141</guid>
		<description><![CDATA[If, like me, you are a fan of Ubuntu and a fan of keeping up to date, then you will have [fairly]recently upgraded to Ubuntu 8.04, or Hardy Heron. If, like me, you have an nvidia chipset, and networking drivers on your motherboard, chances are you will be using Forcedeth drivers when booting a fresh [...]]]></description>
			<content:encoded><![CDATA[<p>If, like me, you are a fan of Ubuntu and a fan of keeping up to date, then you will have [fairly]recently upgraded to Ubuntu <strong>8.04</strong>, or <em>Hardy Heron</em>.</p>
<p>If, like me, you have an nvidia chipset, and networking drivers on your motherboard, chances are you will be using Forcedeth drivers when booting a fresh install/upgrade. This can cause problems with the ethernet controller, rendering your NIC non-working.</p>
<p>Based on a motherboard running the <strong>Nvidia Nforce2 570</strong> chipset.</p>
<p>Here is a fix:</p>
<p>Open a terminal and set:</p>
<div style="margin: 5px 20px 20px;">
<table border="0" cellspacing="0" cellpadding="6" width="100%">
<tbody>
<tr>
<td class="alt2" style="border: 1px inset ;"><span style="font-family: Courier New;">$ sudo su</p>
<p># rmmod forcedeth</p>
<p># modprobe forcedeth msi=0 msix=0</p>
<p># /etc/init.d/networking restart</p>
<p></span></td>
</tr>
</tbody>
</table>
</div>
<p>This will hopefully get your network up and running (if you&#8217;ve had problems). This works on the current session.</p>
<p>However, who wants to type that in every time you boot your computer? A few options here: You can either put it into a boot-time run script, or you can edit your config to automatically set it when the kernel runs it, which is what I&#8217;ve done:</p>
<div style="margin: 5px 20px 20px;">
<table border="0" cellspacing="0" cellpadding="6" width="100%">
<tbody>
<tr>
<td class="alt2" style="border: 1px inset ;"><span style="font-family: Courier New;">vi /etc/modprobe.d/options</span></td>
</tr>
</tbody>
</table>
</div>
<p>added the parameters line:</p>
<div style="margin: 5px 20px 20px;">
<table border="0" cellspacing="0" cellpadding="6" width="100%">
<tbody>
<tr>
<td class="alt2" style="border: 1px inset ;"><span style="font-family: Courier New;">options forcedeth msi=0 msix=0</span></td>
</tr>
</tbody>
</table>
</div>
<p>and then made the changes to the system (assuming you are still logged in as root, otherwise sudo su/password):</p>
<div style="margin: 5px 20px 20px;">
<table style="height: 59px;" border="0" cellspacing="0" cellpadding="6" width="565">
<tbody>
<tr>
<td class="alt2" style="border: 1px inset;"><span style="font-family: Courier New;">root@Macgyver: /etc/modprobe.d# update-initramfs -u</span><br />
<em>Terminal returns:</em> <span style="font-family: Courier New;">update-initramfs: Generating /boot/initrd.img-2.6.24-19-generic</span></td>
</tr>
</tbody>
</table>
</div>
<p>Thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://r-dunn.co.uk/ieatpenguin/software/nvidia-forcedeth-and-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
