How to compile the Centos SME Server 7.4 Linux Kernel 2.6.34

Download the latest stable kernel from the http://www.kernel.org/ unpack the downloaded source file.
Steps:

  1. # wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.tar.bz2
  2. # tar xjf tar xjf linux-2.6.34.tar.bz2
  3. # ln -s linux-2.6.34 linux
  4. # cd linux
  5. # cp /boot/config-`uname -r` ./.config
  6. # make menuconfig (here you can select .config as preselected .config from old kernel)
  7. # make rpm (Compile the Kernel and make a rpm-paket)
  1. During the compilation of linux-2.6.34 kernel the following error appears
  2. drivers/message/fusion/mptsas.c: In function `mptsas_port_delete'
  3.  drivers/message/fusion/mptsas.c: 105: sorry, unimplemented: inlining failed in call to 'mptsas_set_rphy': function body not available
  4.  drivers/message/fusion/mptsas.c: 467: sorry, unimplemented: called from here
  5. Because: The ‘mptsas_set_rphy’ function is defined after the ‘mptsas_port_delete’ function in the file

Solution :
Moved the ‘mptsas_set_rphy’ function definition before to the function ‘mptsas_port_delete’ function definition.

  1.  drivers/built-in.o(.init.text+0x3bad): In function `con_init': include/trace/events/kmem.h:47: undefined reference to `.L1452'

Solution:
This bug was due to the result of allocating the memory using kzalloc() in con_init() function in the drivers/char/vt.c file.
The problem is:

vc_cons[currcons].d = vc = kzalloc(sizeof(struct vc_data), GFP_NOWAIT);

Solution:
vc_cons[currcons].d = vc = alloc_bootmem(sizeof(struct vc_data));

Change Default Browser on Debian Ubuntu Linux to Opera

run as root/sudo:

#update-alternatives --config x-www-browser

System shows:
Auswahl Alternative
-----------------------------------------------
1 /usr/bin/iceweasel
*+ 2 /usr/bin/opera

Enter: 2
relogin into X-Server/Desktop and Opera is default!

Review and Testing Ubuntu 10.04 on Thinkpad R50p

Today i setup Ubuntu 10.04 on my old Thinkpad R50p

Short Review:

  1. console-kit-daemon more than 30 threads unsolved bug since 9.04 – bad –
  2. fast nice easy Setup Dialog – good –
  3. does not Support fglrx ATI 3D Drivers – bad –
  4. fast Boot
  5. new Gui-Desktop with changed Window Buttons on left – bad –
  6. NO HUMAN Theme Design now its purple “New AGE Design” – very bad –
  7. ALL Drivers work out of the box – good –
  8. faster Operation on same Hardware – good –
  9. faster Opensource Madwifi Driver (ath5k) – good –
  10. NO TEXT BOOT MODE!! remove Bootsplash “plymouth” replace Custom-“mountall”

Conclusion:
If you have free time and free disk space you should try the new Ubuntu 10.04 Lucid Lynx.
It comes with some good new Programs for social Communication. If you want speedup
the boot remove “plymouth” the new Boot Splash replaces usplash but be ware you must
replace “mountall” with a special mountall paket!! go ubuntu-bugs to get it here
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/556372
This allows you to run lucid without Bootsplash much faster!! (like Server)

Thinkpad R50p ATI xserver hanging freeze sometimes Debian Lenny

Hardware: R50p with ATI Graphic 128MB
01:00.0 VGA compatible controller: ATI Technologies Inc M10 NT [FireGL Mobility T2] (rev 80)
System: Debian Lenny 5.0
Driver: fglrx

Solution:

  1. install cpufrequtils
    #sudo apt-get install cpufrequtils
  2. edit
     #nano /etc/initrd/cpufrequtils
  3. change line “ondemand” to “performance”
  4. check System
    #dmesg
  5. System show “unstable clocksource” last line
  6. edit
     #sudo nano /etc/boot/menu.lst
  7. add to Kernelparametes line /vmlinuz-2.6.26-2-686 root=/dev/hda3 ro quiet vga=normal clocksource=acpi_pm
  8. ..reboot

This will run System on max. Speedstep and Videos does’nt hang X-Server.
Should help on other Thinkpads to with ATI Chip’s

Ubuntu Lucid Lynx 10.04 Bug vnc4server press “m” not usable! vnc4server

