Every Flavour Beans

“The time has come…to talk of many [technologies].” –Lewis Carroll(’The Walrus and the Carpenter’)
Development Tools. Web Frameworks. GNU/Linux. Nokia N800. Video Encoding.

November 25, 2006

Ubuntu 6.10 Annoyance: `failed to initialize HAL` error

Filed under: GNU/Linux — tabrez @ 1:49 pm

Ubuntu 6.10(Edgy Eft) worked well for the first few weeks with the most visible change from the earlier version being fast boot up times. It took less than a minute on my system to boot Ubuntu and load the GNOME desktop(with automatic user login enabled). Then I lost the sound on a certain fateful day without being able to understand what could have been the possible reason for it. I got it back by running the amixer command and resetting the volume levels, but lost it again after a few days. Running the same command returned the sound but I have no idea when I am going to lose it again. My concern though is that I am not able to track down what is causing the sound to go dead repeatedly(I hope it is not because of the beta version of the Firefox Flash plugin).

The error that refuses to go away and which seems to have no simple fixes, is the HAL initialization error. I started to get this error after a few weeks since the installation of Ubuntu 6.10, in the form of a pop up window informing that the system failed to initialize HAL. Which meant no automatic mounting of the removable devices: USB hard disks, USB pen drives and CD/DVD discs in my case. After spending some time hunting for a fix on the Internet, going through bug reports and related discussion on Launchpad, surfing through ubuntuforums threads and chatting on IRC channels, I found two possible fixes for the problem:

  1. Disabling the Samba shares in the /etc/fstab file and
  2. Disabling the automatic user login option for GDM.

There are no Samba shares in my /etc/fstab file, so I tried disabling the auto login option for GDM(System -> Administration -> Login Window -> Security; but if you have enabled this option earlier, then you already know how to disable it) and the HAL error was gone. All the removable disks were mounted automatically upon insertion once again. This clearly shows that there is a timing problem which is causing this error, and it goes away when the login process gives enough time for all the initialization to be completed before fully loading the GNOME desktop manager. Which also suggests that using timed automatic login option will also effectively solve the problem: I used a time delay of 5 seconds with automatic login option and HAL is properly initialized with this setting.


If you want to receive future posts by email, enter your email address here:

