15 Minutes guide to VirtualBox+Turnkey Appliance Linux (aka Linux on Windows)

Having posted 15 Minutes guide to Mediawiki a while back, I was looking for something simpler. I wanted to run an entire Apache MySQL PHP (AMP) in a sandbox. Something that is isolated from Vista on my laptop. So I thought I will setup Virtualbox.  

Now, I’m sure almost everyone has heard of Virtualization. In case you have been living under a rock for past couple of years, Virtualization, in a nut shell is nothing but ability to run another Operating System within your existing OS.

So I decided upon Sun’s Virtualbox as the virtualization platform of choice. Now I need to find an OS to host the AMP (Apache, MySQL, PHP) stack.  Linux was the OS of choice as it can run on a wide variety of hardware configuration. So I started hunting for a Linux Distribution with very low footprint, something that can run on, say 128 MB or 256MB of RAM and require very small hard disk. I just needed the essentials.

After, hours of googling, I came across this great “Appliance Linux” distribution known as turnKey. So what is turnkey? In a nutshell it is a pre-configured environment to perform a particular task. For example TurnKey LAMP will contain Apache , MySQL and Php along with a barebones Linux kernel built from the Ubuntu distro. The advantage of such a setup is that the whole thing needs just 128 MB of RAM.

So how do we go about it?

 Virtualbox

  • Hit New, and give the options mentioned in the screenshot.

New

  • Hit Next, and set the Memory to 256MB. This is the amount of RAM your Virtual Machine will have.

memory

  • Hit Next, and Click on ‘New Disk’

VHDD

  • Set the allocation to “Dynamic”. This means that the virtual Hard disk of the client will expand when necessary.

Dynamic

  • In the next window, set the Storage HDD file location and Max Size (Recommended max size 2 – 4 GB).

Virtual Disk Location and Size

  • Now just Hit Finish in the last window and you should drop back to the main wizard.
  • Hit finish on that too.
  • Congratulations, You have created your first Virtual Machine (VM). Don’t pat yourself on your back yet. There are a few more steps ( Simple ones sweetheart, don’t fret ;)   ).
  • Now we need to mount the Turnkey Linux’s ISO image file on the Virtual Machine. So next step will be to click on CD/DVD-ROM.
  • Follow the instructions in the image below to Mount the ISO to the VM.

mount_iso

  • Ok, now you are all set! Time to power on this baby… Err.. Wait, One more step. We need to setup Network for the VM, otherwise how will you be able to talk to your host machine? Follow the pictorial to set up network. Note: I assume that your system is a part of network and you have a DHCP server on your LAN.

Network

  • If you are not on a network, then you need to select “Internal Network” from the “Attached to” Dropdown.
  • Click OK, and now are all set to go, Just hit the “Start (->)” button. You should see your brand new Virtual Machine boot up. It should boot from the CD-ROM.
  • At this juncture, you are presented with 2 interesting choices. a). Boot from CD and b). Install to Hard Disk.
  • Select “Install to Hard Disk” and then proceed with the installation. Make sure you select the entire HDD for installation. (Its the virtual Harddisk, so no, you wont lose anything from your REAL hard disk ;)   ).
  • Once the installation is done, Turkey will reboot the VM and you should get straight to the configuration page.

FirstBoot_cropped 

If you need a static IP for your Turnkey, go to Advanced Menu -> Netowork -> Static IP.

  • Once everything is done, You should be good to go. Try logging into the Turnkey by pointing to http://<ip of turnkey>:12321
  • Login with password you had set earlier and you are good to go!

 

Have Fun :) Should you need any help, feel free to comment, And I will try to help you out. :)

An old post on Linux…

So, I was just checking up one of the new search engines called “cuil” ( www.cuil.com). This was made by one of the ex-employees of google and by somebody who worked on google search technology. ( Read about this on : http://www.dailytech.com/article.aspx?newsid=12510 )

So just for the fun of it I hit “Allajunaki” as the search term. So all the pages and things I did on the net came up listed… One of my old posts came up there. Im reposting it here, have fun reading it… Yeah, those were the days.. :)

True Story Of Penguin saving my life!


allajunaki
20-08-2004, 01:48 PM

Well it may not sound that dramatic to non-geeks, But imagine 2 weeks without computers, esp. to guy who uses 8 hrs or so everyday?

