Tuesday, February 15, 2011

VirtualBox - a great way to keep your old PC image

I have an old Windows XP machine that the motherboard has failed on.  It has a lot of data and programs on it that I use from time to time (it was my primary PC for 6 years).  I have found that Oracle VirtualBox (from their purchase of Sun) can be very helpful in allowing me to have an image of my old machine running on my new machine as I transition.  This has greatly reduced the pain of loosing the old machine.

I put the XP disk in a USB carrier and plugged it into my Linux machine.  Using command like

cat /dev/sdg | VBoxManage convertfromraw stdin OutPutFile.vdi NUMBEROFBYTES

I managed to image the disk to a file on the linux machine. I then started VirtualBox and created a virtual machine using the disk image.

On startup the machine blue screened, just like windows does from time to time. Not to worry, I got my original XP CD and told virtualbox it was in the cd drive. Then on booting the virtual machine I did a windows repair. Windows now booted and after a couple of windows updates I have my machine back in a virtual environment.

A couple of things I found along the way -

The VirtualBox that is distributed with Linux is the Open Source Edition and does not have the extensions to use USB - download the executable from http://www.virtualbox.org - They even have a fedora repo file so you can keep it up to date with yum.

Follow the instructions on getting the kernel extensions built - you will have to do this each time you update you linux kernel.

I had problems where after installing the VirtualBox extensions I could not get shared folders to work, it kept saying they do not appear to be installed. It turns out the Kaspersky Internet Security was blocking the install - disable it and try again, magically the install works. After doing this and rebooting it is working fine.

Sunday, February 13, 2011

Squid Proxy

Given my main home machine is now running Fedora 14 rather than windows I have decided to install the squid proxy to have a look at how this can help with caching web pages locally.

The install was very straight foward

yum install squid
vi /etc/squid/squid.conf

I then uncommented the squid_dir line in the file to allow it to write a disk cache and started the proxy with

service squid start

Then configured the browser (firefox) to use the squid proxy on the default port 3128.

Thats it.

To look at the contents of the squid logs I installed calamaris

yum install calamaris
cd /var/log/squid
cat access.log | calamaris -a | more

Further steps I will look at is allowing access from other machines on my home network - likely I will have to adjust the iptables firewall to allow them to connect, but this is something you should take the time to understand if you don't already.   (you can always use the GUI tools to configure these things, but that does not help me long term when administering machines through terminal sessions, so I like to use the command line where possible)

Saturday, February 12, 2011

Welcome

Well this is the start of the ramblings of an IT professional that fills in his spare time turning wood.  The main point of this blog is for me to store notes for myself about the attempt to use OpenSource software as much as possible and the tools I have found that help.  There may also be a bit of woodturning sneak in for a peek from time to time.

I am a huge fan of Linux based systems, as my first jobs it IT were using AIX, Solaris and IRiX my experience of various Unix derivatives is extensive.  Linux has presented a path where we can us commodity hardware and have a stable reliable server platform without the degree of investment that was required 20 year ago.

My Linux flavour of choice currently is Fedora for the cutting edge and Redhat Enterprise for the stable backend services.  When it comes to commercial software on a Linux platform you are normally looking at full support on either Redhat of SuSe, and it just makes life easier if you work with a consistent platform rather than changing every time you install a new system.