Archive for the ‘Information Technology’ Category

GNU/Linux Debian Issues - Solution/Resolved

Tuesday, February 26th, 2008

Purpose:
I have been a fan of Debian Linux operating system since last 3 years. The purpose of this post is to continuously list issues that I was able to resolve either by asking the Open Source community or by researching on the Internet or just by playing around with the problem. I hope that this post will help many people to solve similar/same issues and thus will save their valuable time.

Issue #1 - Splashy not working; Splashy Error Messages during boot
Date: 02/25/2008

Package: Splashy (Version 0.3.8-1)

OS version: Debian GNU/Linux 4.0 (codename etch)

Kernel: 2.6.24 (Debian Source)

Error Messages:
Splashy Error: Connection refused
Splashy ERROR: Couldn’t splashy_start_splashy(). Error -2
Splashy ERROR: Couldn’t splashy_start_splashy(). Error -3
Splashy ERROR: Couldn’t splashy_start_splashy(). Error -7
Cannot create /dev/fb0 or No such device

Also see this posting in which I posted my query to the splashy mailing list.

Resolution:
Rename /etc/rcS.d/S03udev to /etc/rcS.d/S03audev.

Command to be given:

debian# mv /etc/rcS.d/S03udev /etc/rcS.d/S03audev.

You can test whether splashy is working properly or not by giving the following command:

debian# splashy test

The above solution was suggested by Mike Kelland who happens to be on the same splashy mailing list as I am.

Also some of you might be wondering how to install splashy on Debian stable (Etch) since Splashy is only available in Lenny and Sid repository as of this writing. Please see my post on how to install splashy on Debian Stable.

Update:

Ok, you must be wondering why this issue occurs in the first place, right? Why don’t the developers fix this issue?

Here is mystery:
The way splashy is supposed to work is that it should start from initramfs (which superseded initrd) in the 2.6 kernel series. What is the difference between initrd and initramfs? I think that deserves a separate post/entry (may be for some later time, eh?). Any how, if you use initramfs to boot your kernel then you should not get any error messages. Debian system by default likes to use am initramfs during boot, but many people do not prefer to use an initramfs during the boot and thus built all the support for IDE controller and Filesystems into the Kernel itself (instead of modules), just like the way I like it. This is how you make your boot process free from using initramfs.

So in short if you don’t see an “initrd” entry into your /boot/grub/menu.lst, for example:

title Debian GNU/Linux, kernel 2.6.18-4-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/hda1 ro

instead of

title Debian GNU/Linux, kernel 2.6.18-4-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.18-4-686

it means that you are not using initramfs and you should follow the tip mentioned in the resolution section above.

Note: It is important to know that while the menu.lst file still says “initrd”, it actually means “initramfs”. For some reasons it is still being called by this name even when they switched to newer much improved “initramfs” in 2.6 Kernel. This thing kept me confused for a long time until someone just mentioned in one of my query.

In conclusion, if you don’t use initramfs/initrd during your boot process, then udev and splashy interferes with each other and you have to make sure that splashy is being called after udev script in the /etc/rcS.d directory. The only disadvantage is that you might end up seeing some text messages before splashy actually loads itself.

Also, I had a discussion with one of the splashy developer/maintainer regarding this issue which might give you further insight.

Issue #2 - Ethernet card does no get IP address

Coming soon…

As usual, please leave a comment/feedback.

Open Source Licensing Issues - GPL, LGPL?

Wednesday, February 20th, 2008

Recently I have been researching into Open Source licensing issues. Before I began to research I had very little idea about true meaning of Open Source although I have been using Linux (a open source OS) for more than 4 years!

You must be wondering why should you read this? Based on my experience there are plenty of resources which are available on Internet which will talk about these issues but none of them start from a basic level i.e. from a level where even a novice IT person can also understand what’s going on.

Coming from an engineering background, I like to start with very basic and then build upon the topic to make sure that I understand most of the details - minor/major.

Assumptions

  1. I will use the words “program” and “software” interchangeably.
  2. When I refer to an Open Source Operating System (O.S.), I generally mean a Linux OS.

What do you mean by Open Source?
Actually many people think that Open Source only means that the source code should be open i.e. available to everyone. But guess what? They are wrong. This is not the entire correct definition of Open Source. There are several other criteria which should be satisfied before we can call something as Open Source software.

Does Open Source mean that I have to use GPL license?
Noways. Once you know that your program is an Open Source, you need to decide a suitable license for it based on your strategy (if you are a company), usage and libraries (If any) that you have used to write your program. GPL is just one of the several type of Open Source licenses, although it is one of the most popular licenses in the Open Source community.