It started 3 days before exams. I was busy cramming for my Second Year Bsc Comp Sci. Exams, i was cursing myself for all the times i put that darn book aside. Music was the only soul soother, ( I study with some soft music On).
On the fateful day i got up by ten in the morning (im a Nocturnal Creature). Switched on my comp and every geeks worst nightmare!, My rig didnt boot!! It gave some wierd error (BSOD in XP Pro!!). I tried to calm myself by saying that it could be that darn Tv-Tuner card acting up again.. I restarted my system, This time it started, but it took an awesome 30 Mins to startup!! (Amazing as my sys usually boots in 40 Secs Flat!). I had to wait another 15 Mis for explorer to start. All this time My disk was getting Thrashed like hell. My first guess was a virus, But i ruled that out as the problems didnt seem to be one related to Virus.
Cursing Microsoft for the macroheadache of reinstalling my Xp ( My was Highly ciustomised with Style XP and Flyakite Panther Pack and custom bootscreen selective services startup etc…). So suspending my studies till noon , i went on to reinstall XP.
Popped in the Xtreme Xp Pro ( My Customised Xp pro Bootable) Disc i gave the option to re-format my HDD and reinstall on C:, now after 20% i got an error message that gave me shiver deep down my spine, “Unable to Format your Disc, Cannot Read from Disc”. That means HDD was failing !
My HDD was failing on me, Data was not critical, but the fact that i was staying alone in a single room house with my comp acting as my media hub didnt help. Now i dont have an audio player, or video player, or my TV (System has a T.V tuner). No net also..and since i was staying alone i had no company. That was like a death warrant for me, 2 weeks of exam and not even one single way to take time off…!

Just when things seemed bleak, I stumbled across one of the CD’s containing “Knopix Linux”. For those who are linuxically challenged (pardon my english), Knopix is a direct boot Linux, That is it loads directly from CD to RAM and runs entirley from RAM and CD. But this version of knopix was distributed with one of the magazine, but it lacked some of the stuff, But had a Burner tool(K3B). So i fired up the k3b and then removed the knopix CD (provided by mag) and burned the version provided by Digit in their Linux DVD. During the entire process of burning the Knopix ISO from Digit DVD, The OS was running ENTIRELY from RAM!!! ( DVD drive had the Digit DVD and Burner had The fresh knopix that was getting written!). With some pestering, i managed to get a cd written from my friend containing som of my fav. Mp3’s.
Used the sytem for a day. Then I realized that i needed some sort of space to store some of my Preferences and some applications, as a newbie to linux i wanted to install winamp (xmms is good, but as a newbie i childishly wanted Winamp). Now the problem is RAM is volatile, So my Creative Muvo 128MB Comes to my rescue!. So for next 2 weeks i end up with a 128 Mb “make shift HDD” (I was using to listen to Music when i was on move).
Thus when Windows declared my system ‘Unusable’ the lil Tux managed to keep my morals high. This lil incident also made a lil splash in my friend’s circle, as noone had heard a system run with no HDD ( Eversince 286 era) .

For 2 weeks my system config goes like this:

P4 1.6Ghz @ 2133 Mhz
128 x 2 MB Dual Channel DDR 266Mhz (Hynix)
–128 MB Hard Disk (Creative Muvo).–
Asus P4G8X chipset (Intel 7205 chipset).
MSI Video Card (GeForce4 Ti 4400) with 128MB DDR.

Funny part was my Video Card had same space as my HardDisk and Ram was twice as much as my HDD!!

Oh yeah those two weeks I could run My Mp3’s and Videos(Divx,Mpeg etc) and DVD’s too. Net connection didnt work (I was Using Mobile GPRS Internet for which I need the IR port to work, which didnt work). Also TV Tuner couldnt be configures ( No time As I had an exam to write remember).

Now lookin back at those days (happened last April, not so long ago LOL) it was not all that bad, I still ended up getting 74% In Second Year Exams (Which isnt all that shabby) and now system configuration goes something like this.

PIV 1.6Ghz @ 2133Mhz
128MB x 2 Dual Channel DDR Ram @ 266hz
–200 GB Seagate 7200 Rpm with 8Mb Cache–
Asus P4G8X (Intel 7205 Chipset) MoBo.
Msi Vid Card (GeForce4 ti 4400 with 128 Mb DDR)
40×12x48x Asus Burner
16x LiteOn DVD ROM
17″ samsung syncmaster 763DFX
Altec Lansing ATP-3 2.1 Speaks
Ibox Cabinet
Mercury 300W PSU

–Not too shabby for a 2+ years old PC eh?

My Defective 40Gb was still under warranty so Gave it off to the dealer for 1800 Bucks and got Seagate 200Gb for (7000-1800) .

Now I have dedicated 10 Gb for Linux, which is my OS of Choice.
I use XP for Hi-Speed Net (I managed to get 512Kbps Connection,dont ask how,and no i didnt have to kill anyone,LOL).So all Movies and Music is D/L via XP
In Linux i get 64Kbps, So i use for general browsing as Font Rendering is better.
I prefer Linux for Media Playback as I feel Linux Sounds better.
I Use Linux for video Playback.
I use XP Pro to play Doom3 and NFS UG.

–In case u are wondering, I use Linux Fedora Core1 with Linux Kernel v 2.22.1.2115 (PCQ Linux 2004).

And I apologise for such a BIG post


Posted in Geeky, Linux. Tags: . Leave a Comment »

openSUSE 11

