Dec
12
Fixing vim/vi arrow keys behavior
Filed Under Fix, Linux | 2 Comments
In case your arrow keys do not work as usual when you enter in “insert” mode try this:
:set nocompatible
And if this fixes the problem add:
set nocompatible
to your ~/.vimrc file.
I had this problem in FreeBSD 7.0 and this fixed it.
Found here.
Nov
27
How to repair Linux(CentOS) software RAID
Filed Under Fix, Howto, news | Leave a Comment
Sooner or later hard drives fail…
That’s why we use RAID arrays. The best solution is to use hardware RAID – one assisted with specialized processor on the board. In that category I do not include cheap (called Fake RAID) solutions integrated on the motherboard.
But unfortunately sometimes real RAID controllers are too pricey – here on help comes software RAID.
The good news is that it is included in most of the recent OS. Linux does not make an exception and the software included is really well optimized and even recommended to achieve better performance over Fake RAID.
…
Now in case of failure we are protected, but RAID 1 and 5 will protect the data in case of one drive failure so it is better to replace the failed drive as soon as possible, but on other side you do not want to stop the machine right now.
NOTE: If you have IDE HDD do not use following procedure. IDE drives are NOT HOTSWAPPABLE and removing it may cause MORE DAMAGE.
This is valid also for ordinary s-ATA and SCSI drives.
In case that you have hotswappable drive SCA or similar you can replace the drive when the machine is working.
If you are not sure check the documentation that come with your hardware.
And now after all this precautions let’s start:
Determine the failed drive
To check what array and what drive have problem simply type:
cat /proc/mdstat
Here is sample output:
md2 : active raid5 sdd2[4](F) sda2[0] sdc1[2] sdb2[1]
106221312 blocks level 5, 256k chunk, algorithm 2 [4/3] [UUU_]
In this case the problem is sdd.
Check drive size and type
For the size type:
fdisk -l
And look for sdd in the output.
To check exact drive model type:
dmesg|less
and again look just before SCSI device sdd:
Next step is to obtain replacement drive
(ideally the same model)
Dump the partition table from the drive, if it is still readable:
sfdisk -d /dev/sdd > partitions.sdd
Remove the drive to replace from the array:
mdadm /dev/md2 -r /dev/sdd2
Look up the Host, Channel, ID and Lun of the drive to replace,
by looking in
cat /proc/scsi/scsi
Remove the drive from the bus
echo "scsi remove-single-device 1 0 3 0" > /proc/scsi/scsi
Verify that the drive has been correctly removed
by looking in
cat /proc/scsi/scsi
Physically replace the drive
Unplug the drive from your SCA bay, and insert a new drive
Add the new drive to the bus:
echo "scsi add-single-device 1 0 3 0" > /proc/scsi/scsi
(this should spin up the drive as well)
Recreate the layout
Re-partition the drive using the previously dumped partition table:
sfdisk /dev/sdd < partitions.sdd
If failed drive was unreadable here you need to create new partitions
Add the drive to your array
mdadm /dev/md2 -a /dev/sdd2
You can check if the operation was successful by issuing
cat /proc/mdstat Inspired with modifications from
Nov
21
I did not notice right away, but since version 8 of acrobat there is GPU hardware acceleration. For now only 2d and no CUDA or AVIVO, but still a step in right direction.
Unfortunately Adobe did not enable it by default so you need to do it.
Here are the steps to follow:
Start Acrobat
Go to Edit -> Preferences -> Page Display
If your video card is supported in the rendering section you will find “Use 2D GPU Acceleration”. Just check it as shown below and enjoy.

