Archive for the 'Kernel' Category

Weekend Security Check

Some of my servers providing FTP service and I check every weekend all the uploaded and system files for viruses and rootkits.
If somebody starts a upload, nobody think about potential danger e.g. virus.

You can start all this checks separated or as a script.

Here are some examples: Continue reading ‘Weekend Security Check’

Debian squeeze install OpenVZ

I have a tiny embedded server (acrosser model) Intel Celeron with only 400MHz and 512MB Mem total. Before I upgraded debian to squeeze I used Xen, now its time to use OpenVZ.

Reasons:
- My tiny hardware:)
- Container virtualization – I can use more virtual machines
- Less memory usage – Container cannot boot

OpenVZ kernel and the vzctl and vzquota packages are available in the Debian repositories, so we can install them as follows:
Continue reading ‘Debian squeeze install OpenVZ’

tty1: input overrun

Some days ago I get logcheck System Events.

It was a remote Debian Lenny Server with some strange messages:

Feb 9 09:16:51 server getty[27096]: tty1: input overrun
This message means that someone is tipyng on the keyboard.

Stupid cat. Stay off my keyboard! :D

There was a USB keyboard, all keyboard and mice devices are listed here:
/dev/input/

Parse kernel.org changelogs

Parsing kernel orgs changelogs can be a pain.

Here’s a handy one-liner to make it easier to read:

1
wget --quiet -O - http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.37 | grep -A 4 ^commit | grep -B 1 "^--" | grep -v "^--"

You should become human readable output like this one:

1
2
3
4
5
6
7
    perf: Remove unused variable
    x86, bios: By default, reserve the low 64K for all BIOSes
    mlx4_en: Fix build warning in mlx4_en_create_rx_ring.
    mlx4_en: updated driver version
    mlx4_en: Moving to work with GRO
    mlx4_en: UDP RSS support
    mlx4_en: reconfiguring mac address.

Unable to enumerate USB device

Some hardware just don’t work with ehci_hcd on Ubuntu and other distributions. My older mobile phone refused to work no matter what I did and want. After plugging the device nothing happened, doing dmesg showed me the following error:

Output from dmesg:

1
2
3
4
5
[ 4494.828096] usb 5-1: new low speed USB device using uhci_hcd and address 41
[ 4495.244038] usb 5-1: device not accepting address 41, error -71
[ 4495.356066] usb 5-1: new low speed USB device using uhci_hcd and address 42
[ 4495.768030] usb 5-1: device not accepting address 42, error -71
[ 4495.768057] hub 5-0:1.0: unable to enumerate USB device on port 1

After searching a lot around web, I came to a conclusion that my device (mobile phone) doesn’t work with USB 2.0. So I tried to disable the ehci_hcd to make it work.

Since Karmic doesn’t use ehci_hcd as a module, modprobe -r ehci_hcd no longer works. This module was compiled into the kernel.
There is a trick to disable it. execute the following commands in terminal:

1
2
cd /sys/bus/pci/drivers/ehci_hcd
ls

You will see one or two files with 0000:00:xx.x format. Execute the following command:

1
sudo sh -c 'echo -n "0000:00:xx.x" > unbind'

Replace the xx.x with the numbers displayed on your file/s. It should disable the ehci_hcd.

Another way:

1
2
cd /sys/bus/pci/drivers/ehci_hcd/
sudo sh -c 'find ./ -name "0000:00:*" -print| sed "s/\.\///">unbind'