General Linux Information

Last change 25/04/2014

Here you can find some general Linux related information, like how to compile a new kernel and perl information.

Perl modules


It happens from time to time - you install a new script and perl modules are missing (and you do not even have much of an idea what perl is - but since the screipt needs it you need it). Installing perl modules is easy enough. Most (if not almost all) Linux System come with perl - it's a scripting language. Perl uses modules that capsulate useful functionality and is REALLY powerful - especially when it comes to automation (my search/replace scriptlet uses perl ). So how do I install new modules:
as root type in:
perl -MCPAN -e shell
If done for the first time you will be asked if you want to update - do it :) After that you are in the perl console and can install modules by typing:
install module
perl -MCPAN -e shell
thats it.... normally the scripts with the missing modules tell you what you need - so just type in what they want and in 99% you are ready to go!


perl -MCPAN -e shell

How do I install a kernel? (2.6.x)

Step By Step:

  1. Download a current kernel (i.e. 2.6.8) from
  2. Move the kernel (linux-2.6.x.tar.bz2) to /usr/src
  3. to extract ther kernel run: tar -xjf linux-2.6.x.tar.bz2
  4. go to the newly created dir: cd linux-2.6.x
  5. configure the kernel: make xconfig (if you are under X - remember not to be in a su-shell or it won't work) ormake menuconfig
  6. when configuring on a zd7000 you can use my kernel config from the zd7000 sections
  7. Close the configuration gui and type make
  8. If no fatal error occured type make modules_install
  9. copy the from the current directory to /boot/
  10. copy the bzImage from arch/i386/boot to /boot/vmlinuz-2.6.x
  11. Modify your grub conf to read the new vmlinuz-2.6.x kernel
  12. Reboot and see what happens!

cd /usr/src
tar -xjf linux-2.6.x.tar.bz2
cd linux 2.6.x
make xconfig (or make menuconfig)
make modules_install
# either:
make install
# or
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.x
cp /boot/
vi /boot/grub/menu.lst

Emergency Shutdown

Linux has one HUGE advantage - it almost never crashes - except maybe when fiddling with the hardware :) - but it sometimes happened to me, that X made the video card sync out, so I couldnt see anything any more, and on my laptop I don't have ssh enabled, so I cant login remotely to reboot.
Some tricks still help you:
Pressing Ctrl-Alt-Backspace kills X (kinda like ctr-alt-del under window)... this helps from time to time when you think your desktop froze, obviously you will loose unsave data, but you can get back to work almost immediatly.
Sometime you are not in X, but still things seem to hang pretty bad (f.e. cant switch consoles etc.), then you can try Ctrl-Alt-Del - this creates a shutdown, but since it's still triggered by a program (shell), it sometimes won't work.
In this worst-case scenario you can trigger a reboot the "hard core" way. Remember "Raising Skinny Elephants Is Utterly Boring ". What you do is Press Alt-SysRq(=Prnt/Druck) and the letter from each word.

What this does is:

  • r - put the keyboard in RAW mode
  • s - sync the disc (write all unsaved data on the hd)
  • e - eliminate (terminate) all processes
  • i - kIll all processes which don't want to terminate gracefully
  • u - unmount all filesystems (actually, remount in read only mode, so nothing can happen any more)
  • b - the reBoot (or use o to shutOff)

Site created with Corinis CCM