Can I sell my open source program?
Yes. There is no restriction on how much you can charge for your Open Source program that you have developed. So for example, suppose you decide to choose a GPL license for your Open Source program and you want to sell it; According to GPL license terms you can sell it although there is one exception (related to source code) to it which I think is pretty obvious now. The definition of free software (=Open Source Software) includes the right to sell your copies of program.

Do I have to release the source code when I sell my program (Open Source or Closed/Proprietary)?
Actually this can be a bit confusing, so I will again start from a very basic level.

Typically if you don’t want to release the source code to the public then your program is not technically a Open Source program. In this case it is a closed/proprietary software as long as it is not “derived” from other’s program. We will get into the issue of what is deemed as “derived”, later on as it there is no proper consensus regarding this.

So for example, if you are using a Debian or Ubuntu Linux OS and you decide to write a simple program (test.c) in C language using an editor like vi or emacs and you compile it using the GCC compiler, then your resulting binary/program (test) can be called Proprietary Software and you can sell it to public without releasing the source code as long as the following conditions are met:

1. Your program does not incorporates directly any part of the GPL licensed software/library.

2. Your program is not derived from any GPL licensed based software/library.

However, at this point of time you can decide to make your software Open Source by adopting any Open Source license like for example, GPL. Suppose you decide to choose GPL license for your test.c program. Now you can still sell your binary for a fee/charge but at the same time you have to release the source code also along with the binary file. That’s why it is called Open Source.

Moreover, one should keep in mind that sometime the choice of license is not entirely based on us. For example, suppose you heavily use the code of a GPL licensed library in your test.c program. Then by default this program (test.c) will be considered as derived software and you will have to use GPL license for your program and acknowledge that you have used the code from so-and-so library a.ka. the “viral effect” of GPL. You can still sell this software (test.c) but now you are obligated to release the source code along with the binary if you decide to distribute it to the public under the GPL license.

Now you may ask, what if I don’t intend to redistribute it and just keep it to myself or to my organization. Do I still have to release the source code since I used a lot of code from a GPL based library?
No at all In this case, you are not obligated to release the source code and you decide to do anything with your software (test.c) internally.

It is unclear to me what constitutes as a derived software? It is confusing. Is there any other better solution?
Unfortunately there is no universal agreement as to what can be called as derived software. But fortunately there is a better solution that will keep you away from violating any kind of license agreement - use a LGPL licensed library which is also known as Lesser-GPL which is more like a permissive/proprietary license. Before we understand the main difference between LGPL and GPL it is necessary to understand what is considered as being “derived”.

Some people in the community believe that if your program dynamically links to a software library then your program cannot be called as “derived” software. But if you statically link the software library to your program then it is called a “derived” software and hence you cannot claim entirely as your own software. However for libraries that are based on GPL license some people consider even dynamically linking to your program (test.c) as also a “derived” software.

The solution - LGPL
So to stay away from these ambiguity, there are numerous libraries that are now released under Lesser-GPL (LGPL) license. Meaning that you can link to those library (statically or dynamically) to your program (test.c) and you can still choose to keep your code proprietary (closed-source program). Although you will be required to release any changes that you might end-up making to the LGPL library code in your test.c program.

For example, the GNU C library is released under LGPL and that’s why it is so popular and widespread. In fact most of the open-source software libraries are released under LGPL license. However there are reasons for which one would like to release a library under GPL rather than LGPL

Therefore it is very important that you decide the type of licensed (say for example GPL or LGPL) library that you would want to use in your program depending upon your strategy.

How can I make money if I release my program under GPL license (with source code)? Isn’t that a paradox?
You know what I also exactly use to think the same and that was one of the main reason why I wanted to do some research on all this. In fact there are real life examples where people have been making money even after releasing their software under GPL license for over 10 years.

I think one of the main reason behind this is the simple economic/business principle of opportunity cost of time. For example, even If I release a software for my customer under GPL, they would still come to me for making some changes/customization to that piece of software even if they have source code for it. Of course the customer could do it by himself/herself or may hire a programmer but there will be a lot of over head cost associated in doing that like for example, getting to know the piece of software, familiarizing with the libraries, etc. Somebody has to do the work (making changes/customizations) so why not the original person/company who made it.

I think this blog entry has already been a long one, so I would like to end it here. In future if do some more research on this or if I get more information on it, I will post it into a new blog entry.

Please leave a comment if you have questions or suggestions.

Thanks for staying this long!