<?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>MidnightReign.org &#187; Technical</title>
	<atom:link href="http://www.midnightreign.org/tag/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.midnightreign.org</link>
	<description>Incoherent Keyboard Bashing</description>
	<lastBuildDate>Wed, 18 Aug 2010 14:29:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>VirtualBox &#8211; Cloning Ubuntu (or Debian) based image issues</title>
		<link>http://www.midnightreign.org/2010/04/21/virtualbox-cloning-ubuntu-or-debian-based-image-issues/</link>
		<comments>http://www.midnightreign.org/2010/04/21/virtualbox-cloning-ubuntu-or-debian-based-image-issues/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 06:40:37 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[guest additions]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=938</guid>
		<description><![CDATA[In the interest of having this information somewhere handy: Firstly, to successfully install VirtualBox Guest Additions within a server based image: sudo apt-get install dkms build-essential linux-headers-uname -r I discovered that if you clone an ubuntu server based image, networking stops functioning in the clone. The reason for this is that the new Machine assigns [...]]]></description>
			<content:encoded><![CDATA[<p>In the interest of having this information somewhere handy:<br />
Firstly, to successfully install VirtualBox Guest Additions within a server based image:</p>

<p></p><p><code>sudo apt-get install dkms build-essential linux-headers-</code><code>uname -r</code></p>

<p>I discovered that if you clone an ubuntu server based image, networking stops functioning in the clone.<br />
The reason for this is that the new Machine assigns a new MAC address to the NIC. So the Udev rules think it&#39;s a new card, and assign it a new device id, like eth1, or eth2, etc.</p>

<p></p><p>To prevent this from happening, in your base image, edit /lib/udev/rules.d/75-persistent-net-generator.rules</p>
<p>Search for &#39;xen&#39;, and you&#39;ll see a block about ignoring the Xen virtual interfaces. Add the following below it:</p>
<p><code> # ignore VirtualBox virtual interfaces
    ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"
</code></p>
<p>Save it, and then remove the file /etc/udev/rules.d/70-persistent-net.rules.</p>
<p>Do the same thing in any cloned images with broken networking, and reboot the VMs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/04/21/virtualbox-cloning-ubuntu-or-debian-based-image-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Box &#8211; Compacting Images</title>
		<link>http://www.midnightreign.org/2010/04/16/virtual-box-compacting-images/</link>
		<comments>http://www.midnightreign.org/2010/04/16/virtual-box-compacting-images/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:01:38 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[compact]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=933</guid>
		<description><![CDATA[NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &#8211; this is aimed at NTFS based images. You&#39;ve been messing about in your VM, installing and removing software, etc. Your disk space usage inside your machine says [...]]]></description>
			<content:encoded><![CDATA[<p>NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &ndash; this is aimed at NTFS based images.</p>

<p></p><p>You&#39;ve been messing about in your VM, installing and removing software, etc. Your disk space usage inside your machine says you&#39;ve only used 3Gb of disk space, yet your actual image is much bigger. How do you fix it?</p>
<p>It&#39;s fairly simple to fix. First, you should probably remove all the unnecessary crap that you never use. There&#39;s a bunch of utilities out there that can help you with this.</p>
<p>Defrag your drive using your favourite defragger.</p>
<p>Now you will need one of two possible utilities (There may be more, but these are the ones I&#39;m aware of):</p>
<ul>
    <li>SDelete from http://www.sysinternals.com &#8211; this is a tiny 47kb executable.</li>
    <li>Precompact.iso &#8211; Obtained from Microsoft Virtual Server installation (May be available in other MS VM products)</li>
</ul>
<p>Precompact.iso is MUCH easier to use. All you need to do is mount the ISO inside your VM, and it will prepare your disk for compaction.</p>
<p>SDelete is only marginally more difficult. Run it in a command prompt like so: SDelete -c C:<br />
    (or use whatever drive letter you want to compact). SDelete will write zeroes to the free space on your drive image. This allows compaction to take place properly.&nbsp; Note &#8211; this is exactly what the Precompact.iso does, just without the fancy Windows GUI progress bar.</p>
<p>As soon as Precompact or SDelete is finished, shut down the VM.</p>
<p>Open command prompt on your host machine, and navigate to the folder where your hard disk images are located.</p>
<p>NOTE: It&#39;s probably MUCH easier to have the path to Virtual Box set in your PATH statement, otherwise you have to specify the full path to VBoxManage every time you use it.</p>
<p>In the command prompt, run:</p>
<code><path to VirtualBox>\VBoxManage modifyhd "Name Of Image.vdi" --compact</path></code>
<p>Your disk image will now be compacted, and should end up quite a bit smaller than it was.<br />
    If you get an error about the disk image not being found blah blah, specify the FULL path to the image, like so:</p>
<code><path to VirtualBox>\VBoxManage modifyhd "C:\Users\Username&#46;VirtualBox\HardDisks\Name of Image.vdi" --compact</path></code>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/04/16/virtual-box-compacting-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Box &#8211; Resizing Disk Images</title>
		<link>http://www.midnightreign.org/2010/04/16/virtual-box-resizing-disk-images/</link>
		<comments>http://www.midnightreign.org/2010/04/16/virtual-box-resizing-disk-images/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 12:42:21 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/?p=931</guid>
		<description><![CDATA[NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &#8211; this is aimed at NTFS based images, but the basic principles should still work fine for other OS&#39;s. Like a tool, and not thinking ahead, I created [...]]]></description>
			<content:encoded><![CDATA[<p>NOTE: This is a technical article. While this is a fairly simple process, I&#39;m not going to walk you through the basics of using a computer. Also &#8211; this is aimed at NTFS based images, but the basic principles should still work fine for other OS&#39;s.</p>

<p></p><p>Like a tool, and not thinking ahead, I created an XP Base dynamic image of max 10gb in size.&nbsp; While this is usually enough space to mess around with things, I find it can be a pain in the backside when you want to install a sizeable program &#8211; say Visual Studio. While possible, you end up with very little disk space left over at the end of the day.</p>
<p>A possible solution to this dilemma would be to simply add a new disk to the machine, as needed. However, I like making things difficult for myself, so I rather wanted to resize the initial disk.&nbsp; Unfortunately this is not possible with the provided VBoxManage utility. So, you need to jump through a few hoops, but it&#39;s really not that difficult.</p>
<p>You will need:</p>
<ul>
    <li>Clonezilla &#8211; http://clonezilla.org</li>
    <li>GParted &#8211; http://sourceforge.net/projects/gparted/</li>
</ul>
<p>Download the ISO versions &#8211; and for Clonezilla &#8211; DO NOT download the &quot;Alternate&quot; version, it will NOT work.</p>
<p>Using the Virtual Media Manager, create a new dynamic disk of your desired larger size. Call it whatever you like.<br />
    While you are there, add the CloneZilla and GParted iso&#39;s to the CD/DVD library.<br />
    Create a new VM, but do not attach any disks to it. Configure it as Linux, Debian. I called mine Clone Master.<br />
    Edit the VM settings, go to the Storage node, and add a new hard disk. Select your SOURCE disk (The disk&nbsp; you want to enlarge). Add another hard disk, and select the DESTINATION disk (the big image you just created). Click the CD node, and select the clonezilla image. Boot the new VM.</p>
<p>The CloneZilla CD should now boot (If it doesn&#39;t, check the boot priority in your VM settings, and make sure CD is set to boot first).<br />
    <br />
    <br />
    Use the utility to do a local disk to disk clone. Using &quot;beginner&quot; mode is fine.&nbsp; The &quot;expert&quot; mode has a setting to extend the partition to the size of the destination disk, but it didn&#39;t work for me at all &#8211; the cloned partition was the original size. Not sure if it&#39;s because of the NTFS partitions, or a bug in the version I was using. If it works for you then EXCELLENT &#8211; you won&#39;t need to do the GParted segment.<br />
    &nbsp;</p>
<p>Once you have cloned the disk, power off the cloning VM, edit the settings, and detach the hard disks from it. Attach the newly cloned bigger image to your original VM, or create a new VM for it, and boot it. Check that the system works ok. If the partition hasn&#39;t grown to fill the new partition, you will need to continue to the next step.</p>
<p>Shut down the VM with the new large image.<br />
    Edit the settings of your cloning VM, set the CD to use the GParted iso, and attach the newly cloned image to the machine.<br />
    Boot the machine, and GParted should load. Just accept default settings, and eventually X-Windows will load with a copy of GParted. Click the extend button, and increase the partition to fill the disk. Apply the changes. It will only take a few seconds to completed. Exit the system, and shut down the VM. Edit the VM settings, and detach the disks (It&#39;s not strictly necessary &#8211; more of a safety measure).</p>
<p>Boot your previous VM to test the disk. All should be good.<br />
    &nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2010/04/16/virtual-box-resizing-disk-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decrypting an IPCop 1.4.11 backup key</title>
		<link>http://www.midnightreign.org/2006/11/22/decrypting-an-ipcop-1411-backup-key/</link>
		<comments>http://www.midnightreign.org/2006/11/22/decrypting-an-ipcop-1411-backup-key/#comments</comments>
		<pubDate>Wed, 22 Nov 2006 18:12:17 +0000</pubDate>
		<dc:creator>thisgeek</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[decrypt]]></category>
		<category><![CDATA[ipcop]]></category>

		<guid isPermaLink="false">http://www.midnightreign.org/2006/11/22/decrypting-an-ipcop-1411-backup-key/</guid>
		<description><![CDATA[I was put in the unfortunate position of needing to reload my IPCop. No problem, I&#8217;ll export the backup key, and download the latest backup file to my local machine. This I do, quite easily. So, I reload the IPCop box, skip the floppy restore option, thinking I&#8217;m going to restore it via the web [...]]]></description>
			<content:encoded><![CDATA[<p>I was put in the unfortunate position of needing to reload my IPCop.
No problem, I&#8217;ll export the backup key, and download the latest backup file to my local machine. This I do, quite easily.</p>

<p>So, I reload the IPCop box, skip the floppy restore option, thinking I&#8217;m going to restore it via the web interface, so who cares anyway.</p>

<p>I get to the web interface, access the backup option.  First thing I realise &#8211; there&#8217;s no way to import my saved backup key. Darn.
So I try import the dat backup anyway. The interface tells me to bugger off, it can&#8217;t decrypt the file. Grrr.
So what now?</p>

<p>I ssh to the IPCop box, and checkout the existing backup key. Then I check my saved backup key.  My saved one is encrypted. Double darn (Ok, I said something far more nasty really).</p>

<p>Google&#8230; can&#8217;t find a damn thing.  The only references I can find is some people copying their backup.key from an old hard disk to the new one. Whoop te doo. That does NOT help me.  So, I download the IPCop source code, peruse a couple of files, and figure out how to decrypt the key.</p>

<p>To make my life easier, I used WinSCP to transfer my encrypted key to the IPCop box, then it&#8217;s a simple matter of running:</p>

<p>/usr/bin/openssl enc -a -d -aes256 -salt -pass pass:&lt;yourpasswordhere&gt; -in encrypted.backup.key -out decrypted.backup.key</p>

<p>You obviously need to insert your backup password where it says &lt;yourpasswordhere&gt;. If you forgot it, sorry mate, can&#8217;t help you.</p>

<p>Once that&#8217;s done, simply copy your decrypted.backup.key to the correct place:</p>

<p>cp decrypted.backup.key /var/ipcop/backup/backup.key</p>

<p>and overwrite the existing file.</p>

<p>Now you can import your saved backup and restore your settings.</p>

<p>Hope this helps <em>someone</em>. :p</p>

<p>EDIT: Whoops. Didn&#8217;t realise that the &lt; &amp; &gt; that I inserted originally failed to render cuz the engine thought it was an html tag. Ugh.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.midnightreign.org/2006/11/22/decrypting-an-ipcop-1411-backup-key/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
