Computers 'n Stuff

I here share the resolutions for my Linux problems so they might safe somebody some time.

Tuesday, May 20, 2008 parmanent link to this post

Cleaning up Windows XP


Windows XP needs some maintenance from time to time when performance drops too far. Here are the major things I check and some utilites I use to fix those issues.
  1. Check for Malware and remove if neccesary (Freeware: Avira Private edition and SpyBotS&D, HighJackThis)
  2. Remove all not requred Software froma the autostart folder (Windows tools: msconfig)
  3. Remove unnessacary data form your harddrive. Deinstall Sofware you dont require, Remove restore points, old windows update files and clean up temorary files (Freeware: CClean, EmpTemp; Windows tools: Cleanmgr)
  4. Defrag harddrive, (Windows tools: defrag). Consider doing this in safe mode so more files can be moved. Use PageDefrag (Sysinternals) for offline Defragmentation of Systemfiles (Registry hives, Pagefiles and so on). Chek master file table (MFT) fragmentation. Few fragments (e.g. 3) dont matter. Many fragments ( e.g 100+) require MFT defragmentation for no feeware tools are avialable (AFAIK) DiskKeeper Professional can do the trick.
  5. Check for disk errors. Usually an NTFS drive that is not flagged dirty by Windows will not require checking. I use chkdsk /f to invoke autochk. exe at boot time to fix file system corruption on the system, however, since I feel that many file system errors will compromise hard disk performance.
  6. Fix registry. (consider creating a restore point before) (Freeware: CClean, Wiser registry cleaner, RegClean) I feel that this makes the system usually more resposnive if you remove serveral hundrets of wrong entries.
  7. Defragment internal structure of the Registry. (Ntregopt, Auslogistic registry defrag). This may decrease the size of the registry which decrease boot time.
  8. Use HDtune to check disk performance. If disk performance is poor, check whether drivers are installed correctly in the device manager. On Intel chipset based mainboards the inel application accelerater may improve Disk performance.
  9. Rebuild icon database. This will improve poor loading time for icons when this is caused by a corrupted icon database. (TweakUI[windowsXP powertoys])
  10. Remove "Ghost drivers": SET DEVMGR_SHOW_NONPRESENT_DEVICES=1 (Enable view hidden devices environment varibale) fire up device manager and check view>show hidden devices. Deinstall hidden devices that are not required any more.
  11. Bootvis. Downlaod and run Bootvis (Microsoft) to optimize boot time.
  12. Check for error messages in the management console (Events>applications) and debug if applicable.
  13. remove all unused protocoll from your network connections. In particular, deinstall microsoft network client and server or QoS if you are not using it. In the canse for micorsoft network, this probably increases security since your computer can probably not be accesed via SMB protocoll and in addition it may increase network throughput. In particular QoS has been suggested to reserve up to 20% of bandwidth for priorititized applications. However, you'll probably notice a difference only if you transfer large files over high speed LAN (100Mbit+) a lot.
Do you want to read on <<click

Monday, April 07, 2008 parmanent link to this post

Computer won't Boot after Reinstalling Windows XP on a Linux/Windows Dual Boot System: Another Windows XP Bug

Using a dual boot system is sometimes a little tedious. In particular since the windows installer is keen to screw up any operating systems that are installed on your hard drive besides windows. Here is what happened to me after I had to re install a broken windows instatllation on a dual boot system.

If you mess around too much with windows it will sooner or later cease to boot. Usually it is sufficient to boot with the windows installation disk and to choose the repair installation.
However, in my case repair installation did not help, and I had to do a clean install. Yet, after finishing the Windows XP SP 2 installation my computer was completely screwed up. After the Windows XP isntall it bacame impossible to boot any operating system, neither the old windows, the old linux nor the new windows. Usually in this cases it helps to boot the computer from a rescue boot disk and then boot the required partition. But in this case it didnt help at all. Also the repair utility featured on the Linux installation disk did not help at all. So I thought my harddrive would be lost.

However, after taking a look at the master boot record (MBR) of the hard drive I figured out what the problem was:

