There are always some users unable to install Lunar Linux. Usually I’m telling them “you’re doing something wrong then” – I know, this isn’t very helpful, but on the contrary we’re mainly talking about users using unsupported optimizations. And as long as a user thinks he knows more or better than a developer, a developer won’t be able to help.
However. I thought it might be useful to show new users how to install Lunar Linux. This is an unofficial guide made by me (wdp) and other people might disagree with the way I’m doing that installation: Still my lunar works, yours, too?
I used exactly this guide for two installations, 64bit on an intel notebook, 32bit on an netbook.
Before you even think about installing Lunar Linux you have to make two decisions. The first decision is the most important one:
Do you really want to install Lunar Linux?
Lunar Linux is a very nice distribution once you installed it correctly, because you can do a lot of nice things with it. For example: Unlike other distributions every user can submit updates and improvements for modules (packages). They’re reviewed by some developers and if everything is fine they’re going into our git repositories and thus into the official moonbase. You can write your own modules very easily and all you need to know about is a little bit of bash. A basic module needs just one file.
Still, Lunar Linux is made for experienced or, let’s call em’ advanced Linux users. So if you start with Lunar we assume that you know about Linux, you know about compiling. Your two years Ubuntu experience won’t help you. That’s not because Lunar or Ubuntu is bad or something. Lunar is just not made for the usual user – It’s made for advanced users. If you want to learn about Linux – Try it and don’t give up. If you just want something which works easily without going in-depth into how Linux works – Don’t try it. If you’re too lazy to fix things yourself – Don’t try it.
Personal notice: I started with Lunar Linux ago ca 7-8 years with just a little bit of experience with source-based systems (i.e. after setting up Linux-From-Scratch three times without success) it took me 3 weeks to get Lunar working and I personally think it was the best choice I ever made and it was worth all the work. It’s a bit annoying that I cannot use Lunar Linux on a productive server environment (things might break, the risk is too high) however, locally all my boxes including my netbook and my fileserver, run Lunar.
The next decision you have to take is:
Should I go for 32bit or for 64bit?
Lunar Linux is not multilib. That means you can’t run 32bit applications within your 64bit installation. That means if you need to run things like teamviewer, Skype, wine (? I heard there’s a 64bit module, not sure whether it can run 32bit apps, tho), VirtualBox (at least not in Lunar), firefox-bin (you have to compile it from source) or teamspeak, you should either go for 32bit or you’ll later need a virtual-environment or a 32bit-chroot. A virtual-environment and a 32bit-chroot means handling two systems (your 64bit plus your 32bit system) which might be a lot of work.
On the contrary: Every day more and more applications run in 64bit, the handful of remaining apps will follow soon. Some things NEED 64bit urgently. For example: If you want to play around with zfsonlinux, you’ll need (believe me, even if it should work in 32bit mode, you REALLY want ..) a 64bit system. However: Take your decision wisely.
Stuff you need to do before installing Lunar Linux
Before you can start to install Lunar Linux, you obviously need some media with the ISO. There are a few guides in our wiki how to create something like that. However. As I’m assuming you’re an experienced Linux user I won’t tell you how. Instead I’m linking to some useful guides:
- This is the official guide for Installation of the current Lunar Linux.
- This is a quite old guide for Installation on Software Raid – Maybe I’ll find time to write a more up-to-date one, soon.
- Some old guide about NO-CD installations
- and of course the NO-NETWORK installation
So I assume, you already burned the ISO or placed it onto your USB Stick and we can start to do the installation. Let’s see
Step 1 – The Installer
At the boot-prompt you can see a few options. Just press ENTER as shown in the following graphic:
![]()
Then you can wait or press space, as shown in the following graphic:
![]()
Now you should be within the real installer, as shown here:
![]()
Press Enter and read the “introduction into lunar-linux” or press “One step forward”.
Step 1.1 # Step 2 of 15
You should know “Select a keyboard map”. I have a German keyboard so I’m selecting: de-latin1-nodeadkeys.map.gz. Now “Select a console font” – The default one (already chosen) is fine – So just press Enter again and continue by pressing “Set global language”.
Suggestion: I personally prefer to have an English Linux system. And if you want to get help later it might be useful if you have it English, also. On the contrary you can do: export LANG=en_US before starting an application and you’ll have it English, also. So it really doesn’t matter much what you choose here. I choose en_US.
Now “Select a default editor” – I’m preferring vi. Let’s go on by pressing “One step forward”
Step 1.2 # Step 3 of 15
Partition your disc. If you have absolutely no clue how to partition a Linux-system here’s my suggestion:
100 MB /boot ext4 2-4 GB swap 10-20 GB / ext4 rest /home ext4
Lemme explain why: If you ever plan on re-installing lunar Linux or another Linux system, you just have to replace the 10-20 GB / (root) partition. I.e. you don’t lose your /home data. That’s why keeping /home separated from / is usually a good thing. Having /boot separated from / is just a thing I’m doing since i started with Linux, I just prefer it that way. In the earlier days people said swap should be twice as much as your ram. That means on your 512 MB Ram netbook you’d go with 1 GB swap. On your 2 GB desktop you would go with 4 GB swap. On my 12 GB Desktop I’d go with 24 GB swap – And obviously this is NOT needed. A useful amount of ram is in my humble opinion between 2 and 4 GB. Especially if you just have 512 MB Ram: Because: Nowadays applications use more and more memory, the less you have, the more swap you need. If you want to compile large things like openoffice-src you’ll need a large amount of memory, so going with a 4 GB swap isn’t a bad thing – If you’re lucky it’ll never get used anyway.
Suggestion: A full working Lunar Linux with X11 and Documentation, eats ca. 11 GB. When you’re compiling stuff from Source, depending on the module it’ll need a few GB more. That means: 10 GB is _not_ enough in such cases:
wdp@localhost ~ $ df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext4 23G 11G 12G 48% / /dev/sda5 ext4 185G 1.4G 181G 1% /home
The next Step “Select target partitions” should be clear. As above.
Step 1.3 # The last steps
Now you’re ready to go through the installer alone. Press “install lunar”, don’t configure compiler optimizations yet, install boot-loader, install a pre-compiled kernel, set your root password, setup hostname and networking, no need to administrate services yet; you can do that later using “lservices”, create the SSH server keys, select a timezone and so on. After you’re ready – Reboot.
Step 2 – Your first boot
The first thing to do after you booted up, is configuring your lunar a bit. But first, do the following:
lin moonbase; lin theedge
It will ask you a few questions, which you can answer like this:
- lunaric sound -> no
- makedev -> no
- cvs -> no
- subversion -> no
Step 2.1 – Some words about optimizations
Suggestion: The Safe-Optimizations are there for a reason, not just for fun. Even if you’ve seen some optimizations work fine at a specific distribution those might not work fine at Lunar Linux. For example another dev had a serious issue with his apps and I told him it’s due to the SSE optimizations. He didn’t believe me. A few hours later it turned out that I was correct. All his trouble was caused by SSE optimizations; which worked fine in another distribution. Same to say about CPU optimizations. And same for -Os. -Os for example doesn’t work for glibc. There are known bug reports. To compile glibc successfully you have to use -O2.
Suggestion: If you go for SSE optimizations, don’t use mfpmath=both. Either use mfpmath SSE or 387 or none but never both.
Suggestion: If you want to compile your system with -Os type in lunar optimize and set -Os, then type in lin -cr gcc, then type in lunar optimize and set -O2, then type in lin -cr glibc; then type in lunar optimize and set it to -Os again and compile your other apps. Basically: Just switch to -O2 if you compile glibc. For everything else, let it at -Os.
Warning: Don’t use GCC Optimizations, because a) nobody at Lunar Linux will support installations done with them b) they **can** and **will** break things.
As you can see, there are a lot of possibilities to break your system using optimizations. Also, if you plan on migrating your lunar Linux installation from one box to another (cause you’re using some virtualization or you got a new PC) you want to make sure that you won’t use “native” as CPU optimization. Because if native optimizes the compiles for a amd k8 sse3, your apps might not run on the new box, except the new box has the same, or a newer CPU supporting all optimizations which native used. Once again: Use the safe optimizations except you know what you’re doing.
Step 2.2 – My optimizations
- lunar optimize
- CCACHE
- yes
- GCC 4_4
- default
- Safe (no) you really should set this to YES (which is the default
- bopt (-Os) the safest choice here is -O2
- cpu (core2)
- xtra (mmx, sse, sse3, ssee3)
- spd (none)
- fpm (sse)
- general (deprecated, pipe)
- stack (empty)
- GNU_LD
- strip
- optimize
- reduce might not be safe
- GNU_MAKE
- number of your cpus and or cores (2 here)
- wrappers
- yes
- CCACHE
Step 2.3 – Other options
There are various other options which might be useful for you. Here you can see the options I use:
- lunar
- Option
- download options
- number of retries – 1
- exhaustive mirrors – enable
- admins email
- .. fill in :p
- feature menu
- enable verbose
- enable zlocal_overrides
- download options
- Option
Step 2.4 – Create a clean – core & Update the system
Lunar Linux is source-based which means that it will compile everything instead of using binary-packages (with a few exceptions, for example firefox-bin and openoffice-bin. Binaries are “usually” marked with a “-bin”) – However. To make sure, everything will compile fine, your “core” should be optimized for your environment.
The proper way to do so is (in my humble opinion)
Install gcc and run lunar-optimize afterwards to select the new GCC as default (i.e. GCC_4_5 instead of GCC_4_4) – Also, if you use -Os you have to switch from -Os to -O2 (after you compiled gcc) because glibc wants -O2.
lin -cr gcc -> additional compiler languages? no -> cloog-ppl? no -> libelf? no
lunar optimize -> set new gcc as default, switch from -Os (small) to -O2 (faster)
Now you can install glibc
lin -cr glibc -> glibc -> select locales -> no -> perl -> custom configuration -> no -> perl -> gdbm -> no
If you were using -Os you can switch back to it now.
lunar optimize -> switch from -O2 (faster) to -Os (small)
And now we’ll continue with the core:
lin -cr gcc bash coreutils tar wget -> gcc: additional languages? no -> gcc: cloog-ppl? yes -> gcc: libelf? yes -> coreutils: native language? yes -> tar: pbzip2? yes -> tar: lzip? yes -> wget: openssl? yes -> openssl: ca-certificates? whatever you want -> wget: gettext? yes
Done. Verify that everything works. A broken “gcc” will break your whole system. If everything is fine, you can continue by installing three applications:
lin -cr git subversion theedge
Lunar fetches some packages from git and svn. Let’s make sure we have those apps installed and theedge knows about them:
git: build docs? yes
git: cvsps: yes
git: tk: no
neon: expat: yes
neon: libproxy: no
apr-util: openldap: no
apr-util: mysql: no
apr-util: postgresql: no
apr-util: sqlite: yes
apr-util: db: yes
subversion: cyrus-sasl: no
subversion: swig: no
subversion: sun-jdk: yes
theedge: lunaric-sound: no
theedge: makedev: no
theedge: cvs: yes
theedge: subversion: yes
Now it’s time to update by issuing:
lunar renew
Just to give you an idea how I install my system:
ncurses: profiling libraries: no
ncurses: debug libraries: no
e2fsprogs: enable compression support: yes
e2fsprogs: enable directory hashing: yes
glib-2: build docs: yes
udev: do you want me to wipe...: yes
udev: enable disk edd support: yes
slang: build static library: no
slang: libpng: yes
slang: pcre: yes
slang: onig: no
dbus: invoke messagebus at boot: yes
dbus: install & use libX11: no (not NOW)
bzip2: large file support: yes
links: enable graphics mode: yes
links: with framebuffer: yes
links: libpng: yes
links: svgalib: no (usually broken)
links: directFB: no
links: tiff: yes
tiff: libjpeg-turbo: yes
tiff: zlib: yes
tiff: jbigkit: yes
links: libjpeg-turbo: yes
links: gpm: yes
gpm: invoke at boot: yes
links: openssl: yes
links: bzip2: yes
links: zlib: yes
rsync: invoke rsync via xinetd: no
rsync: use acl: yes
rsync: use attr: yes
iptables: invoke iptables at boot: yes
groff: netpbm: yes
libxml2: Python: yes
Python: gdbm: no
Python: sqlite: yes
sqlite: threadsafe operation: yes
sqlite: secure delete operations: yes
sqlite: loadable extensions: yes
sqlite: unlock notify: yes
sqlite: readline: yes
netpbm: zlib: yes
netpbm: libjpeg-turbo: yes
netpbm: tiff: yes
netpbm: libX11: no (not NOW)
netpbm: svgalib: no (usually broken)
netpbm: libpng: yes
netpbm: jasper: yes
jasper: libjpeg-turbo: yes
jasper: freeglut: no
netpbm: jbigkit: yes
groff: psutils: yes
lcms: libjpeg-turbo: yes
lcms: tiff: yes
lcms: Python: yes
ghostscript: jasper: yes
ghostscript: jbig2dec: yes
ghostscript: freetype2: yes
ghostscript: fontconfig: yes
fontconfig: build docs: yes
ghostscript: libidn: yes
ghostscript: gtk+-2: no (not NOW)
ghostscript: XOrg7: no (not NOW)
ghostscript: ijs: no
ghostscript: cups: no
ghostscript: libpaper: yes
less: large file support: yes
mc: slang: yes
mc: antiword: yes
mc: catdog: yes
catdoc: tk: no
mc: odt2text: yes
mc: gpm: yes
grep: perl regex: yes
grep: large file support: yes
grep: nls: yes
iproute2: db: yes
db: build docs: yes
db: tcl: no
db: sun-jdk: yes
lftp: NLS: yes
lftp: openssl: yes
man: output unicode: yes
rsyslog: invoke at boot: yes
rsyslog: zlib: yes
rsyslog: mysql: no
rsyslog: postgresql: no
rsyslog: libdbi: no
rsyslog: heimdal: no
rsyslog: net-snmp: yes
net-snmp: invoke at boot: yes
net-snmp: enable ipv6: yes
net-snmp: perl: yes
rsyslog: librelp: no
rsyslog: gnutls: no
rsyslog: systemd: no (not NOW)
nfs-utils: invoke at boot: yes
libevent: openssl: yes
linux-2.6: xconfig: no
linux-2.6: menuconfig: yes
linux-2.6: configure linux kernel: no (not NOW)
cronie: invoke crond at boot: yes
cronie: inotify: yes
bash_static: set to default shell of root: no
That was it. Wasn’t much eh? Time for a coffee now. As soon as this is finished, you’ve got a up-to-date base-installation of lunar linux optimized for your environment / according to your optimizations. Verify that your bootloader is okay and reboot to have the new kernel in-use. Right after rebooting make sure your updated system is “clean” by issuing:
“lunar fix”
Suggestion: if you see that your compiles go wrong because of some gcc message like “cannot create executables” your GCC is broken. Thats the first sign of using wrong optimizations. Review your optimizations, try less, and re-compile the core. i.e. ‘lin gcc glibc gcc bash coreutils tar wget’ after doing so, try again to compile the application which failed. I noticed this one at subversion, with an SSE optimized core.
Step 2.5 – Installation of X11
As you might remember, there were a few modules at which I wrote “not NOW”. Now it’s time to pick them:
lin -cr dbus netpbm ghostscript
Step 2.6 – Installation of useful applications
Suggestion: Even if possible, don’t try to install KDE, Gnome, Fluxbox or anything else at this stage. This might work fine, but most people in lunar Linux (especially from a developer-point-of-view) are using xfce4, thus this is well developed. Thus if you install xfce4 first, many of the “needed” dependencies for a working environment are installed automatically. Which might not happen when you install something else. You can still replace your WM afterwards. For now, to get a working x-environment, just go on with xfce4. I’m installing it this way:
lin -cr XOrg7 xfce4-session xfce4
Step 3 – Finished
That was it. Now start lin’ing everything you need. For example mplayer, minitube, bluefish, firefox, pidgin. Or take a look at Step 4. Maybe there’s an interesting Modification for your personal Lunar Linux.
Some general Tips
gobject-introspection: Either always say yes or always say no. Don’t mix them. Because if you do, you’ll end up with a broken environment.
babl: If you try to install babl, and it doesn’t work because of some weird error that it couldn’t find babl.pc (some gobject-introspection stuff) do: lrm gobject-introspection && lin babl && lin gobject-introspection && lin babl That should solve your issue.