Virtualization - Installing Ubuntu Linux with VMware on MacBook

May 14th, 2008 at 13:40 · Filed Under Call Me a Geek, Computing, Linux, Mac OS X, Solaris · 2 Comments 

I have successfully installed 64-bit Ubuntu 8.04 (Hardy Heron) Linux on my Mac Book. Out of my expectation, the installation was rather quick and easy compared to installing Solaris 10. I had tried installing Solaris 10 on my Mac Book. Solaris installation was successful but I couldn’t boot into it. I wondered why.

My Mac Book sports an Intel Core 2 Duo 2.16GHz with 2GB RAM and 160GB hard drive. I am too skeptical to have 2 physical partitions on my hard drive. Thanks to VMWare Fusion, I can create virtual partition with it. After I have installed VMware Fusion 1.1.1, I created a Ubuntu-64-bit virtual partition and installed Ubuntu from the ISO disk image. With VMware Fusion, I can install directly from the disk image without having to burn a CD or DVD.

Since my Mac Book is codenamed Uranus, I called my Ubuntu on Mac Book, Uranus-Zeta. The idea is from the ζ-ring of Uranus

Like Linux, Mac OS X is a UNIX like operating system. Why do I need Linux? Well, there are a number of reasons. One being you can and another to learn new things. But these are not the reasons to motivate me. Being a software developer developing cross-platform software, I do tests on multiple platforms. Having Linux to run on my MacBook means I can develop and test my software on both Mac OS X and Linux environment without switching to my Linux/Solaris boxes. Another important reason is that I see the needs to support my clients on Linux arise and soon Solaris. Having the ability to run three different operating systems on one machine can be productive and versatile for me.

The other obvious reason is that I have a Core 2 Duo. Meaning I am having two 64-bit CPUs in one processor. It will be a waste of resources if I don’t utilize the computing power I already have. Assigning each CPU to run different operating systems and tasks is called virtualization.

With VMware Fusion, I can run Linux and Solaris side-by-side with Mac OS X without the need to boot into anyone of them at one time. This is a great feature when supporting clients in Mac OS X, Linux and Solaris.

Here are some screen shots (click to enlarge) of Uranus-Zeta:

Peculiar behavior of Sed

What is Sed?

Sed is the ultimate stream editor. If that sounds strange, picture a stream flowing through a pipe. Okay, you can’t see a stream if it’s inside a pipe. That’s what I get for attempting a flowing analogy. You want literature, read James Joyce.

Anyhow, sed is a marvelous utility. Unfortunately, most people never learn its real power. The language is very simple, but the documentation is terrible. The Solaris on-line manual pages for sed are five pages long, and two of those pages describe the 34 different errors you can get. A program that spends as much space documenting the errors than it does documenting the language has a serious learning curve.

You can read more about Sed here.

My project uses a thick binding of PostgreSQL/MySQL called APQ. APQ is a project by Warren and I helped to host it at my server. See my post here. The configure and make process are not really stable which I think is due to various version of MySQL and the Linux tools such as sed.

To build APQ, first, two MySQL include files, errmsg.h and mysqld_error.h need to be parsed. These files contain MySQL error codes and they need to be parsed and translated into Ada syntax. This translated Ada code will be inserted into apq_mysql.ads.

However, this parsing and translation process are not working correctly as they supposed to be. When I look into this problem, I found a peculiar abnormality. The parser uses sed. When I built APQ on Mac OS X, FC5 and Solaris (Intel), the result in apq_mysql.ads is not consistent on these different OS.

After I upgraded to Mac OS X 10.4.9, the parser refused to work with some error messages which I think caused by sed. I was mingling with the configure script until this hour. Suddenly, something struck my mind. Why do I need to mingle with configure? The problem is the parsing and it deserves the highest priority. The build configuration does not perform a thorough check of the environment but it still works fine at this point. So, I moved my priority to write a parser in Ada to solve the parsing problem. This light shed on me at this whee hour in the morning and I was really too tire to continue working on the parser.

Cease development on SGI’s IRIX

November 5th, 2006 at 23:50 · Filed Under At Work, Business, Days in My Life, Linux, Mac OS X, Software Development, Solaris · Comment 

After a 30 minutes discussion with my co-workers, we have unanimously decided to cease all development on SGI’s IRIX. We began developing applications on SGI’s IRIX about 5 years ago because of demands in 3-D graphics visualization. We used Ada to implement our 3-D visualization solutions.