The windows xp installer flagged both partitions of my harddrive as active after the clean install. Because after the linux installation I used GRUB as a boot loader, the linux partition was set as active in the MBR.
So the Windows XP installer set the windwos partition as the active partition and leaving the active flag for the linux partition in place. Thus, after finishing the Windows XP reinstallation my MBR ended up with two partitions flaged as active. This is a condition which should never be present in a master boot record.
To fix the MPR you have to edit it to flag the only that partition active you want to boot from, e.g. the partition containig the GRUB boot-loader. Caution: Never use the fixmbr command from the recovery console to fix the MBR. This command will overwrite your partition table and screw up your entire hard drive.
I consider this as another nasty Windows XP bug. Considering the Microsoft marketing strategy it is conseivable that Microsoft intentionally put this bug into their installation routine to deliberately screw up systems that hold other than microsoft operating systems on their harddrive.

Labels: , , , ,

Do you want to read on <<click

Wednesday, June 20, 2007 parmanent link to this post

Using wget to convert a server side CMS into Offline/client site/desktop CMS


I have a little bit of webspace for hosting a private homepage, but the provider supports pretty much nothing, no root acces not, CMS not php or mysql. Here are some thoughts how to use a client side cms to build static html.


The Idea is as follows. I want to use my webspace to host a little private host site. But the privider supports no php cgi or mysql. He doesent have content management or wikis or the like. So the only option is static html. But for linux there are not so many tools that help you in generating static html websites. Exept may be html preprocessors. However, today the world is using php so why not using php as the html preprocessor. So I ended up hosting MySQL Apache and PHP locally on the client side and then ripped my own site using wget. I use OpenSuse 10.2 and all this runs out of the box.

wget --mirror -r –p -k --html-extension –-convert-links –P /home/ich/Downloads/mirror/mdiawiki http://localhost:8080/mylinux

This way i can use server side includes in convert them to static html. It works also for zope or plone generated sites but setting up a zope site is not as easy as I thought. So I think its easier to use includes to seperate the index and template from the content so that I dont need to edit everythin by hand.



Do you want to read on <<click

Friday, June 15, 2007 parmanent link to this post

Microsoft "theBad" windows vs. OpenSource Linux: Not eveything is lost


The Bad or like thy like to call themselves, microsoft, is tyining to bully Linux. Howerver, not everything is lost. Research reveals that all companies supporting Linux have a greater financial power than Microsoft.
The new goes that a couple of companies supporting Linux are depating wheather they should form a alliance against Microsoft which is threatening the open SourcCommunity with copyright infringement law sues. Should the participants of meeting choose to form a alliance to oppose "the Bad" which continues to gain momentum in the open source market, they will have almost 9 times tha market power than microsoft (397 billion USD compared to 44.3 billion). But what could the strategy against thue new bottem up attack of microft be?

Labels: ,

Do you want to read on <<click

Installation of Moneyplex 2007 with Rainer SCT cyberjack in Linux in OpenSuse 10.2 64Bit


Moneyplex is a monymanagement software supporting Smart Card identification for online Banking. Here I write what you have to keep in mind if you want to install it.


The problem with Moneyplex 2007 is that is still 32Bit. But compared to earlyer versions of OpenSuse and Moneyplex its now pretty easy to get Moneyplex running in a 64bit environment. No need to use chroot dirs or virual mashines. Just install the Moneyples software using the installer and download the updates.

Now get the 32 bit driver for the smart card reader Reiner SCT Cyperjack for Suse 10.2
install it with

# rpm -i [drivername.rpm]

now connect the Reader and do

# modprobe cyberjack

and check with

# lsmod | grep cyberjack

wheather driver has loaded.

Now add your user account to the group cyberjack e.g. using yast.

In moneyplex you have to use the CTAPI driver you'll find in
/usr/lib/readers/

and everything should work fine now.

Labels: , , , ,

Do you want to read on <<click

Tuesday, June 12, 2007 parmanent link to this post

Is Microsoft racketeering the Open Source community?


Microsoft is asking people to pay them for patents, but they won't say which ones. If a guy walks into a shop and says: 'It's an unsafe neighborhood, why don't you pay me 20 bucks and I'll make sure you're okay,' that's illegal. It's racketeering. What Microsoft is doing with intellectual property is exactly the same. It's a great company and I have great admiration for it, but this was not a well considered position," said Shuttleworth.

