2009
12.20

For my Areca 1210 raid card I wanted the “Utility” to run on startup. In Debian/Ubuntu this is really easy:

  1. Create the (startup) scrip; In my case this looked like this:
    #!/bin/bash
    #
    #  set -x;
    #
    cd /root;
    screen -d -m arc_http;
    
  2. Create a symlink to /etc/init.d/
    sudo ln -s ~/Documenten/bin/arc_http.sh /etc/init.d/
    
  3. Run the update-rc.d script
    sudo update-rc.d arc_http.sh defaults
    

If you want to remove the startup script for some reason you can do this by executing this command:

sudo update-rc.d -f arc_http.sh remove

Further reading:

2009
12.20

In this howto I will show how I compiled a custom kernel in Ubuntu 8.10 (Intrepid Ibex). First we have to install some packages:

apt-get install kernel-package libncurses5-dev fakeroot wget bzip2;
apt-get install linux-source;

The newly installed kernel-sources are in /usr/src

cd /usr/src;
tar -xjvf linux-source-2.6.27.tar.bz2;
ln -s linux-source-2.6.27 linux;
cd linux;

After unpacking and changing to the appropriate directory we have to copy our old (kernel) .config and we are ready to go!

cp /boot/config-$(uname -r) ./.config;
make menuconfig;

Here are some screenshots of how I configured my kernel:


PS; I am on an Intel Core2 Quad Q9550 with:

  • 8GB memory
  • ATI HD Radeon 3600 series
  • Areca ARC1210 with 4 x WD RE3 WD7502ABYS (RAID 10)
make menuconfig - processor type and features

processor type and features

make menuconfig - bus options

bus options

make menuconfig - device drivers

device drivers

make menuconfig - networking support

networking support

make menuconfig - firmware drivers

firmware drivers

make menuconfig - ubuntu supplied third-party device drivers

ubuntu supplied third-party device drivers

You will probably come across this bug. Adding --arch=amd64 --subarch=x86_64 when calling make-kpkg will fix it:

make-kpkg clean --arch=amd64 --subarch=x86_64;
fakeroot make-kpkg --initrd --append-to-version=-quad \
kernel_image kernel_headers --arch=amd64 --subarch=x86_64;
synaptic pin package

pin package


If everything went well, we can install our packages and make sure we pin them (although you shouldn’t need to worry if you used --append-to-version)

dpkg -i linux-headers-2.6.27.18-quad-rt_2.6.27.18-quad-10.00.Custom_amd64.deb;
dpkg -i linux-image-2.6.27.18-quad-rt_2.6.27.18-quad-10.00.Custom_amd64.deb;

If you come across this bug:

/etc/kernel/postinst.d/nvidia-common exited with return code 20
Failed to process /etc/kernel/postinst.d at ...

Just:

sudo apt-get purge nvidia-common
sudo apt-get install nvidia-common

and everything will work like a charm!

References:

2009
12.18

My friend Bart Dorlandt showed my this trick a long time ago, but I still use it each time I (re)install my desktop/laptop:

Want to get rid of the “Recent Documents” in your Gnome Menu. Execute this in your home folder.

rm .recently-used.xbel
mkdir .recently-used.xbel
2009
12.14

In CentOS (5.3) php’s shell_exec() function is disabled by default. When you try to use it you’ll see messages like this:

PHP Warning:  shell_exec() has been disabled for security reasons in /var/www/...

in your error_log files. I thought it had something to do with the safe_mode in /etc/php.ini, but it turned out I had to change this line instead:

disable_functions = show_source,system,shell_exec,passthru,exec,phpinfo,proc_open

to

disable_functions = show_source,system,passthru,phpinfo,proc_open;

And after that, restart Apache:

service httpd restart