Gone next door …
Friday, August 22nd, 2008Hi. If you’re looking for my blogs on all things Linux, I’ve moved them to our other blog - http://www.atlanticlinux.ie/blog/ = please join me over there!
Hi. If you’re looking for my blogs on all things Linux, I’ve moved them to our other blog - http://www.atlanticlinux.ie/blog/ = please join me over there!
In the last couple of days I’ve been using VMware for the first time. VMware server is basically a virtual machine that allows you run images of other operating systems (called guests) from within your host OS. Images for many operating systems are readily available to download to load directly into the server as virtual appliances.
My aim was to set up a Debian 3.1 (Sarge) guest with Java 1.4, Tomcat 5.0 and Oracle XE installed to use as a basis for portable product demos. This was mostly straightforward once I got familiar with how VMware worked. The only slight problem related to the disk space and swapfile size requirements of oracle. The rest of this article describes the steps I followed.
To get started, I downloaded the free version of VMware Server here. You need to go through a brief registration process to obtain a serial number. Once the server was installed and running I got the virtual image for Debian Sarge from here. Unzip the image and open it in the VMware server.
At this point there’s a couple of handy things to know regarding VMware server in general:
Before powering on the image, you can right click on it in the Inventory and click settings to edit these. The only change I made here was to change the ethernet setting to ‘Bridged’ instead of ‘NAT’. This allowed the guest OS to obtain it’s own IP address from our DHCP server during setup and behave for all intents and purposes like an independant box on our network. Nice!
Click the green arrow play button to start the virtual machine and it’ll behave like a fresh Debian install prompting you for the root password etc. I won’t go through the steps of configuring the install as that’s already covered elsewhere. The configuration went smoothly, I logged in and the guest OS appeared on the network and I was able to ftp to/from it from other machines on our network directly.
So I moved on to installing Oracle XE. Using Stephen’s fine tutorial this would also be straightforward right? well… not quite. Oracle requires 1.5 GB of disk space and a swapfile of at least 750 MB. My guest OS stood at 400 MB and ~200 MB respectively. I stopped the machine and looked for a way in VMware Server to increase the total disk space allocated to the guest (the original was 4GB) but I couldn’t see a way. Fortunately, the server does allow you to create additional virtual disks and this proved to be enough, as I’ll describe in the remainder of the article.
To configure the new disk re-start the guest image and log in. The newly created virtual disk should now exist as /dev/sdb. The disk must be partitioned and a file system created on it.
fdisk /dev/sdbn You'll be prompted for values for first and last cylinders. I used the min and max to allocate all disk space to this partition.
Write the new partition table, and exit fdiskwmkfs -t ext3 /dev/sdb1 mkdir /hd2
mount /dev/sdb1 /hd2/dev/sdb1 /hd2 ext3 defaults,errors=remount-ro 0 1I decided to create a swapfile of roughly 1GB on the new partition to keep Oracle happy:
cd /hd2
dd if=/dev/zero of=swapfile bs=1024 count=1000000
chmod 600 swapfile
mkswap swapfile
swapon swapfile/hd2/swapfile swap swap defaults 0 0I tried running apt-get install oracle-xe-universal again and this time it installed successfully. Thankfully installing java and tomcat required nothing out of the ordinary and before long my guest OS was up and running as required.
One day last week I thought I could distract my son from annoying his sisters for a couple of hours by giving him my old (wiped clean) laptop and a Linux distribution cd. My son is six years old. He installed Ubuntu in 20 minutes.
Let’s get some perspective here. We are talking about a kid who recently learned to read (as Gaeilge agus as Bearla). He is a bright kid, but I don’t think this is down to him. It was possible because the Ubuntu team has done such an excellent job of packaging up their linux distribution.
Daniel was presented with only a few prompts during the installation. The first one was for the language (he got that), the second for the country (he got that), the third was for the keyboard (he didn’t understand why we use a British keyboard in Ireland). One prompt for the network interface (for some reason a wireless interface was picked up though afaik the laptop does not have one), I helped him select eth0 rather than eth1. For partitioning the hard disk (he didn’t know what that was about), he left the default (1 swap plus 1 big data partition). He chose the name ‘Ranger’ for the computer, and when prompted for the user entered the same credentials he uses on the other system in the house. That was it. The rest was magic.
Once installed he rebooted the pc, and logged in. It was remarkable.
The moral of the story is this: if you want to keep your kid entertained for hours on end by installing an operating system, don’t use Ubuntu. Maybe try Gentoo.