This is a pretty funny comparison but I can't belive that the plans of Microsoft concerning the opens source community are that simple. I can't tell exactly what it is but I believe it 's a part of a long term evil strategy of Microsoft to destoy the open source community.
There is enough evidence that Open Source has appeard already on the radar of Microsoft constanly detecting potential competitors. I has always been and it will allways be the goal of microsoft to defeat all competitiors that appear on their radar. Why should it be any different with open source? There is no obvious reason why Microsoft shoulde start to cooperate with some kind of sofware project that competes with their market. I believe its not the plan of microsoft just to earn some money I blelieve this is a strategie to attack a distributed target like the open source community. I belive its the long term goal of microsoft to infect the open source with closed source payware. These companes like Xandros, Novell and LG will serve as Trojan horses and virus droppers for Microsoft. I will be the goal of microsoft to sneak licensed technologies into the code of linux so that they can take leagl actions against any user of Linux and open source. The more companies Microsoft buys the more companies will be allowed to use this code and the more companies will distribute the infected open source Linux which will be something like Windux or Lindows that will compete with the pure opensource linux therby reducing the market share of which.

Labels: ,

Do you want to read on <<click

Monday, June 11, 2007 parmanent link to this post

Building a Xen aware Nvidia grafic card driver: 6800GS SLI in Xen under OpenSuse10.2 64Bit

Xen is a highly professional Open Source virtualization technology which promises the least performance loss. Heres how I got the Closed Source Nvidia driver going unde OpenSuse-Xen 64bit AMD X2.

3D acceleration and SLI mode in particular are only supported by the closed source nvidia drivers. However, Xen requires a modified "Xen-Aware" kernel to run in a pravirtualized environment. Only the most recent CPUs support (SVM for AMD)fully virtulized virtual mashines that run without kernel modifications. On many websites you'll find the infromation that blah blah blah X2 CPUs from AMD would support full virtualization (SVM) blah blah. But this is wrong. Don't be mistaken only the AM2 version of X2 processors support SVM. If its not AM2 its not SVM. So don't make the same mistake like me and get a socket 939 CPU.

The Nvidia driver does not support Xen Kernels and its closed source, so you can't modifie it yourself. But not everything is lost. The nvidia driver uses a kernel module as a compatibility layer to load the binary driver. This kernel module is open source, so in theory it should be possible to modify the kernel module so that it works with Xen. And belive it or not some brave guys really hacked the kernel module to support xen-kernels.

So I had to get the hypervisor and the default-xen kernel of opoen suse 10.2 running. This is pretty easy you can use Yast to do the installation stuff (isntall hypervisor, install default-xen and have it change the bootloader settings) And of course you'll need all the devel packeges to compile the kernels.

Now boot with the default kernel and install install the binary nvidia drivers you are going to patch later.

sh NVIDIA-Linux-x86-1.0-9746-pkg2.run --x-module-path=/usr/lib64/xorg/modules/ -q
The version of the compatibility layer and the binaries have to match. the nvidia install script will do the job for you. However, it will refuse to run in a paravirualized environment. So for the Xen-kernel, be prepared to do everything manually.

Boot into the dom0 domain. you'll only have the console available because the xserver won't work. without the propreitary nvidiea driver with the GPUs in SLI mode.

init 3 # stops Xserver and swiches to runlevel 3

make cloneconfig
make prepare
wget NVIDIA_xen-9746.patch.gz
wget http://us.download.nvidia.com/XFree8...-9746-pkg1.run
sh NVIDIA-Linux-x86-1.0-9746-pkg2.run -x # extract sources
cd NVIDIA-Linux-x86-1.0-9746-pkg2/usr/src/nv
zcat ../../../../NVIDIA_xen-9746.patch.gz | patch -p4 #patch sources


Sombody stated you have to modify usr/src/nv/os-interface.c line 1288 modified to:

#if 0
to avoid compiling erroers. but this was not true for me. The driver compiled fine without any modifications. So first try without modification.


make SYSSRC=/usr/src/linux module # make nvidia kernel module
cp nvidia.ko /lib/modules/`uname -r`/updates/nvidia.ko
depmod -a
modprobe nvidia
init 5 # when successful enter runlevel 5 to start x server

Now the driver should load.
I also read this command to install the modules:
install -D -o root -g root -m 0644 nvidia.ko /lib/modules/`uname -r`/updates/nvidia.ko
But for me copying to the /udate folder of the kernel module folder was sufficient.
However my 3D performace was poor (1fps with glxgears)
So i'll try some older patches and see what happens.
The other patch I tried did not any better. It turned out they dont support SLI. If you turn of SLI by
nvidia-xconfig --no-sli
3D work descent (12800 fps for glxgears) which is about the same than without Xen.
Links to Nvidia kernel module Xen patches
another Nvidia xen patch howto for open suse

