Customize Linux from the Bottom—Building Your Own Linux Base System

 in
Can't find a system that has everything you want? Build your own.
Problem Solving

One of the advantages of using Linux is that there are many documents and tools to help you customize your system and solve problems. The code is no secret. Everything inside and outside is open. Besides, there are many other useful sources in print and on the Web. There is no other system which can compare to Linux in this respect, not even Free BSD, let alone any proprietary operating systems.

Typically, for a problem, we might work out a few different solutions. We always want to pick the best one, of course, but it is not easy to know which is the best until we have tried each of them. To solve a problem, in many cases, we can find answers by consulting Linux HOWTOS and docs, or asking Linux guys in our organization. As an alternative, you can post a message on a Linux newsgroup and hope someone on there can give you a quick reply. If you want to pay, there are many Linux-related companies providing technical services as well. (If the problem is stubborn, as the last straw, kick your buggy box a few times, as I did sometimes. You must be careful—don't break it and then reboot. That should work; otherwise repeat the problem-solving sequence from the beginning again.)

gdb is an excellent debugging support for applications on the base system. If we don't want or are unable to run a full gdb on the target system, that is, the base system, we can run small remote gdb facilities as either a gdb stub or a gdb server on the target. Besides, things like the syslogd dæmon can also help debugging on the target system.

There are many good problem-solving strategies. Whatever approaches we use, the goal is to find the proper solution. It is usually safe to follow a successful example. For example, we learn something by checking things inside a Red Hat rescue system. We can do this simply with the following few commands:

cat rescue.img | gzip -d > rescue_root.img
mkdir rescue_root
mount -o loop rescue_root.img rescue_root

Here rescue.img is the compressed rescue floppy image found in the Red Hat distribution's images directory. Then we can check its contents by:

ls rescue_root
It displays:
bin dev etc lib lost+found mnt proc sbin tmp usr
You get all the detail in the floppy.

Conclusion

This article is only an introduction to customization of the Linux base system. For a particular situation, it could be rather complex, especially when modifications at the code level are required, such as to support specialized hardware. But, we have shown that it is a manageable task. Our purpose is to make things simple in order to encourage people to take the challenge. By creating our own customized base system with a moderate effort, we get a power engine which can drive us into the bright future.

Resources

He Zhu (hezhu@yahoo.com) is interested in system software and networking. He is currently working for Bell Labs, New Jersey.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Customization

Sudhakarraj T's picture

Sir,

My requirement is, my application shoud start in the Linux GUI before my Linux Desktop gets loaded. If i close my application then I can view my Linux desktop. To achieve this what configuration i neeed to make changes
Please suggest me

How to build a Linux Kernel Image for Pocket PC?

Mohit Vohra's picture

Respected Sir

I am a M.E. student in Software Systems in BITS, Pilani, India. I am currently working on some experiments on Pocket PCs and tablet PCs and Pocket PC phones in the context of Pervasive Computing.

I have gone through your introductory article that encourages others to try and compress basic features of linux in as small devices as floppies. Though the article was helpful in a way that it pinpointed the basic steps required to make an image of linux, it still didn't clearly some of my doubts which are as follows:

1. what basic loadable modules will I need to include with which I can provide basic linux features on a pocket pc.
2. whether its possible for one to load multiple operating systems externally by say, a compact flash card for example onto that Pocket PC? If yes then how to do it?
3. And last but not the least, when you mentioned that you can create a rescue disk for your own distribution of linux, can that image be used on even a small device such as a pocket pc that has support for some RAM and some secondary storage (around 32 to 64 MB ram and 32 to 64 MB secondary storage for instance)?

The reason for these questions is that as part of my experiment I am trying to build a Linux kernel image for a Pocket PC and I want to load it externally, so that when I boot Pocket PC, it gives a choice between Windows Mobile and Linux image.

I would be grateful if you could help me in clearing the doubts that I mentioned as that will be a big step towards my eventual implementation of a Linux Kernel image on a Pocket PC.

Thank you.

Sincerely Yours,
Mohit Vohra
M.E. Software Systems Student,
Birla Institute of Technology & Science (BITS),
Pilani, INDIA

help

Anonymous's picture

hi , can you help me I want to customize linux kernel and want give me some books or support to do that

Linux customization

Ratnesh jha's picture

Dear Mohit ,
I have gone through ur mail ,where u r enquiring for the linux customization for small palm mobile .I am also need of same kind of application please provide me the full detail about how to customize and
necessary steps for the implementation .
I will be highly oblise for the kind help.

Thanks
Ratnesh Jha

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix