Ask Klaus!

Kernel Headers

Question:

First may I say that I admire all the work you have done on Knoppix. It is an excellent offering and I use it all the time. However I want to run it in VMware/VirtualBox on occasion and the kernel-headers are never available (to run guest additions etc.). I do an update and look for them but can never find the ones that match, just every other one going back to the abacus! Are they hidden somewhere, or does this task require a special procedure?

Answer:

Your question is a good starting point for a general look into source availability for open source components. But first I'll answer your Knoppix-related question: Knoppix uses a plain kernel.org kernel, aufs patches for overlays aside, so you should be able to get the kernel source, same version as your kernel, from kernel.org and copy your /boot/config-* to .config in the unpacked kernel source directory in order to get the same configuration. Then you can compile additional modules with that kernel source. The DVD version of Knoppix already contains the kernel source under /usr/src/linux, which saves you some work.

In general, for all software released under the GPL, such as the Linux kernel, the GPL gives you the right to acquire the sources directly from wherever or whomever you received the binary software, regardless of source availability anywhere else on the Internet. Knoppix uses the GPL paragraph 3(b) possibility of providing the source on request directly from the main distributor, which saves a lot of Internet traffic for additional source CDs and duplicate code. On the other hand, it's very easy (and probably faster than postal service) to download the corresponding sources of every package, in all versions, directly from the programs' authors or the software packagers' websites; Debian offers a snapshot archive, http://snapshots.debian.net/, that provides a searchable database of packages and sources starting from 2005, which covers most software installed in Knoppix, except for some scripts that are already present in source form.

Start Time

Question:

To Klaus, I presently have a laptop with an Intel CPU that came with XP. I have dual booted (using Grub, mostly) my computers with Linux since about 2000. It seems like there have been many improvements in software in the last 10 years, but I am still waiting two to three minutes to the login screen and another minute to start an application. I am the only person that uses my computers (do not have multi-users). I power up to use and power down when I am finished. My computer configuration (hardware and software) rarely ever changes, yet I wait for the same system checks to complete every time.

My question: Is there a reason that the start time has to stay so long? It seems that my bootloader could be where I not only select my OS but also the user. The user's configuration at last power-off could be saved to a secure place on the disk and used at next power-on for a streamlined start. A full computer startup could be selected if needed or used as default for those who like to wait. Will this wait be unchanged 10 years from now?

Answer:

The traditional way to start a Unix system is by starting different system/disk checks and services one after the other. This way, it is very easy to identify and repair problems in the start procedure. Recently, Linux distros have started to parallelize some of the startup procedures, but it is not easy because there are so many different setups and hardware configurations that could require a specific sequence of prerequisite tasks to complete.

With known hardware and some optimization, you can start the desktop within about 20 to 30 seconds from the moment the kernel loads, but doing so requires a lot of in-depth knowledge of the boot procedure and the services that have to run.

Things that are easy for optimization: Identify services that you definitely don't need, such as (1) running your own mail server in an environment where you just receive and send mail via a providers' servers, (2) running NIS and other authentication services that you don't need, (3) starting database servers, while never really using them, or (4) starting web, FTP, NFS, Samba, and other servers that you don't need.

Some boot performance can be gained by optimizing the sequence of services as well – for example, starting the desktop at a very early stage, before the print server and network set up. Basically, this is what other operating systems do to make booting look fast, by starting the non-interactive stuff in the background while the visible stuff is already up. Traditionally, the graphical environment comes last in the GNU/Linux boot procedure; in fact, it can be started much earlier in the boot sequence once the basic hardware initialization and a set of network and internal services are done.

Another possibility would be configuring suspend-to-disk just to do the real boot procedure once and then saving the working session for later use. Usually this takes only about 10 to 20 seconds. But when hibernating, the hard disk content of mounted partitions and the general hardware configuration must not be changed before resuming from hibernate; otherwise, you will end up with a non-booting system or even lost data. This is the same problem with all operating systems that support suspend-to-disk – Linux is no exception.

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Ask Klaus!

    Klaus Knopper answers your Linux questions.

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of the LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of LinuxTag expo. He currently works as a programmer, teacher, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of the LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News