With today’s availability of powerful microprocessor such as AMD and Intel 64-bit processor, SGI’s hardware has become too expensive too invest and maintain. Another reason is the difficulty to find tools such as gnat Ada compiler. The download site usually provides out of date version that makes maintaining the consistency of compiler versions across other platforms difficult.

This decision should have been made long time ago. A lot of time and resources had been wasted in maintaining existing software and development of new applications. Our clients’ decisions to migrate to Opteron and Mac OS X based platforms have also contributed to this decision. We expect zero or next to zero porting problem because we are using portable technologies such as Ada, GTK+, GtkAda and OpenGL. This decision enables our development to focus on both Opteron (Solaris and Linux) and Mac OS X platforms.

Firefox 2

November 3rd, 2006 at 19:10 · Filed Under Blogging, Computing, Linux, Mac OS X, Solaris, Web · 4 Comments 

Mozilla has released the long awaited Firefox 2 web browser. Firefox 2 is a major upgrade to its popular and acclaimed free, open source web browser. I just finished downloading and installing Firefox 2 on my Mac OS X, Linux and Solaris 10 x86 machines. I noticed improvement in performance, speed and user interface compared to version 1.x.

Firefox 2 has made web browsing easier and delivered best online experience. On Mac, I use both Safari and Firefox for my browsing. Unfortunately, Safari is not really working together with WordPress. For example, I lose all the editing functions when I write my post. The editing functions panel is not displayed in Safari. In the contrary, Firefox 2 displays the editing functions panel and I am able to access these functions by clicking on the icons. Firefox 2 allows me to easily write my posts.

I have not been using any Microsoft products since I completely ditched Microsoft in 1998. The only product that I had on my Mac was IE, Microsoft’s web browser. In terms of performance, speed and security, IE really sucks. I have deleted IE on my Macs and replaced with Firefox.

Mozilla makes improvements to the user interface, security tools and options for customization, combine to deliver rich, engaging, safer and more productive web browsing experience for all.

One feature I like most in Firefox is its ability to view background image and page info. These are valuable tools for web development. Another feature I use most is displaying my browsing history in the sidebar which allows me to browse my history side-by-side with web pages.

Tabbed browsing has become a de facto standard feature in most modern web browser. Mozilla has changed the user interface of tab and allowed moving tab to any position you like so that you can arrange the pages you are browsing according to your priority. Another plus for Firefox 2 which makes web browsing more productive. Apple’s Safari does not allow moving the tab.

Another good selling point of Firefox 2 over Apple’s Safari is the built-in spell checker in input fields. Firefox 2 will underline misspelling inline and is very useful for blogging. With Firefox’s built-in spell checker, there is absolutely no necessity to install additional plugins for blogging tools such as WordPress.

Although Apple’s Safari is also a nice web browser, it still needs some patch up to be on par with Firefox 2. The only best feature in Safari is its excellent support of international character encoding. Apple has done a great job not only in Safari but in Mac OS X and applications as the whole.

So much on the features that I like most and often use. I will let you to discover Firefox 2 yourselves.

Solaris 10

October 30th, 2006 at 0:02 · Filed Under Call Me a Geek, Computing, Hacking, Solaris · 1 Comment 

Pyxis1 was down two months ago. I decided to try to revive it last Friday. At first, I was thinking of installing either FC5 (Fedora Core 5) or Debian. On second thought, I have had enough with Linux. I am running SPARC/Solaris 9 on Pyxis2 (Sun Blade 150). I always wanted to try out Solaris 10 but I don’t want to mess with the existing Solaris 9 on Pyxis2. There is a saying, “Don’t fix thing if it ain’t broken.” and I always reminded myself. Pyxis1 has provided an opportunity to try out Solaris 10. So I started to search for the CDs which I received from Sun Microsystems. I found it but it was quite outdated compare to the 6/06 version on Sun’s server. I immediately began downloading 6 CDs.

The problem with Linux is that every distro has their own way of doing things. This is pretty obvious in configuration and config files. Although all distros are based on the same kernel, yet every distro has different kernel version and variation in configurtion of their kernel and software components. Another dreadful problem is the online updates which break the integrity of Linux and software components. A few weeks after my first successful installation of FC5, I performed an online updates and it instantly broke some working components. Although my FC5 is still working, I have problem with Desktop Login, displaying .png files, and some administration applications stop working as well.

Solaris 10 is an excellent UNIX operating system. It is currently free. The release and Sun’s OpenSolaris has stirred some uproar in the Open Source community and IT industry as a whole. Solaris 10 is a very impressive operating system in terms of some features no other operating system can claim and some are not necessarily new, but have been implemented in an excellent way. But yet it is not perfect. An obvious example is the detection and configuration of hardware, such as NIC and sound card, are not polished.

It is assumed that Solaris will not be installed by novice. The installation need humongous effort and is painful. The graphical installtion is resource hungry. Without the minimum 400MB RAM, the installation resort to console installation. The installation process is not well polished as aforementioned. But I believe, the future Solaris will receive plenty of improvement if Sun is heading to Linux territory. By that time, even the faint hearted novice would be able to install Solaris effortlessly.

Once the installation is completed, the operating system whirs swiftly, making the its old nickname “Slowlaris” not applicable.

Saturday evening I began the installation. After the first installation, I could not get my networking to work. I searched for posts and articles about problems with installing Solaris 10 on x86. I thought it might be some steps which I had overlook. At night, I installed it for second time. It was getting too late and I was tired and I left the installation to go on while I went to bed. I woke up early Sunday morning to finish the installation. Again, I was still having networking problem. After reading some posts, I started my own investigation.

First, I found out that the Solaris installation failed to detect and to configure my NIC. It was an integrated Intel 10/100 on Compaq Evo D510 Small Form Factor PC. I performed an “ifconfig -a” and only showed the loopback.

# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000

Next, I needed to determine if my NIC was there. So I did:

# prtconf -pv

It returned some results and I look for “Ethernet controller”:

Node 0x000011
assigned-addresses:  82054010.00000000.f8500000.00000000.0000100
0.81054014.00000000.00001000.00000000.00000040
reg: 00054000.00000000.00000000.00000000.00000000.02054010.0000
0000.00000000.00000000.00001000.01054014.00000000.00000000.000
00000.00000040
compatible: 'pci8086,103b.e11.12.81' + 'pci8086,103b.e11.12' +
' pcie11,12' + 'pci8086,103b.81' + 'pci8086,103b' + 'pciclass,020000' +
'pciclass, 0200'
model:  'Ethernet controller'
power-consumption:  00000001.00000001
fast-back-to-back:
devsel-speed:  00000001
interrupts:  00000001
max-latency:  00000038
min-grant:  00000008
subsystem-vendor-id:  00000e11
subsystem-id:  00000012
unit-address:  '8'
class-code:  00020000
revision-id:  00000081
vendor-id:  00008086
device-id:  0000103b
name:  'pcie11,12'

With this output, I was sure that I had my NIC on Pyxis1. From the identifying handle, “pci8086″, I was certain to use iprb interface for the configuration. These are the steps which I followed:

  1. In /etc/driver_aliases, add
    iprb "pci8086,103b"
  2. Reboot the system with
    # touch /reconfigure; reboot
  3. Setup iprb with
    # ifconfig iprb0 plumb
    # ifconfig iprb0 inet 195.168.24.4 netmask 255.255.255.0 broadcast +
    # ifconfig iprb0 up
  4. Creeat /etc/hostname.iprb0
    # echo pyxis1 > /etc/hostname.iprb0
  5. In /etc/hosts, add
    195.168.24.4     pyxis1   pyxis1
  6. Create two files in /etc
    # echo 195.168.24.1 > /etc/defaultrouter
    # echo nameserver DNS_ip_address_1 >> /etc/resolv.conf
    # echo nameserver DNS_ip_address_2 >> /etc/resolv.conf
  7. Edit /etc/nsswitch.conf and add dns to line
    host:         files dns
  8. lastly
    # route add deafult 195.168.24.1

After murdering millions of brain cells, the fun finally began. I login remotely from Pluto. Here are some screenshots of Solaris 10 on Pyxis1:

Solaris 10 x86

Solaris 10 x86

Mac OS X got Dtrace

October 26th, 2006 at 15:03 · Filed Under Computing, Mac OS X, Software Development, Solaris · Comment 

The open source DTrace which has been part of Solaris has made its way into Mac OS X, Leopard.

Track down problems

When you need a bit more help in debugging, Xcode 3.0 offers an extraordinary new program, Xray. Taking its interface cues from timeline editors such as GarageBand, now you can visualize application performance like nothing you’ve seen before. Add different instruments so you can instantly see the results of code analyzers. Truly track read/write actions, UI events, and CPU load at the same time, so you can more easily determine relationships between them. Many such Xray instruments leverage the open source DTrace, now built into Mac OS X Leopard. Xray. Because it’s 2006.

I am looking forward to Leopard, Xcode 3.0 and Xray.

FireStats icon Powered by FireStats