|
Building Linux kernels the Debian way |
|
This short article describes the quick and easy way on how to customize, build and install Linux kernel under Debian or Ubuntu Linux. First, we will install all prerequisites then download kernel source. Next step will be customization and as a last step we will create and install a Debian package with new Customized Linux kernel.
Prerequisites
Let's start with first step which is installation of all prerequisites:
# apt-get install bzip2 build-essential \
kernel-package libncurses5-dev
Kernel build and customization
Next step is to download kernel source code from kernel.org. Untar and cd inside the kernel's directory tree:
$ tar xvjf linux-2.6.34.tar.bz2
$ cd linux-2.6.34
At this point we will do the most important part of creating new customized kernel and building a Debian package. This is all done with a single make-kpkg command.
NOTE:
Optional step is to apply kernel patches before running a following command:
make-kpkg --rootcmd fakeroot --config menuconfig --initrd --us --uc kernel_image
- --us do not sign source
- --uc do not sign changelog
- --initrd perform any actions necessary for a kernel loaded using initrd
- -- rootcmd fakeroot command that provides a means of gaining super user access
- --config menuconfig will use menuconfig as a configuration tool where default is oldconfig
|
|
Read more...
|
|
Linux WD EARS Advanced Hard Drive Format |
Introduction
Nowadays hard drive manufactures are switching to a new hard drive technology which uses 4KB sectors size instead of conventional 512B. This new technology requires little tweaks to get a better performance in comparison to out-of-the-box settings. This article will describe some simple to follow instructions on how to partition the WD EARS hard-drive to get better overall performance. Getting the partitioning part done by aligning each partition can rapidly increase a hard drive's performance.
512B sector size standard is here for over 30 years and therefore lots of the code written for a Linux OS has 512 number hard coded in its source. The main idea in regards to the 4 096 B size sectors is to increase the bit density on each track by reducing the number of gaps which hold Sync/DAM and ECC ( Error Correction Code ) information between each data sectors. Therefore, for 8 x 512 B sectors the track also holds 8 sector gaps.
By having one single sector of size 4 096 B ( 8 x 512 B ) the track holds only 1 sector gap for each data sector thus reducing an overhead for a need to support multiple Sync/DAM and ECC blocks and at the same time increasing bit density.
Linux partitioning tools by default start each partition on sector 63 which leads to a bad performance of WD EARS hard-drives since they are not aligned to 4K sector from the beginning of the track.
For this article I'm using WDC WD10EARS-00Y5B1. This is a 1TB SATA hard-drive with 64MB cache memory.

|
|
Read more...
|
|
Image Processing, Linear stretch and OpenCV |
|
In attempt to recognize objects by examining images, various Image processing and analysis techniques are applied. This article briefly describes linear stretch algorithm and its use within OpenCV.
Linear stretch technique can be applied to images where substantial lack of contrast can result in false identification of objects, its spacial relationship and significance. Contrast enhancement by linear stretch can be applied to images with very low or very high variations of brightness. To apply the Linear stretch algorithm an image needs to be converted into gray-scale and all 8bit pixels and its values are recorded into histogram.
|
|
Read more...
|
|
Bash scripts to scan and monitor network |
|
This article provides few simple scripts to scan and monitor network using combination of bash and ping command. Obviously, these scripts are no match to a full monitoring dedicated software like nagios but they could be useful for a small home brand networks, where implementing sophisticated monitoring system can become an overhead.
Scan network subnet
In this example the bash script will scan network for hosts attached to an IP address 10.1.1.1 - 255. The script will print message Node with IP: IP-address is up if ping command was successful. Feel free to modify the script to scan your hosts range.
#!/bin/bash
is_alive_ping()
{
ping -c 1 $1 > /dev/null
[ $? -eq 0 ] && echo Node with IP: $i is up.
}
for i in 10.1.1.{1..255}
do
is_alive_ping $i & disown
done
Execute:
./bash_ping_scan.sh
OUTPUT:
Node with IP: 10.1.1.1 is up.
Node with IP: 10.1.1.4 is up.
Node with IP: 10.1.1.9 is up.
|
|
Read more...
|
|
|
|
Page 3 of 11 |