<?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>Lightningone.co.uk</title>
	<atom:link href="http://www.lightningone.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lightningone.co.uk</link>
	<description>Web Dev, Design &#38; Tech playground of Luke Jeffries</description>
	<lastBuildDate>Mon, 07 May 2012 21:05:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Using Imagemagick to make PDF&#8217;s from JPG&#8217;s</title>
		<link>http://www.lightningone.co.uk/using-imagemagick-to-make-pdfs-from-jpgs/</link>
		<comments>http://www.lightningone.co.uk/using-imagemagick-to-make-pdfs-from-jpgs/#comments</comments>
		<pubDate>Mon, 07 May 2012 21:03:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=59</guid>
		<description><![CDATA[I discovered the virtues of Imagemagick today. I needed to convert pages of a document that were individual JPG images into a single PDF document. After installing imagemagick all you need to do is browse to the folder containing the &#8230; <a href="http://www.lightningone.co.uk/using-imagemagick-to-make-pdfs-from-jpgs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I discovered the virtues of Imagemagick today. I needed to convert pages of a document that were individual JPG images into a single PDF document.</p>
<p>After installing imagemagick all you need to do is browse to the folder containing the JPG&#8217;s in a cmd window and use the following command:</p>
<p><code>convert *.jpg -density 300x300 -compress jpeg my.pdf</code></p>
<p>Imagemagick can be downloaded from here: <a title="Imagemagick homepage" href="http://www.imagemagick.org/script/index.php" target="_blank">http://www.imagemagick.org/script/index.php</a></p>
<p><code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/using-imagemagick-to-make-pdfs-from-jpgs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wedding Website!</title>
		<link>http://www.lightningone.co.uk/wedding-website/</link>
		<comments>http://www.lightningone.co.uk/wedding-website/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 12:12:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=56</guid>
		<description><![CDATA[Our wedding website is now up and working! Luke Jeffries and Joanna Pearson wedding website! &#160;]]></description>
			<content:encoded><![CDATA[<p>Our wedding website is now up and working!</p>
<p><a title="Luke Jeffries and Joanna Pearson Wedding Website" href="http://www.celebrationoflove.co.uk" target="_blank">Luke Jeffries and Joanna Pearson wedding website! </a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/wedding-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 columns in twentyeleven WordPress theme</title>
		<link>http://www.lightningone.co.uk/3-columns-in-twentyeleven-wordpress-theme/</link>
		<comments>http://www.lightningone.co.uk/3-columns-in-twentyeleven-wordpress-theme/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 15:25:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=43</guid>
		<description><![CDATA[The twentyeleven wordpress theme is the default theme in the latest version of wordpress and probably the first theme you will dig around in to see how it works in WordPress. Modifying the theme to have 3 columns on the &#8230; <a href="http://www.lightningone.co.uk/3-columns-in-twentyeleven-wordpress-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lightningone.co.uk/wp-content/uploads/2011/12/3col.png"><img class="alignleft size-full wp-image-49" title="3col" src="http://www.lightningone.co.uk/wp-content/uploads/2011/12/3col.png" alt="" width="205" height="215" /></a>The twentyeleven wordpress theme is the default theme in the latest version of wordpress and probably the first theme you will dig around in to see how it works in WordPress.</p>
<p>Modifying the theme to have 3 columns on the front page is surprisingly easy and after creating a few files you can make your front page look rather different to the original them.</p>
<p>The layout I wanted was to be able to have the latest post as a full width chunk at the top of the page with 6 excerpts in columns see figure 1.</p>
<p>WordPress has the ability to use a file called home.php for its home page if it exsits in the root of your template folder. This is handy because we can then create a copy of the index.php file and edit that rather than modifying the index.php directly.<br />
<span id="more-43"></span><br />
The PHP script comprises of 4 different loops. 1 loop to do do the top section and 3 other loops to fill out the posts in the columns.</p>
<p>To do this, each loop must have 3 bits of information to allow the loop to display the correct amount of posts in the correct order across the columns.</p>
<ul>
<li>showposts=2</li>
<li>numberposts=2&amp;offset=5</li>
<li>$count0 == “2″</li>
</ul>
<p>The ‘showposts’ argument determines how many posts wordpress gets from the database. ‘Numberposts’ determins how many posts are displayed within the loop its self and the ‘offset=0′ argument determines how posts to skip before displaying the correct post. This allows us to make sure that every post is unique and in order. The final bit of code is the ‘$count0 == “2″‘ which determines how many times the loop must loop to complete.</p>
<h1>The Code</h1>
<h2>File header section</h2>
<p>This is the standard code taken from the index.php which has just been modified to reflect the new file information.</p>
<pre class="brush:php">&lt;?php
/**home.php
 * The main home template file.
 *
 *
 *
 *
 * @package WordPress
 * @subpackage lightningone
 */

get_header(); ?&gt;

		&lt;div id="primary"&gt;
			&lt;div id="content" role="main"&gt;

			&lt;?php if ( have_posts() ) : ?&gt;

				&lt;?php twentyeleven_content_nav( 'nav-above' ); ?&gt;</pre>
<h2>Top Section, loop 1</h2>
<p>This is the start of the post content displayed in the top section of the page. This will display a chunk of the post with a ‘more’ link at the bottom allow the reader to carry on reading.</p>
<pre class="brush:php">&lt;?php /* THIS IS THE START OF POST 1 IN THE VERY TOP SECTION OF THE LAYOUT */ ?&gt;
	&lt;header class="entry-header"&gt;
	&lt;?php /* LETS THE WORDPRESS LOOP KNOW HOW MANY POSTS TO SELECT - 1 IN THIS CASE, WHICH WILL START WITH THE LATEST POST (OFFSET=0 AND THE COUNT OF 1 TO ONLY LOOP ONCE */ ?&gt;
	&lt;?php query_posts('showposts=1'); ?&gt;
	&lt;?php $posts = get_posts('numberposts=1&amp;offset=0'); foreach ($posts as $post) : start_wp(); ?&gt;
	&lt;?php static $count1 = 0; if ($count0 == "1") { break; } else { ?&gt;
	&lt;?php/* TITLE OUTPUT WITH LARGE HEADING AND LINK TO POST*/?&gt;
	&lt;h1 class="entry-title"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
	&lt;?php if ( 'post' == get_post_type() ) : ?&gt;
		&lt;div class="entry-meta"&gt;
		&lt;?php/* DISPLAY DATE OF POST*/?&gt;
		&lt;?php twentyeleven_posted_on(); ?&gt;
		&lt;/div&gt;&lt;!-- .entry-meta --&gt;
		&lt;?php endif; ?&gt;
	&lt;?php/*DISPLAY POST CONTENT*/?&gt;
	&lt;?php the_content(); ?&gt;
	&lt;?php $count0++; } ?&gt;
&lt;?php endforeach; ?&gt;
&lt;/header&gt;
&lt;?php /* END SECTION TOP SECTION WITH A THIN LINE &lt;HR&gt;&lt;/HR&gt; */ ?&gt;
&lt;div class="hr"&gt;&lt;hr /&gt;&lt;/div&gt;</pre>
<h2>First column , loop 2</h2>
<p>This is the start of the first column and uses the second loop to display posts 2 and 3. We use the &lt;div id=”column_01″&gt; to allow our css to format the column.</p>
<pre class="brush:php">&lt;?php	/* START OF THE FIRST COL LOOP */ ?&gt;
	&lt;div id="column_01"&gt;
	&lt;?php /* IN THIS COL WE TELL WORDPRESS TO SHOW 2 POSTS WITH AN OFFSET OF 1 MEANING IT WILL START WITH THE SECOND NEWEST POST FIRST */ ?&gt;
	&lt;?php query_posts('showposts=2'); ?&gt;
	&lt;?php $posts = get_posts('numberposts=2&amp;offset=1'); foreach ($posts as $post) : start_wp(); ?&gt;
	&lt;?php static $count1 = 0; if ($count1 == "2") { break; } else { ?&gt;
	&lt;?php/* TITLE OUTPUT WITH SMALL HEADINGS AND LINK TO POST*/?&gt;
	&lt;h1 class="entry-title-small"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
	&lt;?php if ( 'post' == get_post_type() ) : ?&gt;
	&lt;div class="entry-meta"&gt;
	&lt;?php/* DISPLAY DATE OF POST*/?&gt;
	&lt;?php twentyeleven_posted_on(); ?&gt;
	&lt;/div&gt;&lt;!-- .entry-meta --&gt;
	&lt;?php endif; ?&gt;
	&lt;?php/*DISPLAY POST EXCERPT*/?&gt;
	&lt;?php the_excerpt(); ?&gt;
	&lt;div class="hr"&gt;&lt;hr /&gt;&lt;/div&gt;
	&lt;?php $count1++; } ?&gt;
	&lt;?php endforeach; ?&gt;
	&lt;?php /* END FIRST COL */ ?&gt;
&lt;/div&gt;</pre>
<h2>Second column , loop <strong>3</strong></h2>
<p>As with the first column this uses the third loop to display posts 4 and 5. Colums 2 and 3 use a wrapper div (&lt;div id=”column_wrap”&gt;) to make sure the forming of the columns work properly.</p>
<pre class="brush:php">&lt;?php/* START OF SECOND COL LOOP WITH SAME CODE AS ABOVE ONLY THIS TIME THE OFFSET IS 3 SO THAT THE COL WILL START WITH THE 4TH NEWEST POST */?&gt;
	&lt;div id="column_wrap"&gt;
		&lt;div id="column_02"&gt;
		&lt;?php query_posts('showposts=2'); ?&gt;
		&lt;?php $posts = get_posts('numberposts=2&amp;offset=3'); foreach ($posts as $post) : start_wp(); ?&gt;
		&lt;?php static $count2 = 0; if ($count2 == "2") { break; } else { ?&gt;
		&lt;?php/* TITLE OUTPUT WITH SMALL HEADINGS AND LINK TO POST*/?&gt;
		&lt;h1 class="entry-title-small"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
		&lt;?php if ( 'post' == get_post_type() ) : ?&gt;
		&lt;div class="entry-meta"&gt;
		&lt;?php/* DISPLAY DATE OF POST*/?&gt;
		&lt;?php twentyeleven_posted_on(); ?&gt;
		&lt;/div&gt;&lt;!-- .entry-meta --&gt;
		&lt;?php endif; ?&gt;
		&lt;?php/*DISPLAY POST EXCERPT*/?&gt;
		&lt;?php the_excerpt(); ?&gt;
		&lt;div class="hr"&gt;&lt;hr /&gt;&lt;/div&gt;
		&lt;?php $count2++; } ?&gt;
		&lt;?php endforeach; ?&gt;
	&lt;?php /* END SECOND COL */ ?&gt;
&lt;/div&gt;</pre>
<h2>Third column , loop 4</h2>
<p>Again, the third column uses the last loop to display posts 6 and 7.</p>
<pre class="brush:php">&lt;?php/* START OF THIRD COL LOOP WITH SAME CODE AS ABOVE ONLY THIS TIME THE OFFSET IS 5 SO THAT THE COL WILL START WITH THE 6TH NEWEST POST */?&gt;
	&lt;div id="column_03"&gt;
	&lt;?php query_posts('showposts=2'); ?&gt;
	&lt;?php $posts = get_posts('numberposts=2&amp;offset=5'); foreach ($posts as $post) : start_wp(); ?&gt;
	&lt;?php static $count3 = 0; if ($count3 == "2") { break; } else { ?&gt;
	&lt;?php/* TITLE OUTPUT WITH SMALL HEADINGS AND LINK TO POST*/?&gt;
	&lt;h1 class="entry-title-small"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
	&lt;?php if ( 'post' == get_post_type() ) : ?&gt;
	&lt;div class="entry-meta"&gt;
	&lt;?php/* DISPLAY DATE OF POST*/?&gt;
	&lt;?php twentyeleven_posted_on(); ?&gt;
	&lt;/div&gt;&lt;!-- .entry-meta --&gt;
	&lt;?php endif; ?&gt;
	&lt;?php/*DISPLAY POST EXCERPT*/?&gt;
	&lt;?php the_excerpt(); ?&gt;
	&lt;div class="hr"&gt;&lt;hr /&gt;&lt;/div&gt;
	&lt;?php $count3++; } ?&gt;
	&lt;?php endforeach; ?&gt;
	&lt;?php /* END THIRD COL */ ?&gt;
	&lt;/div&gt;
&lt;/div&gt;</pre>
<h2>File footer section</h2>
<p>As with the the header section this is just a section of code taken from the index.php file in the twentyeleven theme.</p>
<pre class="brush:php">&lt;?php twentyeleven_content_nav( 'nav-below' ); ?&gt;
&lt;?php else : ?&gt;
&lt;article id="post-0" class="post no-results not-found"&gt;
&lt;header class="entry-header"&gt;
&lt;h1 class="entry-title"&gt;&lt;?php _e( 'Nothing Found', 'twentyeleven' ); ?&gt;&lt;/h1&gt;
&lt;/header&gt;&lt;!-- .entry-header --&gt;

	&lt;div class="entry-content"&gt;
	&lt;p&gt;&lt;?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?&gt;&lt;/p&gt;
	&lt;?php get_search_form(); ?&gt;
	&lt;/div&gt;&lt;!-- .entry-content --&gt;
	&lt;/article&gt;&lt;!-- #post-0 --&gt;
	&lt;?php endif; ?&gt;
	&lt;/div&gt;&lt;!-- #content --&gt;
	&lt;/div&gt;&lt;!-- #primary --&gt;
&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;</pre>
<h2>CSS to format columns</h2>
<p>The 3 column layout requires a bit of CSS to format the divs located in between the code. Without this CSS the layout wont work.</p>
<pre class="brush:css">/* three column layout */
div#column_01 {
	float: left;
	clear: none;
	width: 30%;
	}
div#column_wrap {
	float: right;
	clear: none;
	width: 68%;
	}
	div#column_02 {
		float: left;
		clear: none;
		width: 45%;
		border-left: 1px solid #ccc;
		border-right: 1px solid #ccc;
		padding-left: 5%;
		padding-right: 5%;
		}
	div#column_03 {
		float: right;
		clear: none;
		width: 45%;
		}</pre>
<p>Reference site: <a href="http://perishablepress.com/press/2008/09/01/multiple-loops-and-multiple-columns-with-wordpress/" target="_blank">http://perishablepress.com/press/2008/09/01/multiple-loops-and-multiple-<strong>columns</strong>-with-<strong>wordpress</strong>/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/3-columns-in-twentyeleven-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Recovery using ddRescue</title>
		<link>http://www.lightningone.co.uk/data-recovery-using-ddrescue/</link>
		<comments>http://www.lightningone.co.uk/data-recovery-using-ddrescue/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 16:17:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=33</guid>
		<description><![CDATA[While at work today I came up against a booting (to a fashion) Windows XP laptop that had the symptoms of a failing hard disk. Lots of disk errors in the log etc.. My first thought was to backup the &#8230; <a href="http://www.lightningone.co.uk/data-recovery-using-ddrescue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lightningone.co.uk/wp-content/uploads/2011/12/ddrescue-on-pclinuxos-2008-300x219.png"><img class="alignleft size-full wp-image-34" title="ddrescue-on-pclinuxos-2008-300x219" src="http://www.lightningone.co.uk/wp-content/uploads/2011/12/ddrescue-on-pclinuxos-2008-300x219.png" alt="" width="300" height="219" /></a>While at work today I came up against a booting (to a fashion) Windows XP laptop that had the symptoms of a failing hard disk. Lots of disk errors in the log etc.. My first thought was to backup the data but unfortunately due to disk corruption some of the files wouldn&#8217;t copy across. We tried to use CloneZilla with the rescue option enabled to clone the data but even this failed with many read errors. <a title="Steve Courtney's Blog" href="http://www.steve-c.co.uk/" target="_blank">Steve Courtney</a> suggested using DDRescue from a live CD to see if it could copy the data to a new disk.</p>
<p><span id="more-33"></span></p>
<p>I downloaded the latest version of the Ubuntu Rescue Remix cd from here: <a title="Ubuntu Rescue Remix " href="http://ubuntu-rescue-remix.org/" target="_blank">http://ubuntu-rescue-remix.org/</a>Using the steps below (original post: <a href="http://ubuntu-rescue-remix.org/node/90#comment-186" target="_blank">http://ubuntu-rescue-remix.org/node/90#comment-186</a>) I was able to recover the data back to a new disk.</p>
<p>If needing to make a dd image the same steps can be used here: <a href="http://www.lightningone.co.uk/2011/07/15/guide-to-creating-a-compressed-image-of-a-windows-partition-using-knoppix-dd-and-gunzip/">Guide to creating dd images</a></p>
<p>1) Boot the Ubuntu Rescue Remix CD and wait for the command prompt<br />
2) Use the command <strong>sudo lshw -C disk -short</strong> to work out which drive is the source drive and which is the destination.</p>
<p>3) Use the command sudo <strong>ddrescue -r 3 /dev/[sourcedisk (sda etc)] /dev/[desternationdisk (sdb etc)] log</strong> to clone the source disk to the destination disk.</p>
<p>4) Keep your fingers crossed the corruption isn&#8217;t to bad!</p>
<p>5) If the machine boots and is a windows machine, I would recommend loading a command prompt and typing the command <strong>sfc /scannow</strong> to check that the important windows files are intact.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/data-recovery-using-ddrescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guide to creating a compressed image of a windows partition using knoppix, DD and gunzip</title>
		<link>http://www.lightningone.co.uk/backup-hard-disk-using-dd/</link>
		<comments>http://www.lightningone.co.uk/backup-hard-disk-using-dd/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 12:22:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=29</guid>
		<description><![CDATA[I needed a way of backing up my girlfriends Windows Vista laptop as it looked like it had a hardware fault. There are a few live CD&#8217;s that will automatically create backup images for you but the techie in me &#8230; <a href="http://www.lightningone.co.uk/backup-hard-disk-using-dd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I needed a way of backing up my girlfriends Windows Vista laptop as it looked like it had a hardware fault. There are a few live CD&#8217;s that will automatically create backup images for you but the techie in me needed to know how to do it manually. (gotta do it the hard way!)</p>
<p>For backing up I used Knoppix 6.4.4 Live CD as it&#8217;s a good all round Linux live CD with great driver and software support including an xdesktop. Knoppix can be downloaded from here: <a href="http://www.knoppix.org/">http://www.knoppix.org/</a>The software to do the actual backing up is DD which does an exact bit copy of the source disk. To compress the image the process used Gunzip. In this instance the destination disk is a 2TB external disk drive formatted as NTFS. If you&#8217;re using FAT32 or another file system, section 5 will need to be adjusted accordingly.<span id="more-29"></span></p>
<p>hda represented the source disk. hdb represents the destination disk. Substitute these for the disk names found in section 3.</p>
<ol>
<li>Boot into knoppix</li>
<li>To gain access to root type:</li>
</ol>
<pre style="padding-left: 60px;">su</pre>
<ol start="3">
<li>To verify source and destination disks,type:</li>
</ol>
<pre style="padding-left: 60px;">fdisk -l</pre>
<ol start="4">
<li>Make sure no partitions are mounted from the hard disk your about to image. To do this open a terminal window and type mount. This will list all mounted partitions. Verify that your source disk (found in step 2) isn&#8217;t in the mount list.</li>
</ol>
<ol start="5">
<li>Mount your destination disk by typing :</li>
</ol>
<pre style="padding-left: 60px;">mkdir /media/windows</pre>
<pre style="padding-left: 60px;">mount /dev/hdb /media/windows/ -t ntfs -o nls=utf8,umask=0222</pre>
<ol start="6">
<li>To verify you can view the ntfs partition type:</li>
</ol>
<pre style="padding-left: 60px;">cd /media/windows</pre>
<ol start="7">
<li>Then to list the files (if any) type:</li>
</ol>
<pre style="padding-left: 60px;">ls</pre>
<ol start="8">
<li>To image the source disk and place the compressed image on your destination disk use the following command:</li>
</ol>
<pre style="padding-left: 60px;">dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c &gt; /media/windows/hda.img.gz</pre>
<p>dd is the command to do the bit copy of the drive. If is the &#8216;input file&#8217; which in our case is the hard disk we want to image. &#8216;conv=sync,noerror&#8217; means that if dd finds any sectors of the disk it cannot read it will replace that part of image with 0&#8242;s. bs=64K is the block size used in the copy.</p>
<ol start="9">
<li>Go make a coffee as it may take quite a while to image. You can use <strong>ls -lh</strong> on the directory that has the image file in to monitor its size progress.</li>
</ol>
<ol start="10">
<li>Its also a good idea to save a copy of the source disk details as you may need them to access partition information within the disk image. To do this type the following command:</li>
</ol>
<pre style="padding-left: 60px;">fdisk -l /dev/hda &gt; /media/windows/hda_fdisk.info</pre>
<ol start="11">
<li>As a sanity check you can view the file structure from within using the fdisk. You will need the number of cylinders from the document saved in step 10.
<pre>fdisk -l -u -C 592 /media/windows/hda.img</pre>
<p>Hopefully you should see a list of files!</li>
</ol>
<ol start="12">
<li>Thats it, you should now have a complete image of the destination disk. The last thing we want to do is to unmount our destination disk before turning it off. To do this type the following command:</li>
</ol>
<pre style="padding-left: 60px;">Umount /media/windows</pre>
<p>I had trouble getting the disk to unmount. If you do you can use:</p>
<pre style="padding-left: 60px;">umount -l /media/windows</pre>
<p>which means &#8216;lazy&#8217; unmount and will force an unmount of the disk.</p>
<h1>Restoring data from an image</h1>
<p>So now you have a lovely new image of your machine, what can we do with it?</p>
<p>You have two options:</p>
<ol style="list-style-type: lower-alpha;">
<li>Copy the data from the image back to another disk</li>
<li>Decompress the image and mount the partitions to allow you to access the file system within linux</li>
</ol>
<h1>a) Copy the data from the image back to another disk</h1>
<p>This can simply be done by using the command below.</p>
<pre>gunzip -c /mnt/sda1/hda.img.gz | dd of=/dev/hda conv=sync,noerror bs=64K</pre>
<h1>b) Decompress the image and mount he partition</h1>
<pre>gunzip -c sda.img.gz &gt; sda.img</pre>
<p>create two directories</p>
<pre>mkdir /media/windows/</pre>
<pre>mkdir /media/image/</pre>
<p>Mount the disk that holds the image by using the command:</p>
<pre>mount /dev/hdb /media/windows/ -t ntfs -o nls=utf8,umask=0222</pre>
<p>Need a bit in here about how to get the offset.</p>
<p>Then Mount the image:</p>
<pre>mount -o loop,offset=32256 -t ntfs /media/windows/sda.img /media/image/</pre>
<p>You should then be able to browse the files on the image by typing:</p>
<pre> cd /media/image/</pre>
<pre> ls -lh</pre>
<p>To copy the data out of the image you can use the command:</p>
<pre> mkdir /media/windows/backup</pre>
<pre> cp -r /media/image/files/* /media/windows/backup</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/backup-hard-disk-using-dd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xmarks Bookmark Sync</title>
		<link>http://www.lightningone.co.uk/xmarks-bookmark-sync/</link>
		<comments>http://www.lightningone.co.uk/xmarks-bookmark-sync/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 12:14:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=25</guid>
		<description><![CDATA[Recently I have been bookmarking a lot of the pages i&#8221;ve used for research. Its incredibly annoying when you require a bookmark you saved on your work machine when working for home. Xmarks is a little utility that allows you &#8230; <a href="http://www.lightningone.co.uk/xmarks-bookmark-sync/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lightningone.co.uk/wp-content/uploads/2011/12/xmarks-v-105x122.png"><img class="alignleft size-full wp-image-27" title="xmarks-v-105x122" src="http://www.lightningone.co.uk/wp-content/uploads/2011/12/xmarks-v-105x122.png" alt="" width="105" height="122" /></a>Recently I have been bookmarking a lot of the pages i&#8221;ve used for research. Its incredibly annoying when you require a bookmark you saved on your work machine when working for home. <a href="http://www.xmarks.com/" target="_blank">Xmarks</a> is a little utility that allows you to sync bookmarks and other browser data between all browsers you work with.Its a great bit of software and does the job nicely.</p>
<p>The software can be downloaded here: <a href="http://www.xmarks.com/" target="_blank">http://www.xmarks.com/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/xmarks-bookmark-sync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSFMount Mounting DD images in windows</title>
		<link>http://www.lightningone.co.uk/osfmount-mounting-dd-images-in-windows/</link>
		<comments>http://www.lightningone.co.uk/osfmount-mounting-dd-images-in-windows/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 11:07:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=20</guid>
		<description><![CDATA[In a quest to explore free forensic and data recovery tools I found a great tool to simply mount partitions within a dd image on Windows. &#160; The software can be found here: http://www.osforensics.com/tools/mount-disk-images.html]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lightningone.co.uk/wp-content/uploads/2011/12/osfmount-banner-300x81.jpg"><img class="alignleft size-full wp-image-22" title="osfmount-banner-300x81" src="http://www.lightningone.co.uk/wp-content/uploads/2011/12/osfmount-banner-300x81.jpg" alt="" width="300" height="81" /></a>In a quest to explore free forensic and data recovery tools I found a great tool to simply mount partitions within a dd image on Windows.</p>
<p>&nbsp;</p>
<p>The software can be found here: <a title="OSF Mount Forensics Website" href="http://www.osforensics.com/tools/mount-disk-images.html">http://www.osforensics.com/tools/mount-disk-images.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/osfmount-mounting-dd-images-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSLookup – Troubleshoot DNS</title>
		<link>http://www.lightningone.co.uk/nslookup-troubleshoot/</link>
		<comments>http://www.lightningone.co.uk/nslookup-troubleshoot/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 15:26:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[IT Engineering]]></category>

		<guid isPermaLink="false">http://www.lightningone.co.uk/?p=14</guid>
		<description><![CDATA[NS lookup is a tool to help troubleshoot DNS issues and provide detailed information about DNS records.  Below is a few handy commands: nslookup Default Server: hyperion.dsns.co.uk Address: 192.168.226.4 &#62; Check Start of Authority (SOA) &#62; set q=SOA &#62; lightningone.co.uk &#8230; <a href="http://www.lightningone.co.uk/nslookup-troubleshoot/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>NS lookup is a tool to help troubleshoot DNS issues and provide detailed information about DNS records.  Below is a few handy commands:</div>
<div></div>
<div><code>nslookup<br />
Default Server: hyperion.dsns.co.uk<br />
Address: 192.168.226.4<br />
&gt;</code></div>
<div></div>
<h2>Check Start of Authority (SOA)</h2>
<p><code>&gt; set q=SOA<br />
&gt; lightningone.co.uk<br />
Server: hyperion.dsns.co.uk<br />
Address: 192.168.226.4</code></p>
<p><code>Non-authoritative answer:<br />
lightningone.co.uk<br />
primary name server = ns58.eukdns.com<br />
responsible mail addr = luke.scoobyluke.com<br />
serial = 2011071802<br />
refresh = 86400 (1 day)<br />
retry = 7200 (2 hours)<br />
expire = 3600000 (41 days 16 hours)<br />
default TTL = 86400 (1 day)</code></p>
<p><code>ns58.eukdns.com internet address = 213.175.196.80</code></p>
<h2>Check the Nameservers (NS)</h2>
<p><code>&gt; set q=NS<br />
&gt; lightningone.co.uk<br />
Server: hyperion.dsns.co.uk<br />
Address: 192.168.226.4</code></p>
<p><code>Non-authoritative answer:<br />
lightningone.co.uk nameserver = ns1010322.ukvpshosting.com<br />
lightningone.co.uk nameserver = ns1010323.ukvpshosting.com</code></p>
<p><code>ns1010322.ukvpshosting.com internet address = 92.48.70.190<br />
ns1010323.ukvpshosting.com internet address = 92.48.70.191 </code></p>
<h2>Check E-Mail MX-Records (MX)</h2>
<p><code>&gt; set q=MX<br />
&gt; lightningone.co.uk<br />
Server: hyperion.dsns.co.uk<br />
Address: 192.168.226.4</code></p>
<p><code>Non-authoritative answer:<br />
lightningone.co.uk MX preference = 0, mail exchanger = lightningone.co.u</code></p>
<p><code>lightningone.co.uk internet address = 92.48.70.190<br />
&gt;</code></p>
<h2>Check everything (ANY)</h2>
<p><code>&gt; set q=ANY<br />
&gt; lightningone.co.uk<br />
Server: hyperion.dsns.co.uk<br />
Address: 192.168.226.4</code></p>
<p><code>Non-authoritative answer:<br />
lightningone.co.uk internet address = 92.48.70.190<br />
lightningone.co.uk nameserver = ns1010322.ukvpshosting.com<br />
lightningone.co.uk nameserver = ns1010323.ukvpshosting.com<br />
lightningone.co.uk<br />
primary name server = ns58.eukdns.com<br />
responsible mail addr = luke.scoobyluke.com<br />
serial = 2011071802<br />
refresh = 86400 (1 day)<br />
retry = 7200 (2 hours)<br />
expire = 3600000 (41 days 16 hours)<br />
default TTL = 86400 (1 day)<br />
lightningone.co.uk MX preference = 0, mail exchanger = lightningone.co.uk</code></p>
<p><code>ns1010322.ukvpshosting.com internet address = 92.48.70.190<br />
ns1010323.ukvpshosting.com internet address = 92.48.70.191<br />
lightningone.co.uk internet address = 92.48.70.190</code></p>
<h2>Lookup all hosts within a domain</h2>
<p><code>&gt; ls -d lightningone.co.uk</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightningone.co.uk/nslookup-troubleshoot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

