My last blog in 2012: My 2013 wishes and predictions…

Last year I wrote a wish list and prediction for 2012 and this year I am going to do the same for 2013. So for 2013 in technology realm specially when focused on Java is as follow:

  • Java SE 8 will be an awesome release despite the Jigsaw setback.
  • Java EE 7 will bring more ease of use and clarity into the community.
  • GlassFish 4 will be awesome and and more people will benefit from it’s modular and extensible architecture…
  • In late 2013 NetBeans IDE 8 will rock!
  • IBM will push the idea of how cool Rational set of IDEs are and how good Websphere is and people will believe it until the are caught with no way to return.
  • RIM seems to be pulling it together and it is likely to keep its own operating system rather than adopting Android.
  • Google Chrome will continue eating other browsers marketshare as fast as browserly possible.
  • Some of the new cool boys in the JVM town that are claiming to be the next Java will vanish/start vanishing without any trace
  • I wish for a very thin and edge to edge tablet and cell phone on top of android so I could switch to another phone. This will be something that Google_Moto will do.
  • Maybe I see someone with a Windows Mobile phone somewhere other than advertisements.

What I wish for during 2013, unrelated to technology

  • No more war and instead of that some peace and quiet time around the globe.
  • No disasters like what we had in 2011 and instead some ground breaking scientific discoveries in medicine, energy and space travel.
  • No economy breakdown anywhere in the world.
  • To win more bets against my nemesis.

Other predictions for 2013 which I truly like to be proven wrong for some parts:

  • Iranian government will not go away and will not change to a sane governing body.
  • Pakistan army and ISI will continue supporting /training and harboring  Al Qaeda and Taliban and continue destabilizing Afghanistan southern and central provinces.
  • Iranian government will continue meddling in other countries affair specially in Afghanistan and Arab countries.
  • It is highly likely that Syrian dictatorship loose the battle for capital city and leave the capital but they will remain a player in the country and wreck havoc for the time being.

I wish everyone a happy new year with lots of joys and success.

Configuring DHCP server in Solaris

A Dynamic Host Configuration Protocol (DHCP) server leases IP address to clients connected to the network and has DHCP client enabled on their network interface.
Before we can setup a start the DHCP server we need to install DHCP configuration packages. Detail information about installing packages in provided in recipe of chapter 1. But to save the time we can use the following command to install the packages.
# pkg install SUNWdhcs
After installing these packages we can continue with the next step.
How to do it…
First thing to setup the DHCP server is creating the storage and initial settings for the DHCP server. Following command does the trick for us.
# dhcpconfig -D -r SUNWfiles -p /fpool/dhcp_fs -a 10.0.2.254 -d domain.nme -h files -l 86400
In the above command we used several parameters and options, each one of these options are explained below.
  • The -D specifies that we are setting up a new instance of the DHCP service.
  • The -r SUNWfiles specifies the storage type. Here we are using plain-text storage while SUNWbinfiles and SUNWnisplus are available as well.
  • The -p /fpool/dhcp_fs specifies the absolute path to where the configuration files should be stored.
  • The -a 10.0.2.15 specifies the DNS server to use on the LAN. We can multiple comma separated addresses for DNS servers.
  • The -d domain.nme specifies the network domain name.
  • The -h files specifies where the host information should be stored. Other values are nisplus and dns.
  • The -l 86400 specifies the lease time in seconds.
Now that the initial configuration is created we should proceed to the next step and create a network.
# dhcpconfig -N 10.0.2.0 -m 255.255.255.0  -t 10.0.2.1
Parameters we used in the above command are explained below.
  • The -N 10.0.2.0 specifies the network address.
  • The -m 255.255.255.0 specifies the network mask to use for the network
  • The -t 10.0.2.1 specifies the default gateway
