Tuesday, February 24, 2009

VMware Virual Mechine

Can I install Linux inside windows? Yes. Its possible using the virtualization technology. VMvare virtual machine allows you to do that. I installed Ubuntu inside windows using Ubuntu 8.10 Live CD .iso file. It worked fine. This is a cool way to install as you don't need  a CD as well. Of course it can be installed from CD also.


Its not just for Windows OS it can work with other OS as well, for example you can install Windows inside Linux, or Windows inside Mac, or Windows inside Windows :-) etc. VMware takes care of all the abstraction needed for the OS through its virtualization technology. In fact you will get a different IP address for the new virual OS and you can ping the host OS and vice a versa.

How is it possible? might be a question which comes to our mind. Actually the same processor is shared for both OS, If you have a dual core then single processor would be used for virtual OS. RAM is also shared which means enough RAM should be there, I had 1GB RAM and the installer automatically chose 512MB. Its obvious that minimum harware requirements needed by the both OS needs to be met, after sharing harware resources as well. You can run many virtual OS simultaneously if you have sufficient hardware resources.

What about harddisk? In fact harddisk is abstacted as a file of 8GB or more than that as per choice. This file can be split in 2GB sizes by selecting an option during installation. It is pariculary useful because 2GB size can easily fit into removable media like USB stick and can be traferred from one machine to other. The hardisk file format is called .vmdk (Virtual Machine DisK format) for more infor refer: VMDK. The main virtulal machine file is called as .vmx. All these files will be present in the installation folder, in my case it was C:\My Virtual Machines\Ubuntu_8.10\. Once you have this complete folder copied I guess you can even open it from another mechine using VMware Player.


VMware player is free software from VMware and it can be used to open a virtual mechine file system (.vmx). As the name indicates its just a player and you can't create virtual mechine (.vmx and .vmdk files) using VMPlayer.

So now the catch is how do we create a virtual machine? This can be done by VMware Work station, which is licenced. I used a trial vesion to crate a new virtual mechine. However there are may virual machine dump available in the internet which can be direcly used with VMware Player. I guess there some associated procedures to adapt it to a particular harware. I didn't try this so I wont be able expain more on this. One issue I faced during the installtion was that when using direct install CD .iso files, after few initial installation steps it was checking the real CD rom drive and reported "Media not Present" error. However using Live CD .iso file solved the issue. I guess you will not face any such issues if you use CD directly.

Personally it was exiting for me when I tried this. Hope you will also find it in the same way. Try it out, All the best!

Mandriva Linux Experience

My sister received a Mandriva 2008 Spring DVD as a part of a Linux workshop she had attended. She had some problem in her computer, So I suggested her to try the New Mandriva DVD. She could successfully install it , though she had no prior experience of installing Linux. Needless to say the installation procedure was user friendly.


I had never used Mandriva Linux, thus I was curious to see when I get back to home from Bangalore. When I saw that it was Wow! experience. The user interface was equivalent to Vista in terms of look & feel. From functionality wise it had more features than Vista. Most of the Linux disto (means a Linux distribution) I had used, had GNOME as the default Desktop. Where as Mandriva's default is KDE (it supports GNOME as well). Okay if you are new to Linux KDE and GNOME are two different Desktop Environment for Linux. KDE is graphical and heavy, whereas GNOME is simple and light.

The panel feature of KDE was really wonderful, you must try it. It allows you to have a very flexible desktop with all you need, its similar to Gadgets in Vista however much versatile than that. I was really impressed by the look & feel. "Oxygen" Theme and "Land of Peace" wallpaper combination was very pleasant.


One thing I didn't like was there was no straight forward way to access file system, Of course Dolphin file manager was present, However it was difficult to locate it through the Menu. Its in System → Tools → More → Dolpin File Manager. Once you are used to you can make a panel link on your desktop for Dolphin file Manager.


Another interesting thing is that, this distro tries to provide the maximum interoperability with windows, i.e you can import windows fonts seamlessly in Mandriva. From "Control Panel" -> "Install windows fonts". It automatically searches windows drives, installs all the fonts. Another good thing is that, all your windows drives get default mounted here, which is convenient for people who are new to Linux, of course this happens in Ubuntu as well however you will be required to enter the password to complete the operation. And there is a way to import your windows documents as well from Mandriva Control Panel.

One advantage is that the DVD contains almost all the required packages, thus even if you don't have internet connection you can install many of the packages. I could install KDevelep (C/C++ Development IDE)and VLC player successfully from the DVD. The best part is codec's are part of the default installation which means you can play most of the popular audio/video formats without any issues.

I was so impressed by the KDE and the Konsole ( Shell in KDE), I decided to install Mandriva in my Laptop ( DELL Inspiron 6400). Installed Mandriva One 2009 on my Laptop and it was working fine. Overall in my opinion this is a good Linux Distro with appealing GUI. Looks like a real competition to Windows in terms of look & feel. In fact it supports 3D desktop, I didn't experiment it, may be you can try it if you have a high end hardware. Hope you will like it. Give it a try and you won't regret it.

Ubuntu (post) install issues 7.10

I had no issues with Ubuntu installation procedure as such, in fact it was very easy to install. I am not going to describe how to install Ubuntu on your computer, in fact you can refer to Ubuntu website for that. Here I am trying to present some post installation issues, which were blocking me to use it as a full fledged Desktop for all my needs.

I had used Red Hat Linux during my college days and I enjoy using the powerful shell that Unix/Linux provides. My friend told me that Ubuntu works fine on Laptops. So I decided to try it out on mine (DELL Inspiron 6400 Laptop with Vista pre-installed). Downloaded Ubuntu 7.10 from Ubuntu website, and installed it.

BIT OF INFORMATION:
By default Ubuntu does not give you a root account. Instead use "sudo" before any command to run it as root/admin. Thus to edit /etc/X11/xorg.conf
vim /etc/X11/xorg.conf → Will not work, as its a privileged file and a normal user can't save changes to it.
sudo vim /etc/X11/xorg.conf → Works; it might prompt for a password. Just enter user (created during installation) pwd.

Boot-up issue:
The first issue I had after successful installation is that I could not see the GUI, I could only login in cmd mode. After a bit of search in the Internet came to know that for a DELL Laptop's we might need to modify the X11 configuration i.e /etc/X11/xorg.conf needs to be modified. Did the below modifications,

Login in (recovery) mode and add the below last 3 lines in file /etc/X11/xorg.conf
Section "Monitor"
Identifier "Generic Monitor"
HorizSync 36-52
VertRefresh 36-60
Option "MonitorLayout" "LVDS, AUTO"

in the next boot showed a nice brown GNOME desktop. I was very happy to see a Linux Desktop on my Laptop.

Connecting to internet:
Connecting to internet was seamless, just plug-in the broadband cable and rest is automatic, you are connected to net. This is case only if you have DHCP kind of configuration with ISP. Airtel Broadband works fine.

Multimedia play:
One these display issue was sorted out, I just tried playing a .mp3 files, however it said codec missing and prompted for download when you say "YES", the rest is done. This is the same for any preparatory audio/video formats. I guess these codecs are not supplied in the default installer as they are preparatory or due to license issues. However this is not a problem really if you have internet. Otherwise sad thing is you wont be able to listen music unless they are open formats like .ogg etc. Anyway I installed my favorite media player "vlc", which supports most of the formats without any codec dependency. I use the same in Windows, thats the reason I installed this. The default media player - “Totem Player” works fine and there are no issues.

C-Compiler (gcc) issue:
Basically I am a C programmer so I was curious to check whether C compilation works fine or not. Started writing a "Hello world" program to check the compilation. To my surprise it was not compiling. gcc and make were there, however necessary stdlib header files and libraries were missing. Once you are connected to internet, installing any package is trivial. We can either use "Synaptic Package Manager" or the cmd line "apt-get install ". Both are really good. Making C program compile is essay, just install “build-essential” package either from "Synaptic Package Manager" or cmd line as,

sudo apt-get install build-essential

Luckily this package comes with a installation CD, thus even if you don't have a internet connection you would still be able to install this, Which is very good thing. To install C manual and full fledged Vim editor you need internet connection and below are the commands

sudo apt-get install manpages-dev glibc-doc → for man pages
sudo apt-get install libncurses5-dev → for ncurses.h

TIP: Can also use System | Administration | Synaptic Package Manager to install any package trough GUI.

sudo apt-get install vim-runtime
sudo apt-get install vim-full
sudo apt-get install gvim

Above command gets you all capabilities of favorite VIM editor.

Automatic update works very well in Ubuntu. In fact I updated to 8.10 from 7.10 through net. It was a two step process 7.10 → 8.04 (LTS) → 8.10. I would better recommend installing Latest version directly as it takes lot of time for updates. One nice thing is that 8.10 had Brasso, a nice CD burning tool. Earlier version had something like ISO write, which also worked well.

The best part is it even prompted for installing ATI Radeon drivers automatically, which helped in getting all the Power related options working like Hibernate. This was not the case in Mandriva even when I updated over the internet. Still Hibernate doesn't seems to work :-(

Ubuntu is a very simple to use and elegant Linux distro I enjoyed using it. I strongly recommend it. As a personal observation, it was very stable in my Laptop compared to Mandriva, however Mandriva was giving a best look & feel and simpler user interfaces similar to Windows. The choice depends on your taste and requirements.

Books to Read

Its always a good idea to read the books that matches your wavelength. I mean you should start with books that are intended for your level. Even if a book is very good check whether it matches your level before reading it. Now you may be asking me, "How do I find out that?". Its simple, if you are able to understand and appreciate the concepts explained in the book then we can say its at your level. Here I have listed some of the very good books that I have come across. Hope this will help you picking a right book for your level. The books are arranged in a order so that normally fist book would be to start with and can proceeded to other books to gain more depth and not too many entries are there which might interest you.