Nov
18
Upgrade HP/Compaq Presario 1950NX
Filed Under Fix, Windows | Leave a Comment
My PC is HP/Compaq Presario 1950NX and it come with integrated Video Card (Nvidia 6150) and 1G RAM.
Even it has good CPU (Athlon XP 3800) lack of memory and slow video card did not allow me to use high detail settings even on older games.
To improve the performance of the system I’ve added 1G of RAM (~$50) for total of 2G (4x512M).
And added PCI expressx16 video card from DiamondMultimedia Viper HD 2600 XT 512M (~$65).
As usual the upgrade was not flawless.
I’ve disabled the driver of NVIDIA card as noted in installation document that come with the card (always read those documents they contain important instructions) and set from BIOS PCI express as primary video controller.
After that I’ve installed the card and then the drivers from the CD.
Up to here no problems…
But after I started video player I noticed that simply there is no sound. As usual I verified the cables – so many times I simply did not plug them, but everything was OK.
Then I opened control panel -> sound and audio devices to see for my surprise that the sound card was set to none.
Next step was to check Device manager – only one adapter was listed – ATI Function Driver for High Definition Audio…
After seeing this It light up – The Video card has HDMI output and is capable to transmit audio via that connection. This was counted as sound device and since in BIOS onboard audio was set to AUTO it was disabled.
Simply setting it to Enabled bring back my sound.
Oct
24
WordPress 2.6.3
Filed Under Fix | Leave a Comment
A vulnerability in the Snoopy library was announced today. WordPress uses Snoopy to fetch the feeds shown in the Dashboard.
Even it does not seem as high risk vulnerability it is recomended to upgrade.
Oct
19
Remove GoogleUpdate.exe
Filed Under Fix, Windows | 3 Comments
After I finished my browser tests (see previous post for details) Â I started removing the browsers I do not use or the ones in beta phase.
For my “surprise” only componet that stated on my system and there was no obvious way to remove was as all of oyu already  guessed – googleupdate.exe
Even I removed the chrome browser this application was not removed and in top of it still active and connectiong to google servers for report.
After searching internet I found instructions on how to remove it.
To Uninstall GoogleUpdate.exe:
- Stop GoogleUpdate.exe in Windows Task Manager
- Run msconfig and disable GoogleUpdate.exe under StartUp (no need to restart)
- Delete GoogleUpdate task in C:\WINDOWS\Tasks
- Delete “Update†folder under your C:\Documents and Settings\Your name\Local Settings\Application Data\Google
- Clean up any term with “GoogleUpdate†in the registry file via regedit (Warning!). If you’re not sure about doing this, then just use CCleaner to clean up the registry.
Finally gone.
Sep
16
vim and PUTTY
Filed Under Command line, Fix, Linux, Unix | 1 Comment
Most of “ux” users and administrators use remote terminal to connect to administrared machine.
One of the popular choises, minly because of it’s portability is PuTTy only putty.exe is needed and no installation is required. In addition it is free.
Downside is that sometimes there are problems with terminal emulation – not necessary coming from putty, but still annoying.
One of my problems is that when vim is in insert mode arrow keys do not work. For long time I was no able to find solution to the problem, but finally i found one. Just type this in your home folder:
echo syntax enable > ~/.vimrc
This did the trick for me. Hope it helps to you too.
Jul
22
“UPS Virus” – UPDATE
Filed Under Fix, Windows | Leave a Comment
Today I was hit with a 0-day virus – ZBot/Backdoor.Paproxy or whatever antivirus companies call it.
It came as E-mail claiming to be from UPS (You guess now why UPS virus is in quotes) and was a zip file with executable inside. UPS_INVOICE_978172.zip to be exact, but there are several variants.
Usually the common is that they contain as subject line:”[RE] UPS Tracking Number” followed by random number.
Most of the e-mails were detected (as spam) by the antivirus scanner on mail gateway, but some reached end users.
To be honest this one was really good in attracting them (the users) to open it and some did….
This was no pleasant experience. Right away PC rebooted and trojan was installed.
Other problem was that there was only 2 companies who were able to detect it this morning (the number increased to 13 afternoon).
After updated virus definitions from Symantec were installed Backdoor was detected and removed.
Lesson learned: NEVER open executable from attachment.
Here you ca see if your antivirus is up to date with that particular virus.
UPDATE: There are new versions not recognized by Symantec yet. So follow above lesson.
Jul
18
After I rebooted manually my database server I received following message in mysql log:
[ERROR] /usr/libexec/mysqld: Incorrect key file for table <name of the table>.MYI’; try to repair it
The fix is relatively simple
- Go to MySQL console – mysql
- Point to correct database – use <database name>
- Issue command to repair – repair table <name of the table>
- Sit back and wait – it will take some time
Jun
26
Clean your ThinkPad from beginning
Filed Under Fix, Howto, Windows | Leave a Comment
Lenovo is shipping new ThinkPads preinstalled with huge amount of software you do not really need.
This slows the boot process to the levels new computer should not be.
Here is the list of software I removed from T61:
- All MS Office related (trial) – Later I’ll install the products we have license for
- SQL server (yes it is installed) related
- Windows Live toolbar
- Norton Internet Security – Will replace it with Norton Endpoint Protection
Other option is to reinstall the system from scratch.
Excellent tutorial on how to do it
Tip: Do not connect the system to internet until you are ready to. It starts right away to download and install windows updates and will slow down the machine.