Labels: , , , , ,

Do you want to read on <<click

Saturday, June 09, 2007 parmanent link to this post

Java directory structure in OpenSuse 10.2 Linux

Here is the directory structure of Java in OpenSuse 10.2 as a refereence.
# which java
/usr/bin/java
/usr/bin/java -> /etc/alternatives/java*
/etc/alternatives/java -> /usr/lib64/jvm/jre1.6.0_01/bin/java

this means the 64 bit java executable lives in /usr/lib64/jvm/[version]/bin/java. To enable the java version as a defualt adjust the link /etc/alternatives/java to point to the desired java version.

/etc/alternatives/jre -> /usr/lib64/jvm/[version]/

this is the link to your default jre. adust as desired.

/etc/alternatives/[version] -> /usr/lib64/jvm/[version]/
link pointing from alternatives to the real dir of the version. The real version can be a link too. if the versions are compatible e.g.
/usr/lib64/jvm/[version1] -> java-1.5.0-sun-1.5.0_update10/jre/

thats where the jar live

/usr/share/java

needed directorys but no content ...
/usr/shar/[version]
/usr/lib64/[version]

No firefox java plugin 64bit available exept Blackdown but couldn't get it working exept with <=32megs heap.. strange. nspluginwrapper doesent work with libjavaplugin_oj.so since it use open java OJAPI and not NAPI. Interestingly, Konquerer has its own java plugin that works put is incopatible with firefox though...

browser-blugins live in /usr/lib64/browser-plugins
or /usr/lib/browser-plugins
respectively. Thats the default plugin dir for firefox if you use the suse startupscript for firefox.

Labels: , ,

Do you want to read on <<click

Enable SLI in Linux: My Xorg.conf as an example

The SLI mode was a little harder to enable. Here is how i got it working

Install the driver according to the nvidia howto.

sax2 -r -m 0=nvidia doesent work with SLI setup

use

sax2 -r -c0 -m0=nvidia

instead. assuming that your disply is hooked up to card 0. Else you can use Card 1 but card 1 will not work for SLI

Now here was that catch: when I wanted to enable SLI GPU 0 as detectd by

nvidia-settings

needs to be the same as chip0 as reported by

sax2 -p

the can be identified by ther pci adress. And the display has to be hooked up to card 0 too. else the display will be scrambled when you starup the display.

I had to change the Init Disply first to PEG(slot2) to get this accomplished.

then you type

nvidiea-xconfig --sli=on

and your set. It si imortant that the frst available Xscreen is the screen with you monitor hooked up to it if have more that one configured in you xorg.config.

Heres the sections relevant to xscreen config of xorg.conf as a reference with sli enabeled:


Section "Module"
Load "dbe"
Load "type1"
Load "freetype"
Load "extmod"
Load "glx"
Load "v4l"
EndSection


Section "Monitor"
Option "CalcAlgorithm" "XServerPool"
DisplaySize 338 270
HorizSync 30-82
Identifier "Monitor[0]"
ModelName "ACER AL1714"
Option "DPMS"
VendorName "ACR"
VertRefresh 43-75
UseModes "Modes[0]"
EndSection

Section "Device"
BoardName "GeForce 6800 GS"
BusID "4:0:0"
Driver "nvidia"
Identifier "Device[0]"
VendorName "NVIDIA"
EndSection


Section "Screen"
DefaultDepth 24
SubSection "Display"
Depth 15
Modes "1280x1024" "1152x864" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1152x864" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1152x864" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1152x864" "1024x768" "800x600"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
Option "SLI" "on"
EndSection


Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
Screen "Screen[0]"
EndSection


Section "DRI"
Group "video"
Mode 0660
EndSection


Nvidie Linux Driver README

Labels: , , , ,

Do you want to read on <<click

Quake 4: enable SLI in linux

Quake 4 also runs faster in SLI mode in Linux. However, it needs to configured properly to increase performance. Here is my Quake starup script with SMP enableled.


#!/bin/sh
# Needed to make symlinks/shortcuts work.
# the binaries must run with correct working directory
cd "/usr/local/games/quake4"
export __GL_DOOM3=1
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:."
exec ./quake4smp.x86 "$@"
export __GL_DOOM3=1

important is to add export __GL_DOOM3=1 to improve SLI performance

Labels: , , , ,

Do you want to read on <<click