Problem: If you install vnc4server and open a ssh tunnel session to
you Lucid Lynx Server you can’t press little key “m” cause it highlights
taskbar indicator applet!

Solution1:
1. edit /home/username/.vnc/xstartup
2. add lines:

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
#gnome-session & (disable gnome opens only Screen with a Xterm)

3.save xstartup
4.restart vncserver

#vncserver -kill :1 and then vncserver -geometry 800x600 -depth 16
this will open vnc with xterm here you can start firefox inside xterminal
#firefox &
.

Solution2: Try update the server cause the indicator-applet gets a new release

sudo apt-get update && sudo apt-get dist-upgrade -y

Solution3: Install jwm windowmanager, and replace at .vnc/xstartup the line

x-window-manager & to jwm &

Ubuntu 10.04 Lucid Lynx Kiosk Mode

If you run your PC as Family PC for Kids or Public PC you have to make some changes:

Step:

  1. Setup Ubuntu 10.04 with alternate Disk!
  2. select XDM as Login Manager by default!!
  3. go /etc/init folder as root
  4. edit control-alt-delete.conf and disable reboot without login
  5. go /etc/acpi make chmod 000 on powerbtn.sh hibernation.sh lidbtn.sh to prevent unwanted shutdown
  6. make
    #sudo aptitude remove gnome-power-manager
    to prevent unwanted standby by all users
  7. test forced shutdowns pressing all buttons at menu
  8. optional add autologin at login manger for a user without “sudo” rights
  9. optional add to startup the
    opera -kioskmode
    Browser Command (fullscreen Opera to hide Desktop to prevent users to reach files on the system)

Ubuntu 10.04 Lucid Lynx Videocall VoIP Webcam Chat Skype

For using Video Chat over different continents you need
under Ubuntu 10.04 following steps:

  1. buy a older used good Webcam Logitech Fusion (UVC-Driver-Webcam)
  2. go to Skype Homepage install Skype Beta for 8.10 (working on 10.04 too)
  3. plugin Webcam
  4. install skype-deb paket #sudo apt-get install skype-ubuntu-intrepid_2.1.0.81-1_i386.deb
  5. login to skype if you have a account, if not register at skype for free

..have fun..out of the box Webcam Chat works out of the box!

(This was a big problem of older ubuntu/debian versions, cause i can’t
phone to other countries)

Ubuntu 10.04 Lucid Lynx disable hide REBOOT SHUTDOWN STANDBY SUSPEND GNOME SYSTEM MENU SECURE KIOSK MODE

Problem: If you install ubuntu 10.04 Desktop by default
every user can shutdown,reboot,hibernate or standby a PC

If you want to disable this make:
– install gdm2conf from the ppa channel to customize hide System Menu at Login GDM2 Manager
– create custom Gnome System Menu Policy against User shutdown,reboot,hibernate or standby.

Steps:
create new policy file:

#sudo touch /etc/polkit-1/localauthority/50-local.d/custom-menu.pkla

edit new policy:

#nano nano /etc/polkit-1/localauthority/50-local.d/custom-menu.pkla

insert into:

[Disable suspend]
Identity=unix-user:*
Action=org.freedesktop.devicekit.power.suspend
ResultActive=no
ResultAny=no
[Disable hibernate]
Identity=unix-user:*
Action=org.freedesktop.devicekit.power.hibernate
ResultActive=no
ResultAny=no
[Disable shutdown]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.stop
ResultActive=no
ResultAny=no
[Disable reboot]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.restart
ResultActive=no
ResultAny=no

reboot and try!

To disable CTRL-ALT-DEL REBOOT edit

#sudo nano /etc/init/control-alt-delete.conf

comment out:
#start on control-alt-delete
#task
#exec shutdown -r now "Control-Alt-Delete pressed"

For high Security:
disable TTY Consoles 1-6 with edit /etc/init/ttyX.conf (Value of X = 1-6)
comment out:

#respawn
#exec /sbin/getty -8 38400 tty1

Change at rights of /sbin/reboot /sbin/halt /sbin/shutdown /sbin/poweroff
that shutdown or reboot the System to 0700 from Console (SSH)

If you can access the PC Case cut the Reset and Power Cable from Mainboard
fix the Power Cable at Wall and PC against cut off !! PC inside locked steel Server Rack!!
(used are cheap at ebay)

AFTER ALL of this you can only reboot/shutdown with

#sudo reboot
or
#sudo init 0