<?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>Simon Cook &#187; Linux</title>
	<atom:link href="http://simoncook.org/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://simoncook.org</link>
	<description>The future is... on a CD? Now where&#039;s that blasted disc gone?</description>
	<lastBuildDate>Sun, 22 Aug 2010 19:43:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Pulling random data from /dev/random</title>
		<link>http://simoncook.org/blog/2010/02/pulling-random-data-from-devrandom/</link>
		<comments>http://simoncook.org/blog/2010/02/pulling-random-data-from-devrandom/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 06:55:44 +0000</pubDate>
		<dc:creator>Si</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[/dev/random]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://simoncook.org/?p=408</guid>
		<description><![CDATA[This is a shell script that will pull 5 random characters from /dev/random and print them out to standard output. It was created as the input component for a random password generator that I am currently writing. Note on using /dev/random: as usual, using this source for entropy will give you pure randomness, though due [...]]]></description>
			<content:encoded><![CDATA[<p>This is a shell script that will pull 5 random characters from /dev/random and print them out to standard output. It was created as the input component for a random password generator that I am currently writing.</p>
<p><strong>Note on using /dev/random</strong>: as usual, using this source for entropy will give you pure randomness, though due to the nature of the random source (see <a href="http://en.wikipedia.org/wiki//dev/random">Wikipedia entry on /dev/random</a>) the script may sometimes lock up and fail to generate a complete output, as it has run out of randomness. If you are intending to use this alot, then it is advised to use /dev/urandom that doesn&#8217;t block, although that comes at the cost of a small bit of entropy.<br />
<span id="more-408"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># Script for pulling x characters from a random source</span>
<span style="color: #666666; font-style: italic;">#   and prints them out to stdout</span>
<span style="color: #666666; font-style: italic;"># Version 1.0.0</span>
<span style="color: #666666; font-style: italic;"># By Simon Cook (http://simoncook.org)</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Fill in the two variables below</span>
<span style="color: #666666; font-style: italic;">#  &quot;entropy&quot; is the source of randomness</span>
<span style="color: #666666; font-style: italic;">#  &quot;chars&quot; is the number of chars we want</span>
<span style="color: #007800;">entropy</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>random
<span style="color: #007800;">chars</span>=<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Pull x characters from source</span>
<span style="color: #007800;">i</span>=<span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-n1</span> char
<span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$char</span>&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span> i++ <span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span>&quot;</span> <span style="color: #660033;">-eq</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$chars</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
   <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #ff0000;">&quot;<span style="color: #007800;">$entropy</span>&quot;</span></pre></div></div>

<p><strong> Licensing:</strong> This small script is released under the CC-GNU GPL licence.</p>
<p><!-- Creative Commons License --><br />
<a href="http://creativecommons.org/licenses/GPL/2.0/"><br />
<img src="http://creativecommons.org/images/public/cc-GPL-a.png" border="0" alt="CC-GNU GPL" /></a><!-- /Creative Commons License -->.</p>
]]></content:encoded>
			<wfw:commentRss>http://simoncook.org/blog/2010/02/pulling-random-data-from-devrandom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to upgrade from Fedora 9 to 10 using Yum</title>
		<link>http://simoncook.org/blog/2008/11/how-to-upgrade-from-fedora-9-to-10-using-yum/</link>
		<comments>http://simoncook.org/blog/2008/11/how-to-upgrade-from-fedora-9-to-10-using-yum/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 16:58:49 +0000</pubDate>
		<dc:creator>Si</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.spcook.co.uk/?p=189</guid>
		<description><![CDATA[On Tuesday, the latest version of Fedora came out which includes the usual round-up of new updates for several purposes, which can be read http://docs.fedoraproject.org/release-notes/f10/en_US/index.html#sn-Fedora_10_overview I use a Fedora 9 server, which I can&#8217;t get to, so the normal method of putting a disc in and letting anaconda do all the work just isn&#8217;t suitable [...]]]></description>
			<content:encoded><![CDATA[<p>On Tuesday, the latest version of Fedora came out which includes the usual round-up of new updates for several purposes, which can be read <a href="http://docs.fedoraproject.org/release-notes/f10/en_US/index.html#sn-Fedora_10_overview">http://docs.fedoraproject.org/release-notes/f10/en_US/index.html#sn-Fedora_10_overview</a></p>
<p>I use a Fedora 9 server, which I can&#8217;t get to, so the normal method of putting a disc in and letting anaconda do all the work just isn&#8217;t suitable for me, so using yum I &#8220;upgraded&#8221; by telling yum to use the Fedora 10 repos and then getting the system to update from this. This method is somewhat risky, but for this case it seemed to turn out well. Previously this method has caused funny problems with X-server, but as I don&#8217;t use any x applications (everything is just command line for me) this wasnt an issue.</p>
<p>The steps I used to set up this system was as follows.</p>
<ol>
<li>Firstly, make sure your Fedora 9 installation is as up to date as possible. This is done in the normal way, and for this, it is probabily best if you clear your cache of any repos.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum clean all <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> yum update <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> yum clean all</pre></div></div>

<p>You will notice I clear the repo cache twice, this is to make sure that when we get it to do the upgrade, it doesnt try to use any old F9 repos.</li>
<li>Remove any extra repos other than the default Fedora ones, to minimise package conflicts even further. These files can be found in <em>/etc/yum.repos.d/</em></li>
<li>Run the following command into rpm to get fedora to believe it is Fedora 10 and then to update itself to it:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rpm <span style="color: #660033;">-Uhv</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.mirrorservice.org<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>download.fedora.redhat.com<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>fedora<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span><span style="color: #000000; font-weight: bold;">/</span>Fedora<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Packages<span style="color: #000000; font-weight: bold;">/</span>fedora-release-<span style="color: #000000;">10</span>-1.noarch.rpm http:<span style="color: #000000; font-weight: bold;">//</span>www.mirrorservice.org<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>download.fedora.redhat.com<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>fedora<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span><span style="color: #000000; font-weight: bold;">/</span>Fedora<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Packages<span style="color: #000000; font-weight: bold;">/</span>fedora-release-notes-10.0.0.1.noarch.rpm</pre></div></div>

</li>
<li>Run another yum update, this time it will download a lot of packages as this will now upgrade you to Fedora 10</li>
<li>Reboot using the reboot command</li>
<li>Pray (a little)</li>
<li>Say hello to Fedora 10</li>
</ol>
<p>You should now be running a proper version of Fedora 10. Note however that using an installation disc and upgrading using anaconda is still the recommended method of upgrading, but for those that cannot do that, at least this offers an alternative.</p>
<p>Note however that due to to some changes that happen between versions, you might notice some slight bugs running a new version upgraded in this way. I have yet to see any of these probems, but that is not to say that there aren&#8217;t any. Problems that are found will have to be fixed some other way, and I cannot be held responsible for any of these. Basically, here is a method but it is unsupported so it&#8217;s at your own risk.</p>
<p>I hope these instructions will come in handy to someone at some point, but basically if you need them, they are here.</p>
]]></content:encoded>
			<wfw:commentRss>http://simoncook.org/blog/2008/11/how-to-upgrade-from-fedora-9-to-10-using-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