Related Posts:

  • Finally Got 3D Desktop Effects in My Ubuntu Gutsy (ATI Hardware)
  • Another system rescue story, using Ubuntu LiveCD
  • System rescue act using GNU/Linux Live CD
  • Installing Ubuntu & Kubuntu Dapper(6.06 LTS) For NVidia GeForce Cards
  • Apache + PHP + MySQL on Gentoo
  • Struts 2 Plugin for NetBeans IDE - nbstruts2support
  • Installing C#/Mono(.NET)/MonoDevelop/XSP in Ubuntu Gutsy Gibbon(7.10)

  • November 16, 2006

    Installing Oracle Database 10g Express Edition on Debian/Ubuntu

    Filed under: GNU/Linux — tabrez @ 7:20 pm

    I finally decided to try installing the Oracle Database 10g Express Edition on Ubuntu 6.10 operating system when a CD containing the 10.2 version of the software was shipped with the book from Oracle Press. The book explains the installation procedure in quite a bit of detail, but I soon gave up the temptation to install the software from the .deb package carried by the CD as a later version of the software was available in the online repository. I searched for the repository on the Internet that stores the Oracle Database XE and found the following link on Oracle’s website:
    Installing Oracle Database XE on Debian, Ubuntu, and Kubuntu

    It becomes a trivial process after going through the above article and adding the specified line in the /etc/apt/sources.list file:

    deb http://oss.oracle.com/debian unstable main non-free

    Search for ‘oracle-xe’ in the Synaptic Package Manager(Edit -> Search), mark all the necessary packages and click “Apply”.

    Install Oracle 10g XE from Synaptic Package Manager

    Install Oracle 10g XE from Synaptic Package Manager

    Or install simply from the command line using the apt-get command(search for the packages using ’sudo apt-get update && sudo apt-cache search oracle-xe’ command). The latest version will be downloaded and installed on the system. I encountered a minor problem during the process though: the installation wouldn’t proceed because of the following error:

    Oracle Client 10g Express Edition require 1024MB of swap space. This system has 996MB of swap space. Configure more swap space on the system and retry the installation.

    The documentation says that the installer checks to see whether 1GB of swap is available if 1GB of RAM is installed on the system. I had given 1000MB as the size for the swap partition(easier to type than 1024) and the installer is dumb enough to stop for 28MB of less memory that expected. After a quick confirmation on the Oracle forum, I added some more temporary swap memory using the following procedure and repeated the installation process.

    sh# sudo dd if=/dev/zero of=/tmp/swap bs=1M count=100
    sh# sudo mkswap /tmp/swap
    sh# sudo swapon /tmp/swap

    I needed only 100MB of additional swap space, so ‘count’ might be different for you if you come across the same problem. Once the installation is finished, the swap file can be deleted after running ’swapoff /tmp/swap’ command to immediately reclaim the disk space(100MB hardly mattered in my case) or one can just wait until the next reboot(and remove the file if /tmp is not automatically cleared on your system). If you need to create permanent additional swap space, then the swap file need to be created at a different location than /tmp and the ’swapon /where-ever/swap’ command need to be put where it will be executed every time the system boots.

    Configuration of Oracle 10g XE

    The final step of the installation is to configure the Oracle Database XE. Start a shell and run the following command (you can accept the default values suggested for most of the question by hitting the ENTER key):

    sh# sudo /etc/init.d/oracle-xe configure

    One question that deserves a careful thought is whether or not you want to start the Oracle Database server automatically at boot time. If you choose to start it up at boot time, it will always be running as a service in the background and consumes resources. If you choose not to automatically start it at the boot time, you have to manually start it whenever you want to access your databases. Setting a password for the standard user accounts ’sys’ and ’system’ is also part of the configuration process.

    Once finished, the Oracle Database XE server will be running on the port as specified at the end of the configuration process and you can administer the DBMS by pointing your web browser to http://localhost:8080/apex(unless you changed the port number) and logging in using the user name ’system’ and the password you created during the configuration process. Below is a screenshot of how the administration panel looks like in a web browser.

    Adminster Oracle 10g XE in Debian/Ubuntu

    Two menu items will also be created containing links to documentation, online forum, and other services provided by Oracle Database XE.

    Oracle 10g XE GNOME menu in Debian/Ubuntu

    The default menu items created by the Oracle installer were too long to my taste, so I shortened them from the Menu Layout manager(Right-click on “Applications” menu, select “Edit Menus”, right-click the Oracle menu items, select “Properties” and change the text in the “Name:” field).

    If you are a Fedora or a Suse user, installing Oracle DBMS has been supported on these platforms for a very long time. Search google for installation instructions.

    Gentoo users should checkout the Gentoo Wiki article describing how to install Oracle 10g Express Edition on Gentoo systems. It’s a laborious process though.

    After the installation is complete, use the Oracle 10g XE getting started guide available on the Oracle website to learn how to do simple tasks with the DMBS from the web browser interface.


    If you want to receive future posts by email, enter your email address here:

    Related Posts:

  • Installing Solaris Express Developer Edition(5/07) on PC/VMWare
  • Six Popular IDEs For Developing Software in C/C++ on Windows Platform
  • Witty Twitter + Darrel’s Identi.ca patch = Witty Identi.ca Client
  • Setting Up Rails Development Environment on Ubuntu GNU/Linux
  • Linux Bible 2007 Edition: Install/Run 10+ GNU/Linux Distributions(Ubuntu, Fedora, Gentoo etc)
  • Develop Ruby Applications Using Komodo IDE
  • How I Upgraded to Wordpress 2.3 on Live Blog With Zero Downtime

  • November 14, 2006

    Installing Complete LAMP Stack on Ubuntu 6.10(Edgy Eft)

    Filed under: GNU/Linux — tabrez @ 10:34 pm

    One way to get the complete LAMP(GNU/Linux + Apache + MySQL + PHP) stack installed and configured on Ubuntu operating system is to use the Server install CD version of the distribution. Ubuntu 6.10 Server Edition, for example, provides a menu option during the installation to install a complete LAMP server on the machine. No desktop environment or unnecessary packages will be installed, so this is the preferred way to run a dedicated LAMP stack on a machine. Once installed this way, one can easily login to this machine remotely and tweak the default configuration settings.

    For those who would like to run the LAMP stack on their personal desktops(for development and testing purposes for example), selecting a few packages will get all the required components installed. There is an easier way though: Select the LAMP task from the Synaptic Package Manager and install everything with a single selection:

    • Start Synaptic Package Manager, go to Edit -> Mark Packages by Task… and select LAMP Server from the list of options. Click OK and then click the “Apply” button on the toolbar.

    This will install the default list of packages that are part of LAMP installation. I prefer to install additional packages too, like GUI tools to work with the databases. The following two commands will install LAMP and some additional packages related to it:

    Basic LAMP Installation:

    sh# sudo apt-get install apache2 mysql-server mysql-client-5.0 php5 php5-mysql

    Additional LAMP related packages:

    sh# sudo apt-get install php5-cgi php5-cli php5-gd php5-imagick php5-json php5-odbc postgresql php5-pgsql php5-sqlite php-auth php-doc mysql-admin mysql-query-browser apache2-doc pgadmin3 pgdocs-pdf phppgadmin

    To know more about these additional packages, search for them in the Synaptic Package Manager and read their descriptions. Though PostgreSQL is not technically a part of LAMP stack, it is a good alternative to MySQL DBMS and and fits equally nicely with Apache and PHP combination. These are the applications that I install on my machine; to browse through the entire collection of packages related to the LAMP stack, search for ‘apache’, ‘php’ and ‘mysql’ in Synaptic Package Manager(Edit -> Search) and select your own favourite packages to install from the result list. Installing the complete LAMP stack and related packages is similar for Kubuntu operating system, with Adept Package Manager taking the place of Synaptic Package Manager.


    If you want to receive future posts by email, enter your email address here:

    Related Posts:

  • EasyEclipse is the Best Packaged Distribution of Eclipse Platform
  • ‘wget -c’ Bug in Download Script Generated by Synaptic in Ubuntu 7.10(Feisty Fawn)
  • Update or Install Applications on Debian/Ubuntu Without an Internet Connection
  • Installing Ubuntu & Kubuntu Dapper(6.06 LTS) For NVidia GeForce Cards
  • Ubuntu 6.10 Annoyance: `failed to initialize HAL` error
  • Setting Up Rails Development Environment on Ubuntu GNU/Linux
  • Installing C#/Mono(.NET)/MonoDevelop/XSP in Ubuntu Gutsy Gibbon(7.10)

  • November 3, 2006

    Simple Way to Update Ubuntu Edgy With Slow/No Internet Connection

    Filed under: GNU/Linux — tabrez @ 3:18 pm

    One of the biggest hurdles for the already popular distribution Ubuntu in gaining still more popularity all across the world, is the limited number of applications shipped as part of the distribution media. Where most of the distributions provide users with the option of downloading a number of CD/DVDs(Fedora, SUSE, Debian) at one time, Ubuntu follows the philosophy of keeping things simple by offering only 1 CD/DVD worth of software, that includes one popular application per task(one web browser, one text editor, one media player etc), allowing users to download and install additional applications whenever needed from the Internet repositories. Though I personally like this philosophy very much(which is also one of the reasons why I like GNOME more than KDE), this works well only for those users who either don’t require anything more than the installed default applications or those who have a fast Internet connection to download the necessary additional applications. The users with slow/no Internet connection are left wanting in this kind of setup as it is almost impossible to conveniently add more applications to Ubuntu without decent Internet connectivity. This is the primary reason why many of my friends go for the distributions like Fedora or SUSE, or even Debian, rather than Ubuntu or Gentoo, even if they like the latter distributions more.

    One workaround for this problem is to follow the elaborate procedure described in my earlier post to update and install new applications on Ubuntu without needing a fast Internet connection. With the latest version of Ubuntu - Ubuntu 6.10(Edgy Eft) - though, the procedure has become fairly straight-forward, thanks to a feature added to the Synaptic Package Manager just for solving this problem. You can get the entire idea by just looking at the two new options present in the File menu in Synaptic Package Manager; otherwise, below is an example of how to install an application on Ubuntu by using the Internet connection of a second machine.

    Simple Way to Install Applications in Edgy Without Internet Connection
    1. Start Synaptic Package Manager(SPM). Mark all the applications that you want to install/upgrade in the usual way. For example, go to “Edit -> Search”, enter ‘gnuplot’ in the search field and then press ENTER or click “Search”.
      Search a package in Synaptic Package Manager
      From the list shown, mark ‘gnuplot’ and ‘gnuplot-doc’ pacages for installation. After that, instead of clicking the “Apply” button from the toolbar as you would normally do, go to the File menu and select “Generate Package Download Script” menu option to generate the download script.
      Generate Download Script in Synaptic Package Manager
    2. A dialog box will prompt to save the generated script file. Give it a name like ‘ubuntu.sh’ and click the “Save” button. This script file needs to be carried to a machine which has a fast Internet connection and it needs to be executed there.
      NOTE: It will be convenient if the machine with fast Internet connection runs some flavour of GNU/Linux operating system with wget installed on it. If that is not the case, then one needs to tweak the generated script file(ubuntu.sh in our case) to use whatever command line download manager is available on that machine. The first line may also need to be removed if the script is to be run on a Windows machine. Looking at the contents of the generated script file might give a better idea, as shown below.

      Contents of the Download Script generated by Synaptic Package Manager

    3. Start a shell/command prompt, change to the directory where you want to store the downloaded files and run the script as shown:
      sh# sh ubuntu.sh

      Once the downloads are finished, carry all the downloaded files to the Ubuntu machine and copy them to a new folder(say ‘Downloads’) in the home directory.

    4. Start Synaptic Package Manager again and select the same application(s) that you had selected in Step 1. Select “Add Selected Packages” from the File menu and browse to the folder where you have copied the downloaded files(’Downloads’ folder in our example). Click “Apply” button from the toolbar. The packages will be installed from the local directory without the need to connect to the Internet.
    Additional Notes:
    1. It is always a good practice to first update the Apt cache before marking any packages to be installed/downloaded. This can be done by clicking the “Reload” button in Synaptic Package Manager or by running the command “sudo apt-get update” in a shell. Any way you do it, it requires an Internet connection, how ever slow it might be. If there is absolutely no Internet connection available on the Ubuntu machine(why, oh why, did you chose Ubuntu in the first place ;) ), then you need to keep the cache synchronised with another Ubuntu machine that is frequently updated. See the comment section of my earlier post for more information.
    2. If the machine that has a fast Internet connection is Windows or doesn’t have wget installed, the script file can either be manually edited, or a converted script can be written, to make it work under such an environment. But writing your own script/program to directly generate the download script in required format should be a more productive exercise. A download script similar to what is generated by the Synaptic Package Manager can easily be generated by processing the output of ’sudo apt-get install command.
    3. Lot of discussion is taking place on how to provide options to upgrade Ubuntu systems offline(snapshots at regular intervals can be released as ISO files, for example), the specification for implementing such a feature is going through active debate among the Ubuntu community members, so if you are interested, you can check out the following pages:

      Offline Updater Specification
      Related Wiki

      CDRom Based Upgrade Specification
      Related Wiki


    If you want to receive future posts by email, enter your email address here:

    Related Posts:

  • Update or Install Applications on Debian/Ubuntu Without an Internet Connection
  • ‘wget -c’ Bug in Download Script Generated by Synaptic in Ubuntu 7.10(Feisty Fawn)
  • Update or Install Applications on a Gentoo Machine Without an Internet Connection
  • Ubuntu 6.10 Annoyance: `failed to initialize HAL` error
  • Which is my favourite OS?
  • Connecting To Nokia N800 From a Computer Using VNC
  • GNU/Linux Users vs Rest of the world :)


  • Copyright (c) 2006, 2007 Tabrez Iqbal.
    Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved. A copy of the license is included in the section entitled "GNU Free Documentation License".


    Powered by WordPress
    This website is hosted by Dreamhost