C:
1.Let Us C (Fifth Edition) - Yashavant P. Kanetkar
A good book to get started with, especially useful for college students. PDF version is available in the net, however its better to read the book version as this might be your first book. Available in PDF format in net.
2.The C programming Language – Brian W.Kernughan, Dennies M. Ritche
Also called as K&R book, written by author of C Language, this is like a bible for C. Better to have a hard copy for reference, recommended only after learning C from a basic book like the above one. Not a good idea to start with this book as every line contains lot of compressed information about the language. Available in PDF format in net.
3.Expert C Programming: Deep C Secrets - Peter van der Linden
Written by a Compiler writer at Sun Miscrosystems, a must for all professional C programmers. As the name suggests Deep C secrets are unrevealed, this book is written in a casual tone which encourages reading, even has some fun for you at the end of every chapter. Last chapter on C++ is a very good introduction to C++. Available in PDF format in net.
4.Linked Lists and Binary Trees – Stanford University tutorials
These are very useful compared to any book. Better to read them again and again before attending interviews in C. Available in PDF format and You can download it from Stanford university website.
Pointers and Memory
Linked List Problems
Binary Trees
5.C Programming FAQs: Frequently Asked Questions– Steve Summit
Answers to most commonly confused language constructs. Online version and hard copy is available. Good to read them once if you are facing a interview in C. Its called as comp.lang.c.
C FAQ

C++:
1.Let Us C++ - Yashavant P. Kanetkar
This is a good book to get started with If you like Let us C, then you can start with this for C++. Concepts are presented with simple examples (which might not be useful in programming problems) so that the concepts are well understood. Once you grasp the basics from this books, Its better to read another book which would present typical real world examples. The one below is very useful in that regard.
2.C++ Annotations - Frank B. Brokken
Online version is available, Concepts are presented very well I recommend this book.
C++ Annotations
You can get a PDF version as well.
3. Thinking in C++ - Bruce Eckel
This book is for a thirsty person who wants to know answers to why questions.If you are C programmer migrating to C++, then this book is for you. One of the best books interns of treatment of the subject. OOP concepts are explained very well in the first chapter and what a linker does is also demystified. PDF version can be downloaded from net:
Thinking in C++ download
Thinking in C: Foundations for Java & C++ - Chuck Allison
Its a flash-based audio-visual seminar which comes in CD with Thinking in C++ hardcopy or can be downloaded from Thinking in C download.
Is a very good seminar intro to C, its worth watching.
4.The C++ Programming Language - Bjarne Stroustrup
Written by author of C++ Language, its a nice reference. First chapter gives a very good overview of what C++ can do for you. If you are not able to understand this book better revisit after reading some other book suggested above.

Perl:
1.Essential Perl
This is not a book, this is a short tutorial to Perl. Perl is a kind of Language which you learn in few hours and start writing programs provided you are already familiar with a programming language like C. This tutorial serves that purpose. Just as 25 page PDF file, after which I am sure you will be able to write your first program for ant text processing task. You can download it from Stanford university website.
Essential Perl
2.Learning Perl - Randal Schwartz, Tom Christiansen & Larry Wall
Called as Lama book. Very good book for the Beginners. I recommend this book, concepts and Language are presented very well. Available in PDF format in net.
3. Mastering Regular Expressions - Jeffrey E. F. Friedl
Core logic of every perl program will be a regular expression (regex), mastering regex would help in so many ways, while you use a grep command or seacrh / replace a text in vim etc. Though regex can be treated as a language of its own, its normally associated with other languages, however only the syntax varies the core logic remains same. Languages like Perl, Java, .NET etc support regex. This is a vary good book, I don't think there is a better book for regex, reading this would make you life easy for so many problems otherwise you would have struggled. Available in PDF format in net (only 1st edition), better to have a hard copy of a Latest edition. Its a must to read.
4.Programming Perl - Larry Wall
Called as Camel book. This is an ultimate reference written by the author, not page by page reading required. You can refer this when needed. However initial chapters explains the design philosophy of perl which are good to know. Available in PDF format in net.

Unix:
1.The Unix Programming Environment - Brian W. Kernighan and Rob Pike
This is a very good book to learn Unix / Linux Sell. I recommend this book, the way things are presented in this book and systematic and easy to learn.

GSM:
1.The GSM System for Mobile Communications - M. Mouly and M. Pautet
For people who work on Mobile Side, this is a very good book to learn the Technology before dwelling into standards. Concepts are presented by answering Why they are needed?
2.GSM Networks: Protocols, Terminology, and Implementation - Gunnar Heine
I haven't read it completely. However I feel this book presents the network side concepts well. Its is good book for people working on the Network Side.

ARM:
1.ARM system-on-chip architecture – Steve furber
Very good book for knowing ARM from scratch. I was not from CSE background, still I was able to understand the concepts presented. Must for people who work in an embedded environment using ARM processor.

VIM:
A tutorial that comes with VIM is the best thing to get started with once you are used to it. May be you can read the PDF version of the book available in vim.org website: The Vim book by Steve Oualline.