Lunar Linux:FAQ

From Lunar Linux
Revision as of 23:54, 17 August 2005 by Sofar (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?



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
    • Fast (-01) but most people will opt in for Faster, or Fastest (Note that fastest doesn't work on all systems, i.e. k6).
  • 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 I586.
  • 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.

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


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.

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.

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

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 Rock Hopper 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 Rock Hopper Penguin pictures!

Personal tools
Wiki Navigation
Project Sites