So after being not too happy with fedora 9 ( Dont know why, but fedora 9 just doesnt cut it, I have been a fedora user since FC6), I was looking for an alternative OS. Somehow Ubuntu didnt quite interest me. So heading to http://www.distrowatch.com . I found openSUSE as second most talked about (after Ubuntu). So I headed straight to www.opensuse.org.I saw that SUSE 11 was to be launched on a few days time.. So I waited.

When it was lauched the suse site was down due to traffic, and finally when it did become accessible, I had scheduled a download on friday 11PM on my office machine. Since I couldnt wait till monday ( I was too eager), I downloaded the liveCD version (KDE one) to give it a test run.

So what are my first thoughts? Awesome!!! The polishness and refinement of Suse is simply amazing. One finds it hard to believe that this is a free OS!!

Right from the simpleĀ  green startup screen, to carbon fibre finish terminal screen, everything is beautifully crafted. YaST2 is ultra simple, and I was up and running with very very minimal efforts!

Sticking with Fedora all along, I was more of a GNOME person, everytime I tried KDE, I was forced back to gnome because of the simplicity and crispness (for the lack of better words =) ). However, SUSE with KDE4 is very usable and stable. Im still in the process of bringing up with the required packages, since the liveCD have very few stuff.

Oh, did I mention? I installed the LiveCD to the HDD, it was really simple, once the liveCD was up and running, u just need to click ‘install’ on desktop, and in 15 odd mins (on my lappy) , it made a copy of SUSE in my HDD.

For all the guys who are fans of ubuntu and fedora’s give SUSE a go, u will be impressed. This one OS which I feel , has the beauty and the brains….

Kicking Up X server from another machine

So, you have a brand new installation of Linux, but when the X tried to kick it up everything went kaput!

So what do you do? You panic as usual! Now to edit something also you would require some sort of GUI ( Not everyone can get comfy and cozy on command prompts…).

Ok so now that we are stuck in a situation where there is no GUI and you have no clue on command line utilities like links or wget, then there is an alternative for you.  Most of the times people end up in this situation coz the graphics driver did not work or was not setup or downloaded. So the first priority will be to get em and kick up the Xserver and all the graphical goodies that X brings about.

Lucky for us the Linux GUI subsystem, the X, runs on Client Server model. This means that graphics could be handled by one machine, and processing by another. Or in our scenario, the GUI part of the screwed up system can be handled by your other system, at least till the point of you fixing the first machine.

Lets get down to business, Shall we?

For my trick to work, you need a few things.

A.  A second machine on the same LAN.

B. Your Lan configuration was setup correctly during the Linux install. ( If not, I will not be discussing how, but you can take a look here -> http://www.linuxheadquarters.com/howto/networking/networkconfig.shtml ).

Now, if the second machine is again Linux based, then great. you can bring it up with a lil effort.

If it is Windows based, then you need an X-server. Commercial ones include Exceed ( http://connectivity.hummingbird.com/products/nc/exceed/ ) and Reflection X ( http://www.edas.co.uk/connectivity/xwindows/refx.htm ). On the free side of things, I’m a big fan of Xming (http://www.straightrunning.com/XmingNotes/ ) which is an open source alternative to X for windows.

 

So now you have X for windows, or X server running on Linux. First step is startup X server on the second machine to accept the X connection from newly installed Linux machine.

So if the second machine is Linux, just type this from a console.

X -ac :1

This will kick up X server on display port 1 (You can access this by pressing (ctrl +) alt + F8(or F7) . Since 0 is the default, that will be running on F7 for that machine, the next F key, F8 will become 1 and that instance of Xserver will be able to handle display from the screwed system.

 

So What if the machine is Windows based. ?

Assuming that you installed Xming (other tools will also have almost similar setup, though you are own your own for those ones.).

Click on Xlaunch button. You should see a wizard. Here make sure you select “full screen” and also ensure that “No Access restriction ” or ac check box is ticked. Everything else should be defaults.

 

This should dump you to an empty X window (a full screen window with nothing on it, except for a weird weave pattern , u can switch out by pressing windows key or ctrl+esc).

 

Now you are all set.

Now login into the command prompt from the screwed machine, and type this

export DISPLAY “<ipaddress of the other machine>:1″     In case of Linux (coz we started in 1)  

export DISPLAY “<ipaddress of the working machine>:0″    In case of windows.

Once that is done you can bring up the GUI on the Working windows machine by typing

gnome-session &

else if KDE is what you are looking for then

kde &

Please note that you cannot issue startx this way, doesn’t work for some reason.

Now you should see some warnings here, but if u look at the X server on the second machine, you will see the Linux Gnome/KDE prompt come up on that machine. From this point on, you can hunt of the drivers for the X or seek help for configuring Xserver on the broken machine. Also note that this same method can be used for Unix based systems though I have never tried it..

Happy Tuxing :)

Technorati Tags: ,,