Lunar Linux:FAQ

From Lunar Linux
Revision as of 13:08, 30 July 2011 by Engelsman (Talk | contribs)
Jump to: navigation, search

These are the Frequently Asked Questions for Lunar Linux. You have a question about Lunar? You might get your answer below.



What is Lunar Linux?

What exactly is Lunar Linux?


Can I run Lunar Linux in 64-bit mode?

Can I run Lunar Linux on my new 64-bit system?


Yes you can. You can run Lunar Linux in either 64-bit or 32-bit mode, but there is no multi-lib mode. Be aware that some applications are still only available for 32-bit mode!

Where can I find how to ...?

Where can I find how to customize the kernel under Lunar Linux? Or the desktop...


The Lunar Wiki only offers details specific to Lunar Linux. Many other resources already exist for general Linux problem solving. For example, information on how to customize the Linux kernel can be found at:


How do I set optimizations?

How do I set these optimizations for my machine?


Run lunar optimize. You'll be taken through an interactive menu that explains all the options. Remember to optimize safely.

What are safe optimizations?

What are the recomended safe optimizations for Lunar Linux?


The default sure fire optimizations that are recommended are:

  • C
    • -pipe
  • C++
    • -pipe
  • CPU Architecture
    • You should pick the correct architecture for your own system (defaults to x86 for most people).
  • Basic Optimzations
    • Faster (-O2, the default).
  • CPU
    • This, of course, should be set to your own cpu, or the cpu of the machine you plan to run this install on. If you want to be able to run this install on many machines, you should be safe with I686.
  • Speed Optimizations
    • If you want to be 100% sure that there won't be optimization problems you shouldn't select any of these.
  • Extra features
    • It is not recommended to use any of these optimizations, even for modules known to be able to handle them, since they cause many apps to break.
  • Floating Point Math
    • None. If your architecture is x86 and you don't own a 386SX and 486SX, it's safe to select x387.
  • Linker Options
    • Strip.
  • Addon Program Support
    • CCache. Make sure to install it first.

These settings should work for almost everyone, and there is a lot room for pushing these optimizations more, at the risk of problems with some applications. Read info gcc and make sure you understand a given optimization before you enable it.

What optimizations may cause problems?

What optimizations are known to cause problems in some setups?


Some optimizations that are known to cause problems on x86 with many applications, and even a entire system:

  • -funroll-loops
  • -fstrict-aliasing
  • -ffast-math
  • -ffloat-store

These are sorted from the least unstable to most unstable. Read info gcc and make sure you understand a given optimization before you enable it.

What optimizations can give some speed without issues?

What optimizations can I use to gain some speed but without major risks?


Start with the basic optimizations in FAQ #2.2 and change the Basic Optimizations to Faster or Fastest if you know that gcc will generate correct code for that cpu. -O2 obviously takes more compile time than -O1, and -O3 takes the most time to compile. Then select the cpu you will run it on. Some of the speed optimizations that should be decent and shouldn't cause too many problems, if any, are: -fomit-frame-pointer. A safe bet for floating point math on a x86 would be x387, if you know your cpu has a floating point unit. Check cat /proc/cpuinfo to see if your cpu supports SSE or SSE2. If your cpu does have sse or sse2 then you can also add that to the math optimizations.

Your results may vary. Read info gcc and make sure you understand a given optimization before you enable it.

What optimizations should I avoid?

What optimizations should I stay away from?


All the ones listed in the FAQ #2.3 plus:

  • -fprofile-arcs
  • -fbranching-probabilities

Please read info gcc and make sure you understand a given optimization before you enable it. The Lunar developers will not respond to bug reports of broken compiles by users with risky optimizations.

Installing modules

Can I compile several modules at once?

Is it possible to install multiple modules at the same time without breaking things?


Yes, Lunar even promotes it. However doing so will cause installs compile slower of course. Lunar will not install core system modules like gcc and glibc while something else is installing and will wait until the rest is finished. Also, you cannot install applications while those major modules are installing, they will wait their turn until it's safe and continue to install them automatically.

error : download failed - broken URL

I tried to install a module, but the download failed due to a broken URL. What do I do now?


There are three possible reasons why the download failed:

  1. You are trying to download from one of a set of mirror sites, and the mirror you are using is either busy or incomplete.
    • Run "lunar" as root, select Options / Software Mirrors, and change the mirror to something closer to you.
    • Note: there seems to be a consistent problem with the SFORGE mirror:
  2. You are trying to download from a particular site, but the location of the file has changed [or the site is temporarily off-line].
    • Browse the module's website (see "lvu website") [or search the web for the tarball],
    • Download it manually, copy it to /var/spool/lunar, and try to run "lin" again,
    • Run "lvu edit" to create a zlocal copy, and edit that copy with the new location [or secondary URL]
  3. You are trying to download a version that has been removed because a newer version exists.
    • Browse the module's website to discover the new version number,
    • Run "lvu edit" to create a zlocal copy, and edit that copy with the new location, version number, sha1sum, etc.
    • Note: you could first try to run "lin -w newVersion" and hope that it builds without problems.

If you do create your own zlocal copy, please consider submitting it using "lvu submit". (See Module Submission)

error : C compiler cannot create executables

What does this error mean and how can I fix it?

  • C compiler cannot create executables


Read the next topic - this is basically the same problem: There are kernel headers missing that are vital to compilation. You will have to restore them. Below is explained how to do that.

configure: error: C preprocessor "/lib/cpp" fails sanity check

What does this error mean and how can I fix it?

  • configure: error: C preprocessor "/lib/cpp" fails sanity check


This is an include file problem. Sometimes /usr/include/gnu/stubs.h is missing, this can be found in the glibc source tarball. Most of the time the following applies:

Your kernel headers are missing from /usr/include. This means the C PreProcessor cannot verify that it has the proper cached copies of those vital header files. You need to install the proper ones manually. Here's how:

lin kernel-headers-2.4

This might work for you! (Use the 2.6 version if needed of course)


mkdir -p /usr/include/{linux,asm}

to create the two target dirs, if needed. Then execute:

cp -av /usr/src/linux/include/linux /usr/include/
cp -av /usr/src/linux/include/asm/* /usr/include/asm/

to copy the files manually. Be warned that the second command has to be done this way since /usr/src/linux/include/asm is a softlink to your arch asm header files, asm points to asm-i386, on x86 machines. So if, on the other hand, you had copied

cp -av /usr/src/linux/include/asm /usr/include/

you would then get a softlink to nowhere under /usr/include/.

Last, you can always try to unpack the kernel tarball you have into /usr/src/linux and manaully link or copy the headers over yourself.

Can I add more window managers to gdm?

How do I add other window managers to the sessions list on gdm?


Copy the desktop startup files to /etc/X11/dm/Sessions/. That works with gdm. For kdm you will have to copy them to $KDE_PREFIX/share/apps/kdm/sessions.

How do I get Flash to work in Mozilla or Firefox?

How do I get Flash to work in Mozilla or Firefox?


If you are using Mozilla or Firefox, then you can simply do a lin flash-plugin and that will download and install the Macromedia Flash plugin that works with a gtk+ based mozilla through the old abi wrappers.

The flash plugin does not work with Galeon. The Galeon developers have declined to provide the "old" abi wrappers needed for the plugin to work.

How do I install Java?

How do I get Java for my Lunar box?


You will have to download the Java source code from Sun yourself and you have to "click" to agree on their license. You have to compile it yourself too. We don't have a Sun Java module as we currently have no way to automate the "click" to agree to the Sun Java license. See this URL for some handy info:

There is a j2sdk module in moonbase which is the Blackdown port of Sun's Java Virtual Machine.

Removing modules

How do I remove a module?

How do I remove a module?


If you have just installed a module for the first time using lin then it is usually safe to remove it using lrm.

However, if you have built or rebuilt other modules that depend on it, you will need to be careful. Use lvu eert to identify these modules, and then remove them too, or rebuild them using lin -rc to change the optional dependency. You should run lunar nofix to make sure that some hidden dependency has not been affected.

You can also use lrm -p to purge all modules that depend on it, but this is not recommended in general because it is easy to break your system.

How do I safely remove an optional module?

How do I safely remove an optional module, especially one that is now deprecated or obsolete but lots of other modules use it?


There are three ways, ranging from 'time-consuming but safe' to 'possibly quick but dangerous'.

1. You can use the lvu eert approach described above.

2a. You can use lsh to access the the lunar internal functions to find the other modules that have a known dependency on theModule and rebuild them. If you lrm theModule first, the rebuilds and lunar fix can not silently reuse the module again.

for i in `lsh list_installed_depending theModule` ; do  lin -cr "$i" ; done
lunar fixdepends
lunar fix

2b. If you want to rebuild the modules in dependency order, you will need to do a bit more work.

for i in `lsh list_installed_depending theModule`
 VAR=$(echo "$MODULES" | grep "$i")
 if [ -z "$VAR" ]
lin -cr "$MODULES"
lunar fixdepends
lunar fix

3. Run lrm theModule. Use lunar nofix to identify problems. Run lin -cr for each problem. Rinse and repeat.

Lunar core tools

How can I recompile my module with new options?

How do I force lunar to recompile my modules with different options?



lin -r MODULE

The -r switch will allow you to select new configuration and dependencies for modules.

How can I make modules recompile instead of resurrecting?

How do I tell lunar to recompile my application instead of resurrecting it?


Try doing:

lin -c MODULE

The -c option means tells lin to compile this module even if there is an install cache copy available in /var/cache/lunar.

How can I tell lunar that module X no longer depends on module Y?

Module X no longer depends on module Y, but lunar insists on reinstalling module Y too. How can I get tell lunar to remove that dependency?


Lunar adds a module's dependencies to a cache when you install it. You can't remove a dependency automatically, but you can rebuild the dependency cache to reflect the current dependencies of the modules that are now installed.

lsh create_module_index
lsh create_depends_cache
lunar fixdepends

Note: Dependencies of modules in zlocal are ignored. If module X in the main moonbase depends on module Y then the dependency cache will still contain that dependency.

My moonbase is gone and I can't install anything.

How do I fix problems with my moonbase when it's missing or damaged?


Simple solution to this is just running:

lin moonbase

This will download the latest moonbase from the internet, and restore it to working order.

What is a module?

What is a module and what does it do??


A module is a set of files that tell the core tools the following:

  • What name, version, and other properties a package has
  • Where to download all needed source files
  • What other modules are required, or conflict with this one
  • How to unpack the source files, how to patch
  • How to configure the code
  • How to compile
  • How to install everything
  • What else to do with it

The module is coded in a set of files in a directory structure, and scripted in bash.

What is the Moonbase?

What is that thing you call Moonbase?


The Moonbase is a database with modules. In this database there are description of packages that tell the core tools where to download, how to compile, and how install a module. You can consider this the lunar equivalent of portage, grimoire, ports, etc.

What is theedge?

What is theedge?


theedge is the same as lunar, and also known as the core code. Theedge is just another version of lunar. These two pieces of code install your packages, but they do not contain package descriptions. Those are defined in moonbase.

Theedge is a development version of lunar. Often there are much more features in theedge, and bugs are fixed quicker as well. However, if you do not like all this tweaking on your system, we advice you to use the stable lunar core tools instead on your system.

You can install theedge by issuing:

lin theedge

Theedge is automatically updated if you do a lunar renew or lunar update.

Lunar-Linux Installation

My usb keyboard is not recognized

At the boot prompt type linux uhci-hcd ehci-hcd to make sure those modules are loaded during startup. Those will then enable your usb keyboard.

So how should I partition my disk?

I'm setting up lunar from scratch, but how should I partition my disk for a server or desktop system?


Server systems have very different demands than desktops. It's all about flexibility. First desktops:

desktops commonly have one hard disk. You don't want to reformat or repartition often, so you just want to be done with it at once. The easiest is just to setup 2 (two) partitions: one root filesystem big enough for all lunar software, and the rest for /home. Typically, lunar occupies between 4 and 12 gb based on how many applications you install. If you clean up often you can manage with 8gb, but you should keep some extra space. I certainly advise to use a swapfile instead of a swap partition: you can always later delete the swap, or move the swapfile to another disk or partition. A swap partition is harder to relocate.

Servers have different needs. First of all /home doesn't need to be that large, but you will want to setup space for logfiles that cannot cause problems if they grow too fast. Putting /var/tmp and /var/log on separate partitions is quite normal. /tmp can be abused similarly, and is mostly run in tmpfs to avoid cluttering and give fast access times. Then /usr will be separate and the usual separate rootfs. As you can see this list is already getting quite big! Most users will actually want to make the rootfs quite small (as small as 200mb sometimes!) and thus /home also needs to be on a separate partition.

Kernel features, built-in or module?

When I compile a kernel, should I compile drivers that I need in the kernel image or as module?


There are many schools of thought on kernel compiling. One is to build everything into the main kernel without modules. The other one takes building modules to the extreme. Here is a suggestion, if it's not needed to boot it's a module. Thus usb, input, sound, mice ACPI, network, and also cdrom, floppy, and all the non boot file systems, all get built as modules. This reduces the size of the main kernel so it can be put on a floppy. Another thing to consider is that not everything works perfectly, and some features can cause your kernel to misbehave, so if some feature is built-in, the bad behavior is practically inevitible. Instead, with a module you can choose not to load it and thus be left with a working system.

Please note that some people need to make some features built into their kernel and vice versa, do whatever works best for you.

QEMU and Lunar ISO testing

How do I use qemu to try out lunar ISO's?


Just a quick note on how to use qemu for testing a Lunar Linux installation. See /var/lib/lunar/moonbase/devel/qemu/DETAILS for a description of qemu. Think of it as a low-cost (read: free) version of a virtual machine, that has quite a few useful features and is under active development.

A very simple way to just test a Lunar ISO for booting purposes is:

qemu -cdrom lunar-1.5.0-i686.iso -boot d

If you want to test a full install, then create a 512 megabyte sparse root_fs image with this dd command:

dd if=/dev/zero of=hda.img bs=$((1024 * 1024)) count=0 seek=512

Now invoke qemu:

qemu -cdrom lunar-1.5.0-i686.iso -boot d -hda hda.img

You can then proceed to test your Lunar install. Refer the qemu homepage for further tips and tricks. qemu can also be quite easily used to test if your brand new kernel is bootable or not, which is quite neat.

Note that you should say yes to using SDL as an optional_depends. The gui version of qemu is very nice in its own little X11 window.


How do I unpack an .RPM file in lunar?

How do I install RPM files in lunar? Is that possible?


The easiest way to unpack a rpm file is to use the module called rpmunpack. Simply run rpmupack XYZ.rpm for your RPM. This will create a cpio file (XYZ.cpio.gz and XYZ.cpio.bz2 are not uncommon). Once you perform any additional uncompression with gunzip or bunzip2, you can then extract it using cpio -i -d < XYZ.cpio -- After all that you should be all done. If you are trying to rpmunpack a source RPM (i.e. .src.rpm) file then XYZ.cpio may further contain a tar.bz2 or tar.gz source tarball.

In the zbeta section of moonbase, there is an unsupported module called rpm for those of you that are really desperate.

You might want to do man cpio, to check out additional cpio parameters that may interest you, such as the -L switch.

What is that in the Lunar-Linux logo?

What is that logo of yours? It looks like a [cat|ferret|dog|owl|insert nutty animal here]!


The logo is a Rockhopper Penguin. It's a kind of nasty penguin, the one that crowd up in thousands to take over the continent. They have a few long feathers sticking out at their "ears" sideway, just like some owl species do.

You can check out Google Images for lots of Rockhopper Penguin pictures!

The current logo has been designed by Michael Schindler in 2003 and appeared as the official logo of the Lunar Linux project in 2004.

Personal tools
Wiki Navigation
Project Sites