All configurations that we created are stored in DHCP server configuration files. We can manage the configurations using the dhtadm command. For example to view all of the current DHCP server configuration assemblies we can use the following command.
# dhtadm -P
This command’s output is similar to the following figure.
Each command we invoked previously is stored as a macro with a unique name in the DHCP configuration storage. Later on we will use these macros in subsequent commands.
Now we need to create a network of addresses to lease. Following command adds the addresses we want to lease.
# pntadm -C 10.0.2.0
If we need to reserve an address for a specific host or a specific interface in a host we should add the required configuration to the system to ensure that our host or interface receives the designated IP address. For example:
# pntadm -A 10.0.2.22 -f MANUAL -i 01001BFC92BC10 -m 10.0.2.0 -y 10.0.2.0
In the above command we have:
  • The -A 10.0.2.22 adds the IP address 10.0.2.22.
  • The -f MANUAL sets the flag MANUAL in order to only assign this IP address to the MAC address specified.
  • The -i 01001BFC92BC10 sets the MAC address for the host this entry assigned  to it.
  • The -m 10.0.2.0 specifies that this host is going to use the 192.168.0.0 macro.
  • The –y asks the command to verify that the macro entered actually exists.
  • The 10.0.2.0 Specifies the network the address is assigned to.
Finally we should restart the DHCP server in order for all the changes to take effect. Following command restarts the corresponding service.
#  svcadm restart dhcp-server
When we setup the DHCP service, we store the related configuration in the storage of our choice. When we start the service, it reads the configuration from the storage and wait dormant until it receives a request for leasing an IP address. The service checks the configuration and if an IP was available for lease, it leases the IP to the client.
Prior to leasing the IP, DHCP service checks all leasing conditions like leasing a specific IP address to a client to ensure that it leases the right address to a client, etc.
We can use the DHCP Manager GUI application to configure a DHCP server. The DHCP manager can migrate the DHCP storage from one format to another. To install the DHCP manager package we can use the following command.
# pkg install SUNWdhcm
Now we can invoke the DHCP manager using the following command which opens the DHCP Manager welcome page shown in the following figure.
# dhcpmgr

Karmic Koala and using more than 3 GB of RAM in its 32 bit installation.

I upgraded my laptop OS to Karmic Koala (Ubuntu 9.10) beta version to play with new features and capabilities provided in this release.

Out of habit or whatever I am using 32 bit version of the OS both on the laptop and desktop (both are 64 bit) and I rather prefer to stay with 32 bits as some application sucks on 64 bit (are they still suck?). Well in previous versions I replaced the kernel with a server kernel to have access to all of my 4 GB of RAM but in the new release it is not possible to install the server kernel for 32 bit architecture as it is dropped :). To get more information about provided kernels take a look at : https://wiki.ubuntu.com/KernelTeam/Specs/KarmicKernelFlavours

So, how we can use more than 3GB of ram on a 32 bit Ubuntu? It is simply possible by installing the linux-generic-pae meta package. you can install it simply by using the following command or clicking on apt:linux-generic-pae link if you are using Firefox. (I do not know whether other browser can handle the link type correctly, do they?)

sudo apt-get install linux-generic-pae

The above command will install linux-image-2.6.31-13-generic-pae and linux-image-generic-pae or newer version when available. You may need to install the linux-headers-generic-pae if you are planning some development.

Now you need to restart the system and boot using the new kernel. By default Ubuntu should use the latest kernel version available in the system.

To see the amount of recognized RAM use free command …. just type the command in the terminal and you will understand.

If you can not use more than 3GB of ram after restarting the machine it means that Ubuntu is using the generic kernel and you should either remove the generic kernel or you should change the boot configuration.

To make the new grub show the boot loading menu you should open /etc/default/grub and comment the GRUB_HIDDEN_TIMEOUT=0 after commenting this property and saving the file you will need to execute the following command which will generatet he /boot/grub/grub.cfg file:

sudo update-grub

Now you should be able to see the boot loader menu to choose the kernel version you want to boot with.

To remove generic kernel packages you can use a command like the following command depending the kernel version you want to remove.

sudo apt-get remove linux-image-2.6.31-13-generic linux-image-generic

something fun in Feisty Fawn

It is sometimes that I use Ubuntu in home as primary OS, a shortcut that I am used to use is ALT+Space to minimize, maximize or restore a window. But in Ubuntu or maybe in Gnome, It is my first time that i use Gnome as primary desktop, this key combination act differently.

When I pressed ALT+Space as i used to do it and it showd a semi transparent window which let me select one of application links that are present in Gnome/Ubuntu menu a link to some web site, a folder in my home directory or something else which i have not descovered yet.

The opened window allows you shows all menu items that begins with your typed character and let you select your target shortcut

Here is an screenshot of this window. a wonderful thingy, by the way maybe it is not Gnome built in feature and one of additional packages that i installed add it to Gnome.

fun_with_ubunut.png