Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, May 6, 2011

Linux Commands For Shared Library Management & Debugging Problem

If you are a developer, you will re-use code provided by others. Usually /lib, /lib64, /usr/local/lib, and other directories stores various shared libraries. You can write your own program using these shared libraries. As a sys admin you need to manage and install these shared libraries. Use the following commands for shared libraries management, security, and debugging problems.

In Linux or UNIX like operating system, a library is noting but a collection of resources such as subroutines / functions, classes, values or type specifications. There are two types of libraries:

Static libraries - All lib*.a fills are included into executables that use their functions. For example you can run a sendmail binary in chrooted jail using statically liked libs.Dynamic libraries or linking [ also known as DSO (dynamic shared object)] - All lib*.so* files are not copied into executables. The executable will automatically load the libraries using ld.so or ld-linux.so.ldconfig : Updates the necessary links for the run time link bindings.ldd : Tells what libraries a given program needs to run.ltrace : A library call tracer.ld.so/ld-linux.so: Dynamic linker/loader.

As a sys admin you should be aware of important files related to shared libraries:

/lib/ld-linux.so.* : Execution time linker/loader./etc/ld.so.conf : File containing a list of colon, space, tab, newline, or comma separated directories in which to search for libraries. /etc/ld.so.cache : File containing an ordered list of libraries found in the directories specified in /etc/ld.so.conf. This file is not in human readable format, and is not intended to be edited. This file is created by ldconfig command.lib*.so.version : Shared libraries stores in /lib, /usr/lib, /usr/lib64, /lib64, /usr/local/lib directories.

You need to use the ldconfig command to create, update, and remove the necessary links and cache (for use by the run-time linker, ld.so) to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/usr/lib, /lib64 and /lib). The ldconfig command checks the header and file names of the libraries it encounters when determining which versions should have their links updated. This command also creates a file called /etc/ld.so.cache which used to speed linking.

In this example, you've installed a new set of shared libraries at /usr/local/lib/:
$ ls -l /usr/local/lib/
Sample outputs:

-rw-r--r-- 1 root root 878738 Jun 16 2010 libGeoIP.a-rwxr-xr-x 1 root root 799 Jun 16 2010 libGeoIP.lalrwxrwxrwx 1 root root 17 Jun 16 2010 libGeoIP.so -> libGeoIP.so.1.4.6lrwxrwxrwx 1 root root 17 Jun 16 2010 libGeoIP.so.1 -> libGeoIP.so.1.4.6-rwxr-xr-x 1 root root 322776 Jun 16 2010 libGeoIP.so.1.4.6-rw-r--r-- 1 root root 72172 Jun 16 2010 libGeoIPUpdate.a-rwxr-xr-x 1 root root 872 Jun 16 2010 libGeoIPUpdate.lalrwxrwxrwx 1 root root 23 Jun 16 2010 libGeoIPUpdate.so -> libGeoIPUpdate.so.0.0.0lrwxrwxrwx 1 root root 23 Jun 16 2010 libGeoIPUpdate.so.0 -> libGeoIPUpdate.so.0.0.0-rwxr-xr-x 1 root root 55003 Jun 16 2010 libGeoIPUpdate.so.0.0.0

Now when you run an app related to libGeoIP.so, you will get an error about missing library. You need to run ldconfig command manually to link libraries by passing them as command line arguments with the -l switch:
# ldconfig -l /path/to/lib/our.new.lib.so
Another recommended options for sys admin is to create a file called /etc/ld.so.conf.d/geoip.conf as follows:

/usr/local/lib

Now just run ldconfig to update the cache:
# ldconfig
To verify new libs or to look for a linked library, enter:
# ldconfig -v
# ldconfig -v | grep -i geoip
Sample outputs:

libGeoIP.so.1 -> libGeoIP.so.1.4.6libGeoIPUpdate.so.0 -> libGeoIPUpdate.so.0.0.0

You can print the current cache with the -p option:
# ldconfig -p
Putting web server such as Apache / Nginx / Lighttpd in a chroot jail minimizes the damage done by a potential break-in by isolating the web server to a small section of the filesystem. It is also necessary to copy all files required by Apache inside the filesystem rooted at /jail/ directory , including web server binaries, shared Libraries, modules, configuration files, and php/perl/html web pages. You need to also copy /etc/{ld.so.cache,ld.so.conf} files and /etc/ld.so.conf.d/ directory to /jail/etc/ directory. Use the ldconfig command to update, print and troubleshoot chrooted jail problems:

### chroot to jail bashchroot /jail /bin/bash### now update the cache in /jail ###ldconfig### print the cache in /jail ###ldconfig -p### copy missing libs ###cp /path/to/some.lib /jail/path/to/some.libldconfigldconfig -v | grep some.lib### get out of jail ###exit### may be delete bash and ldconfig to increase security (NOTE path carefully) ###cd /jailrm sbin/ldconfig bin/bash### now start nginx jail ###chroot /jail /usr/local/nginx/sbin/nginx 

A rootkit is a program (or combination of several programs) designed to take fundamental control of a computer system, without authorization by the system's owners and legitimate managers. Usually, rootkit use /lib, /lib64, /usr/local/lib directories to hide itself from real root users. You can use ldconfig command to view all the cache of all shared libraries and unwanted programs:
# /sbin/ldconfig -p | less
You can also use various tools to detect rootkits under Linux.

You may see the errors as follows:

Dynamic linker error in foo
Can't map cache file cache-file
Cache file cache-file foo

All of the above errors means the linker cache file /etc/ld.so.cache is corrupt or does not exists. To fix these errors simply run the ldconfig command as follows:
# ldconfig

The executable required a dynamically linked library that ld.so or ld-linux.so cannot find. It means a library called xyz needed by the program called foo not installed or path is not set. To fix this problem install xyz library and set path in /etc/ld.so.conf file or create a file in /etc/ld.so.conf.d/ directory.

ldd (List Dynamic Dependencies) is a Unix and Linux program to display the shared libraries required by each program. This tools is required to build and run various server programs in a chroot jail. A typical example is as follows to list the Apache server shared libraries, enter:
# ldd /usr/sbin/httpd
Sample outputs:

libm.so.6 => /lib64/libm.so.6 (0x00002aff52a0c000)libpcre.so.0 => /lib64/libpcre.so.0 (0x00002aff52c8f000)libselinux.so.1 => /lib64/libselinux.so.1 (0x00002aff52eab000)libaprutil-1.so.0 => /usr/lib64/libaprutil-1.so.0 (0x00002aff530c4000)libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002aff532de000)libldap-2.3.so.0 => /usr/lib64/libldap-2.3.so.0 (0x00002aff53516000)liblber-2.3.so.0 => /usr/lib64/liblber-2.3.so.0 (0x00002aff53751000)libdb-4.3.so => /lib64/libdb-4.3.so (0x00002aff5395f000)libexpat.so.0 => /lib64/libexpat.so.0 (0x00002aff53c55000)libapr-1.so.0 => /usr/lib64/libapr-1.so.0 (0x00002aff53e78000)libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aff5409f000)libdl.so.2 => /lib64/libdl.so.2 (0x00002aff542ba000)libc.so.6 => /lib64/libc.so.6 (0x00002aff544bf000)libsepol.so.1 => /lib64/libsepol.so.1 (0x00002aff54816000)/lib64/ld-linux-x86-64.so.2 (0x00002aff527ef000)libuuid.so.1 => /lib64/libuuid.so.1 (0x00002aff54a5c000)libresolv.so.2 => /lib64/libresolv.so.2 (0x00002aff54c61000)libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00002aff54e76000)libssl.so.6 => /lib64/libssl.so.6 (0x00002aff5508f000)libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002aff552dc000)libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002aff5562d000)libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002aff5585c000)libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002aff55af1000)libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002aff55cf3000)libz.so.1 => /usr/lib64/libz.so.1 (0x00002aff55f19000)libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002aff5612d000)libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002aff56335000)

Now, you can copy all those libs one by one to /jail directory

# mkdir /jail/lib# cp /lib64/libm.so.6 /jail/lib# cp /lib64/libkeyutils.so.1 /jail/lib

You can write a bash script to automate the entire procedure:

cp_support_shared_libs(){ local d="$1" # JAIL ROOT local pFILE="$2" # copy bin file libs local files=""## use ldd to get shared libs list ### files="$(ldd $pFILE | awk '{ print $3 }' | sed '/^$/d')"  for i in $files do dcc="${i%/*}" # get dirname only [ ! -d ${d}${dcc} ] && mkdir -p ${d}${dcc} ${_cp} -f $i ${d}${dcc} done  # Works with 32 and 64 bit ld-linux sldl="$(ldd $pFILE | grep 'ld-linux' | awk '{ print $1}')" sldlsubdir="${sldl%/*}" [ ! -f ${d}${sldl} ] && ${_cp} -f ${sldl} ${d}${sldlsubdir}}

Call cp_support_shared_libs() it as follows:

cp_support_shared_libs "/jail" "/usr/local/nginx/sbin/nginx"

Type the following command:
$ ldd -d /path/to/executable

Type the following command:
$ ldd -r /path/to/executable

TCP Wrapper is a host-based Networking ACL system, used to filter network access to Internet. TCP wrappers was original written to monitor and stop cracking activities on the UNIX / Linux systems. To determine whether a given executable daemon supports TCP Wrapper or not, run the following command:
$ ldd /usr/sbin/sshd | grep libwrap
Sample outputs:

libwrap.so.0 => /lib64/libwrap.so.0 (0x00002abd70cbc000)

The output indicates that the OpenSSH (sshd) daemon supports TCP Wrapper.

You can use the ldd command when an executable is failing because of a missing dependency. Once you found a missing dependency, you can install it or update the cache with the ldconfig command as mentioned above.

The ltrace command simply runs the specified command until it exits. It intercepts and records the dynamic library calls which are called by the executed process and the signals which are received by that process. It can also intercept and print the system calls executed by the program. Its use is very similar to strace command.
# ltrace /usr/sbin/httpd
# ltrace /sbin/chroot /usr/sbin/httpd
# ltrace /bin/ls
Sample outputs:

__libc_start_main(0x804fae0, 1, 0xbfbd6544, 0x805bce0, 0x805bcd0 strrchr("/bin/ls", '/') = "/ls"setlocale(6, "") = "en_IN.utf8"bindtextdomain("coreutils", "/usr/share/locale") = "/usr/share/locale"textdomain("coreutils") = "coreutils"__cxa_atexit(0x8052d10, 0, 0, 0xbfbd6544, 0xbfbd6498) = 0isatty(1) = 1getenv("QUOTING_STYLE") = NULLgetenv("LS_BLOCK_SIZE") = NULLgetenv("BLOCK_SIZE") = NULLgetenv("BLOCKSIZE") = NULLgetenv("POSIXLY_CORRECT") = NULLgetenv("BLOCK_SIZE") = NULLgetenv("COLUMNS") = NULLioctl(1, 21523, 0xbfbd6470) = 0getenv("TABSIZE") = NULLgetopt_long(1, 0xbfbd6544, "abcdfghiklmnopqrstuvw:xABCDFGHI:"..., 0x0805ea40, -1) = -1__errno_location() = 0xb76b8694malloc(40) = 0x08c8e3e0memcpy(0x08c8e3e0, "", 40) = 0x08c8e3e0...............output truncatedfree(0x08c8e498) = free(NULL) = free(0x08c8e480) = exit(0 __fpending(0xb78334e0, 0xbfbd6334, 0xb78876a3, 0xb78968f8, 0) = 0fclose(0xb78334e0) = 0__fpending(0xb7833580, 0xbfbd6334, 0xb78876a3, 0xb78968f8, 0) = 0fclose(0xb7833580) = 0+++ exited (status 0) +++

The ltrace command is a perfect debugging utility in Linux:

To monitor the library calls used by a program and all the signals it receives. For tracking the execution of processes. It can also show system calls, used by a program.

Consider the following c program:

 #include int main(){printf("Hello world\n");return 0;} 

Compile and run it as follows:
$ cc hello.c -o hello
$ ./hello
Now use the ltrace command to tracking the execution of processes:
$ ltrace -S -tt ./hello
Sample outputs:

15:20:38.561616 SYS_brk(NULL) = 0x08f4200015:20:38.561845 SYS_access("/etc/ld.so.nohwcap", 00) = -215:20:38.562009 SYS_mmap2(0, 8192, 3, 34, -1) = 0xb770800015:20:38.562155 SYS_access("/etc/ld.so.preload", 04) = -215:20:38.562336 SYS_open("/etc/ld.so.cache", 0, 00) = 315:20:38.562502 SYS_fstat64(3, 0xbfaafe20, 0xb7726ff4, 0xb772787c, 3) = 015:20:38.562629 SYS_mmap2(0, 76469, 1, 2, 3) = 0xb76f500015:20:38.562755 SYS_close(3) = 015:20:38.564204 SYS_access("/etc/ld.so.nohwcap", 00) = -215:20:38.564372 SYS_open("/lib/tls/i686/cmov/libc.so.6", 0, 00) = 315:20:38.564561 SYS_read(3, "\177ELF\001\001\001", 512) = 51215:20:38.564694 SYS_fstat64(3, 0xbfaafe6c, 0xb7726ff4, 0xb7705796, 0x8048234) = 015:20:38.564822 SYS_mmap2(0, 0x1599a8, 5, 2050, 3) = 0xb759b00015:20:38.565076 SYS_mprotect(0xb76ee000, 4096, 0) = 015:20:38.565209 SYS_mmap2(0xb76ef000, 12288, 3, 2066, 3) = 0xb76ef00015:20:38.565454 SYS_mmap2(0xb76f2000, 10664, 3, 50, -1) = 0xb76f200015:20:38.565604 SYS_close(3) = 015:20:38.565709 SYS_mmap2(0, 4096, 3, 34, -1) = 0xb759a00015:20:38.565842 SYS_set_thread_area(0xbfab030c, 0xb7726ff4, 0xb759a6c0, 1, 0) = 015:20:38.566070 SYS_mprotect(0xb76ef000, 8192, 1) = 015:20:38.566185 SYS_mprotect(0x08049000, 4096, 1) = 015:20:38.566288 SYS_mprotect(0xb7726000, 4096, 1) = 015:20:38.566381 SYS_munmap(0xb76f5000, 76469) = 015:20:38.566522 __libc_start_main(0x80483e4, 1, 0xbfab04e4, 0x8048410, 0x8048400 15:20:38.566667 puts("Hello world" 15:20:38.566811 SYS_fstat64(1, 0xbfab0310, 0xb76f0ff4, 0xb76f14e0, 0x80484c0) = 015:20:38.566936 SYS_mmap2(0, 4096, 3, 34, -1) = 0xb770700015:20:38.567126 SYS_write(1, "Hello world\n", 12Hello world) = 1215:20:38.567282 <... puts resumed> ) = 1215:20:38.567348 SYS_exit_group(0 15:20:38.567454 +++ exited (status 0) +++

You need to carefully monitor the order and arguments of selected functions such as open() [used to open and possibly create a file or device] or chown() [used to change ownership of a file] so that you can spot simple kinds of race conditions or security related problems. This is quite useful for evaluating the security of binary programs to find out what kind of changes made to the system.

The ltrace command can be used to trace memory usage of the malloc() and free() functions in C program. You can calculate the amount of memory allocated as follows:
[node303 ~]$ ltrace -e malloc,free ./simulator arg1 agr2 arg3
The ltrace will start ./simulator program and it will trace the malloc() and free() functions. You can find out I/O problems as follows:
[node303 ~]$ ltrace -e fopen,fread,fwrite,fclose ./simulator arg1 agr2 arg3
You may need to change function names as your programming languages or UNIX platform may use different memory allocation functions.

The ld.so or / ld-linux.so used as follows by Linux:

To load the shared libraries needed by a program.To prepare the program to run, and then runs it.

Type the following command:
# cd /lib
For 64 bit systems:
# cd /lib64
Pass the --list option, enter:
# ./ld-2.5.so --list /path/to/executable

From the man page:

--verify verify that given object really is a dynamically linked object we can handle --library-path PATH use given PATH instead of content of the environment variable LD_LIBRARY_PATH --inhibit-rpath LIST ignore RUNPATH and RPATH information in object names in LIST

The LD_LIBRARY_PATH can be used to set a library path for finding dynamic libraries using LD_LIBRARY_PATH, in the standard colon seperated format:
$ export LD_LIBRARY_PATH=/opt/simulator/lib:/usr/local/lib
The LD_PRELOAD allow an extra library not specified in the executable to be loaded:
$ export LD_PRELOAD=/home/vivek/dirhard/libdiehard.so
Please note that these variables are ignored when executing setuid/setgid programs.

Ubuntu Linux: Install RT2870 Chipset Based USB Wireless Adapter

This blog post listed Linux Compatible USB wireless adapters. It seems that many new Linux users frequently have problems learning how to install RT2870 driver under Linux. I also received email requesting installation instructions for the same device. This quick tutorial will explains how to install RT2870 based chipset device with WPA2 authentication and TKIP wireless encryption.

The following instructions are tested on:

Ubuntu Linux 10.04.1 LTSKernel - Linux 2.6.32-24-generic-pae i686 (32 bit)WPA2 with Linksys 160N router

The main problem is conflicting driver which are shipped with default kernel. WPA2 is a method of security wireless networking with optional PSK for home users. The default driver only recognizes driver but always failed to join WPA2 based network. The solution is to install RT2870 driver from the vendor site.

Type the following command to black list default drivers:
$ sudo vi /etc/modprobe.d/blacklist.conf
Append the following driver names:

blacklist rt2800usbblacklist rt2x00libblacklist rt2x00usb

Save and close the file. Use the rmmod command to remove current drivers or just reboot the system:
$ sudo modprobe -r driverName
# you need to remove all of the above drivers one by one:
$ sudo modprobe -r rt2800usb
OR simply reboot the systems:
$ sudo reboot

Type the following command to install required packages so that you can compile source code:
$ sudo apt-get install build-essential fakeroot dpkg-dev
Finally, install Linux kernel headers so that you can compile kernel device drivers:
$ sudo apt-get install linux-headers-$(uname -r)

Visit this page and download USB drivers [RT2870USB(RT2870/RT2770)].

Type the following command:
$ tar -jxvf 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2
$ cd 2010_0709_RT2870_Linux_STA_v2.4.0.1

First, edit config.mk file as follows so that Network Manager can be used to set WPA2 auth info:
$ vi os/linux/config.mk
Set it as follows:

# Support Wpa_SupplicantHAS_WPA_SUPPLICANT=y# Support Native WpaSupplicant for Network MangerHAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

Save and close the file. To compile the driver, enter:
$ make
Sample outputs:

make -C toolsmake[1]: Entering directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'gcc -g bin2h.c -o bin2hmake[1]: Leaving directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2hcp -f os/linux/Makefile.6 /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefilemake -C /lib/modules/2.6.32-24-generic-pae/build SUBDIRS=/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modulesmake[1]: Entering directory `/usr/src/linux-headers-2.6.32-24-generic-pae' CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_md5.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_sha2.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_hmac.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_aes.o......... CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_io.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_bulk.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_data.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_data_usb.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/ee_prom.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtmp_mcu.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_dev_id.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_usb.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_usb_util.o CC [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/usb_main_dev.o LD [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/rt2870sta.o Building modules, stage 2. MODPOST 1 modules CC /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/rt2870sta.mod.o LD [M] /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/rt2870sta.komake[1]: Leaving directory `/usr/src/linux-headers-2.6.32-24-generic-pae'

Note: You may see a LOTs of warnings during the compilation, and this is *normal* so don't panic.

Type the following command:
$ sudo make install
Sample outputs:

make -C /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux -f Makefile.6 installmake[1]: Entering directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux'rm -rf /etc/Wireless/RT2870STAmkdir /etc/Wireless/RT2870STAcp /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/RT2870STA.dat /etc/Wireless/RT2870STA/.install -d /lib/modules/2.6.32-24-generic-pae/kernel/drivers/net/wireless/install -m 644 -c rt2870sta.ko /lib/modules/2.6.32-24-generic-pae/kernel/drivers/net/wireless//sbin/depmod -a 2.6.32-24-generic-paemake[1]: Leaving directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux'

Again visit this page and download "Firmware RT28XX/RT30XX USB series (RT2870/RT2770/RT3572/RT3070)". Unzip and install the firemware:
$ unzip RT2870_Firmware_V22.zip
$ cd RT2870_Firmware_V22/
#### Make a backup of existing old firmware ####
$ mkdir -p $HOME/backup/lib/firmware
$ cp /lib/firmware/rt2870.bin $HOME/backup/lib/firmware
#### Install the firmware (for 64 bit Linux systems, you may have to use /lib64/firmware) #####
$ sudo cp rt2870.bin /lib/firmware/
##### **** backup and move existing driver, do NOT SKIP this STEP ****######
$ sudo mv /lib/modules/$(uname -r)/kernel/drivers/net/wireless/rt2870sta.ko $HOME/backup/

Type the following commands:
$ mkdir -p $HOME/backup/var/lib/usbutils
$ cp /var/lib/usbutils/usb.ids $HOME/backup/var/lib/usbutils
$ sudo wget -O /var/lib/usbutils/usb.ids http://www.linux-usb.org/usb.ids

Connect your USB device and type the following command to verify that Wireless USB LAN adapter is detected:
$ lsusb
Sample outputs:

Bus 002 Device 007: ID 0411:00e8 MelCo., Inc. Buffalo WLI-UC-G300N Wireless LAN AdapterBus 002 Device 006: ID 05ac:0220 Apple, Inc. Aluminum Keyboard (ANSI)Bus 002 Device 005: ID 05ac:1006 Apple, Inc. Hub in Aluminum KeyboardBus 002 Device 004: ID 413c:2513 Dell Computer Corp.Bus 002 Device 003: ID 413c:2513 Dell Computer Corp.Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching HubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 001 Device 007: ID 413c:8160 Dell Computer Corp.Bus 001 Device 006: ID 413c:8162 Dell Computer Corp.Bus 001 Device 005: ID 413c:8161 Dell Computer Corp.Bus 001 Device 004: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)Bus 001 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications ProcessorBus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

You need to edit /etc/Wireless/RT2870STA/RT2870STA.dat file, enter:
$ sudo vi /etc/Wireless/RT2870STA/RT2870STA.dat
Set SSID (nixcraft is my SSID):

SSID=nixcraft

Set country (IN = INDIA, US = USA, etc):

CountryCode=IN

Set authentication information (do not skip this if you want WPA2 based authentication):

AuthMode=WPA2EncrypType=TKIPWPAPSK=YOUR-PASSWORD-HERE

See README_STA for other detailed information about each field. Save and close the file.

Type the ifconfig command and you should see ra0:
$ ifconfig ra0

ra0 Link encap:Ethernet HWaddr 00:1d:73:bc:e4:6e inet6 addr: fe80::21d:73ff:febc:e46e/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:5157 errors:0 dropped:0 overruns:0 frame:0 TX packets:206 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1093810 (1.0 MB) TX bytes:16772 (16.7 KB)

You can now connect to the Internet by clicking on Network manager ( The network-manager is the one which is found in the systray. The icon of two computers, one below to the other on the left-side). Clicking on NM-applet will give you the types of connection/hardware you have available > Select Wireless Device > Select nixcraft SSID (or scan of SSID) > Make sure you set "WPA2" as wireless security. Once connected you can browse the Internet or verify IP info:
$ ifconfig ra0
Sample outputs:

ra0 Link encap:Ethernet HWaddr 00:1d:73:bc:e4:6e inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::21d:73ff:febc:e46e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6711 errors:0 dropped:0 overruns:0 frame:0 TX packets:271 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1420879 (1.4 MB) TX bytes:22312 (22.3 KB)

Verify gateway or just ping to public ip:
$ route -n
$ ping google.com
$ ping cyberciti.biz

You need to reinstall the driver using the above steps.

Thursday, May 5, 2011

Top 5 Linux DVD RIP Software

A DVD ripper software allows you to copying the content of a DVD to a hard disk drive. You transfer video on DVDs to different formats, or make a backup of DVD content, and to convert DVD video for playback on media players, streaming, and mobile phone. A few DVD rippers software can copy protected disks so that you can make discs unrestricted and region-free.

Please note that most of the following programs can rip encrypted DVDs, as long as you have libdvdcss2 installed as described here. Please check the copyright laws for your country regarding the backup of any copyright-protected DVDs and other media.

AcidRip is an automated front end for MPlayer/Mencoder (ripping and encoding DVD tool using mplayer and mencoder) written in Perl, using Gtk2::Perl for a graphical interface. Makes encoding a DVD just one button click! You can install it as follows under Debian / Ubuntu Linux:
$ sudo apt-get install acidrip

Fig.01: Linux Ripping And Encoding DVD's With AcidRip Software Fig.01: Linux Ripping And Encoding DVD's With AcidRip Software


On the Preview tab you can choose to watch a bit of a preview of the resulting movie:
Fig.02: Preview your DVD rip Fig.02: Preview your DVD rip


And when you are ready, click the Start button to rip DVDs.

=> Download acidrip

dvd::rip is a full featured DVD copy program written in Perl i.e. fron end for transcode and ffmpeg. It provides an easy to use but feature-rich Gtk+ GUI to control almost all aspects of the ripping and transcoding process. It uses the widely known video processing swissknife transcode and many other Open Source tools. dvd::rip itself is licensed under GPL / Perl Artistic License. You can install dvd::rip as follows under Debian / Ubuntu Linux:
$ sudo apt-get install dvdrip

Fig.03: dvd::rip in action Fig.03: dvd::rip in action


You need to configure dvd::rip before you actually start a project. See the documentation for more information.

=> Download dvd::rip

HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder, available for MacOS X, Linux and Windows. It can rip from any DVD or Bluray-like source such as VIDEO_TS folder, DVD image, real DVD or bluray (unencrypted -- removal of copy protection is not supported), and some .VOB, .TS and M2TS files. You can install HandBrake under Debian or Ubuntu Linux as follows:
$ sudo apt-get install handbrake-gtk

Fig.04: HandBrake in action Fig.04: HandBrake in action

=> Download HandBrake

K9copy is a KDE DVD Backup tool. It allows the copy of a DVD9 to a DVD5. It is also known as a Linux DVD shrink. It supports the following features:

The video stream is compressed to make the video fiton a 4.7GB recordable DVDDVD BurningCreation of ISO imagesChoosing which audio and subtitle tracks are copied.Title preview (video only)The ability to preserve the original menus.

To install k9copy, enter:
$ sudo apt-get install k9copy

Fig.05: k9copy - Linux dvd shrink in action Fig.05: k9copy - Linux dvd shrink in action

=> Download k9copy

thoggen is a DVD backup utility ('DVD ripper') for Linux, based on GStreamer and Gtk+ toolkit. Thoggen is designed to be easy and straight-forward to use. It attempts to hide the complexity many other transcoding tools expose and tries to offer sensible defaults that work okay for most people most of the time. It support the following features:

Easy to use, with a nice graphical user interface (GUI).Supports title preview, picture cropping, and picture resizing.Language Selection for audio track (no subtitle support yet though).Encodes into Ogg/Theora video.Can encode from local directory with video DVD files.Based on the GStreamer multimedia framework, which makes it fairly easy to add additional encoding formats/codecs in future.

You can install thoggen as follows:
$ sudo apt-get install thoggen

Fig.06: Thoggen in action Fig.06: Thoggen in action

=> Download thoggen

=> You need to install various libraries to use the above mentioned tools such as (yum or apt-get commands will install them automatically for you):

libdvdcss2 - Simple foundation for reading DVDs - runtime libraries.libdvdnav4 - DVD navigation library.libdvdread4 - library for reading DVDs.

=> mencoder - Personally, I use mencoder to rip my DVDs into .avi files as follows:

mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -vf scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o /nas/videos/my-movies/example/track2.avi

Please note that AcidRip, is a graphical frontend for mencoder.

=> VLC - Yes, VLC can rip DVDs too.

=> Transcode is a suite of command line utilities for transcoding video and audio codecs, and for converting between different container formats. Transcode can decode and encode many audio and video formats. Both K9Copy and dvd::rip are a graphical frontend for transcode.

=> Wine - It is an open source software for running Windows applications on other operating systems. You can use popular MS-Windows application such as DVDFab to rip encrypted DVD's and DVD Shrink to shrink them to smaller size. I do not *recommend* and encourage this option as it goes against the FOSS philosophy. The following screenshot based on trial version of DVDFab:

Fig.07: Running DVDFab under Wine v1.2.2 Fig.07: Running DVDFab under Wine v1.2.2

Have a favorite Linux DVD ripper software or ripping tip? Let's hear about it in the comments below.

Top 5 Open Source Linux Server Provisioning Software

Server provisioning is nothing but load the Linux or UNIX like operating systems automatically with actual operating systems, device drivers, data, and make a server ready for network operation without any user input. Typically you select a server from a pool of available servers, load the operating systems (such as RHEL, Fedora, FreeBSD, Debian), and finally customize storage, network (IP, gateway, bounding etc), drivers, applications, users etc. Using the following tools you can perform automated unattended operating system installation, configuration, set virtual machines and much more. These software can be used to install a lot (say thousands) of Linux and UNIX systems at the same time.

From the official Redhat guide:

Many system administrators would prefer to use an automated installation method to install Red Hat / CentOS / Fedora Linux on their machines. To answer this need, Red Hat created the kickstart installation method. Using kickstart, a system administrator can create a single file containing the answers to all the questions that would normally be asked during a typical Red Hat Linux installation. Kickstart provides a way for users to automate a Red Hat Enterprise Linux installation.

Kickstart Configurator allows you to create or modify a kickstart file using a graphical user interface, so that you do not have to remember the correct syntax of the file.

Fig.01: RHEL - Kickstart Configurator Fig.01: RHEL - Kickstart Configurator

FAI is a non-interactive system to install, customize and manage Linux systems and software configurations on computers as well as virtual machines and chroot environments, from small networks to large-scale infrastructures and clusters. It is a tool for fully automatic installation of Debian and other Linux Distributions such as Suse, Redhat, Solaris via network, custom install cd, or into a chroot environment. Some people also use it to install Windows.

Installs and updates Debian, Ubuntu, SuSe, RHEL, CentOS, Fedora, Mandriva, Solaris, etcCentralized deployment and configuration managementIntegrated disaster recovery systemEasy set up of software RAID and LVMInstalls XEN domains, VirtualBox and VserveEvery stage can be customized via hooksFull remote control via ssh during installation

See the official project website and wiki for more information.

Cobbler is a Linux provisioning server that centralizes and simplifies control of services including DHCP, TFTP, and DNS for the purpose of performing network-based operating systems installs. It can be configured for PXE, reinstallations, and virtualized guests using Xen, KVM or VMware. Again it is mainly used by Redhat and friends, but you can configure a PXE server to boot various non-RPM boot images such as Knoppix and other flavors of Debian such as Ubuntu.

There is also a lightweight built-in configuration management system, as well as support for integrating with configuration management systems like Puppet. Cobbler has a command line interface, a web interface, and also several API access options.

Fig.02: Cobbler WebUI (image credit: Fedora project) Fig.02: Cobbler WebUI (image credit: Fedora project)

See the official Cobbler project home page and wiki for more information.

From the official website:

Spacewalk is an open source (GPLv2) Linux systems management solution. It is the upstream community project from which the Red Hat Network Satellite product is derived. Spacewalk manages software content updates for Red Hat derived distributions such as Fedora, CentOS, and Scientific Linux, within your firewall. You can stage software content through different environments, managing the deployment of updates to systems and allowing you to view at which update level any given system is at across your deployment. A clean central web interface allows viewing of systems and their software update status, and initiating update actions.

Inventory your systems (hardware and software information)Install and update software on your systemsCollect and distribute your custom software packages into manageable groupsProvision (kickstart) your systemsManage and deploy configuration files to your systemsMonitor your systemsProvision and start/stop/configure virtual guestsDistribute content across multiple geographical sites in an efficient manner.Fig.03: Spacewalk Server Provisioning System Fig.03: Spacewalk Server Provisioning System

See the official project website for more information.

From the official website:

openQRM is the next generation, open-source Data-center management platform. Its fully pluggable architecture focuses on automatic, rapid- and appliance-based deployment, monitoring, high-availability, cloud computing and especially on supporting and conforming multiple virtualization technologies. openQRM is a single-management console for the complete IT-infra structure and provides a well defined API which can be used to integrate third-party tools as additional plugins.

Complete separation of "hardware" (physical servers and virtual machines) from "software" (server-images)
Support for different virtualization technologiesFully automatic Nagios configuration (single click) to monitor all systems and servicesHigh-availability : "N to 1" fail-over Integrated storage managementDistribution support - openQRM 4.x comes with a solid support for different linux distribution like Debian, Ubuntu, CentOS and openSuse. A single openQRM server can manage the provisioning of servers from those different linux distributions seamlessly.Fig.04: OpenQRM Dashboard Fig.04: OpenQRM Dashboard (image credit: OpenQRM project)

See the official project website for more information.

You can build your own server using PXE, TFTP server, and DHCP software. PXE allows you to boot up a system and have it automatically get an IP address via DHCP and start booting a kernel over the network. See the following articles for more information:

There are many proprietary software solutions available to automate the provisioning of servers, services and end-user devices from vendors such as BladeLogic, IBM, or HP. But open source software gives you more freedom to automate the installation of the Linux server. Some of the above software support UNIX and Windows operating systems too.

I'm wondering if you use Server Provisioning Software regularly. Drop your discussion below and share what works for you in the comments.

Wednesday, May 4, 2011

New tool added - Linux Upstream Tracker


This service is aimed on analyzing of the C and C++ libraries evolution.
It is looking for new releases of various libraries and checking them for backward binary compatibility. The web-service is generally intended for operating system maintainers to help in updating libraries and for software developers interested in ensuring backward binary compatibility of the API.

This service is forced by our QA solutions:

Available resources and services:
Search by name: A portable ascii art GFX libraryA library providing a non-interactive canvas for generating technical drawingsAdvanced Linux Sound ArchitectureAn asynchronous resolver libraryThe official C++ interface for the ATK accessibility toolkit libraryAn open-source molecular builder and visualization toolGPL C++ library for interfacing with the RIM BlackBerry HandheldOfficial Linux Bluetooth protocol stackThe Bonobo Component System for the GNOME Desktop PlatformC library that performs DNS requests and name resolves asynchronouslyAn audio CD reading utility which includes extra data verification featuresC++ library for creating CGI (Common Gateway Interface) programsThe CELT ultra-low delay audio codecA FITS File Subroutine LibraryGPU Shader Authoring Language (NVIDIA)C++ class library for writing CGI applicationsA library for dealing with Microsoft CHM filesAn open source (GPL) anti-virus toolkit for UNIXClassified Advertisements (ClassAds) are the lingua franca of CondorOpen source library for creating fast, compelling, portable, and dynamic graphical user interfacesThe Corosync Cluster Engine is a Group Communication System with additional features for implementing high availability within applicationsNVIDIA’s parallel computing architectureGPU-accelerated linear algebra libraryThe Common UNIX Printing SystemA full featured cross-platform Image LibraryExtensible Binary Meta-LanguageData encode/decode and storage libraryAn MPEG-4 and MPEG-2 AAC encoderC++ wrapper for fam from sgi.famA BSD-licensed C++ forward error correction libraryThe leading audio/video codec libraryAn embeddable cross-platform database engineA world-leading library for the creation and playback of interactive audioFont configuration and customization libraryA Free, High-Quality, and Portable Font EngineAn open source code library for the dynamic creation of images by programmers. GD creates PNG, JPEG and GIF images, among other formatsGeospatial Data Abstraction LibraryA set of database routines that use extensible hashingThe library for image loading and manipulation.A C++ port of the Java Topology Suite (JTS)The GNU internationalisation libraryThe OpenGL Extension Wrangler LibraryGLib provides the fundamental algorithmic language constructs commonly duplicated in applicationsAn implementation of the Unicode Bidirectional Algorithm (bidi)An implementation of Session Initiation Protocol (SIP)An implementation of the Simple Authentication and Security Layer framework and a few common SASL mechanismsThe GNU Transport Layer Security LibraryA C language library that allows to add support for cryptography to a programGeneric Security Service, a free implementation of RFC 2743/2744Implements resource discovery and announcement over SSDPA library for constructing graphs of media-handling componentsA well-groomed and well-maintained collection of GStreamer plug-insThe library for creating graphical user interfacesAn object-oriented open source framework for creating UPnP devices and control pointsA library for storing and managing dataThe Internet Communications EngineProvide Unicode and Globalization support for software applicationsA software suite to create, edit, and compose bitmap imagesThe platform-independent ODBC SDKPortable c++ library easily as Java. Include sockets, threads, io, logger, process management, graphical interface (DirectFB), and more.A library providing serialization and deserialization support for the JavaScript Object Notation (JSON) format described by RFC 4627C++ library to facilitate sending email programmaticallyA set of utilities for managing the key retention facility in the kernelA high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPLSUSv2 interface to Linux kernel asynchronous I/OA cross platform audio libraryAn advanced on screen display (OSD) libraryThe library for high-performance 2D graphicsA Qt library that implements the Open Collaboration Services APIThe Audio File Library handles reading and writing audio files in many common formatsA library to record, convert and stream audio and videoThe industry-standard colour ASCII-art libraryAn implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops, such as GNOMEA library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilitiesThe library is intended to make programming with posix capabilities much easier than the traditional libcap libraryThe Common ISDN Application Programming Interface (CAPI)C library to access data on a CDDB server (freedb.org)The multiprotocol file transfer libraryThe database-independent abstraction layer in CDiscovers, activates, deactivates and displays properties of software RAID sets (eg, ATARAID) and contained DOS partitionsELF object file access libraryA library for support of the Expert Witness Compression Format (EWF)Loki C++ library from Modern C++ DesignA Portable Foreign Function Interface LibraryA simple programming interface for decoding and encoding audio data using the Xiph.org codecs (FLAC, Speex and Vorbis)The GNU project's basic cryptographic libraryA fast, simple, small and flexible user-space graphics libraryA flexible library for input handlingAn ncurses toolkit for creating text-mode graphical user interfaces in a fast and easy wayA small library with error codes and descriptions shared by most GnuPG related softwareA standardized API used to convert between different character encodingsImplementation of the Infinote protocol (infinote.org) written in GObject-based CThe generic API allowing a driver to expose to the user space configuration and statistics specific to common Wireless LANsA library for manipulating JPEG image format filesA high-speed version of libjpegThe Mozilla's C implementation of JavaScript (SpiderMonkey)A JSON reader and writer which is super-effiecient, which runs circles around any other competing JSON engineC++ output stream interface for writing Postscript documents containing any of the world's scripts supported by Unicode 4.0 and by PangoThe runtime library from GNU libtoolAn open source C/C++ client library and tools for the memcached serverA useful collection of routines for programming. Performance and usability-oriented extensions to C.Mozilla's spidermonkey javascript engineThe abstraction layer around libmpdclient. It provides a high level access to MPD.A stable, documented, asynchronous API library for interfacing MPD in the C, C++ and Objective C languagesAn HTTP and WebDAV client library, with a C interfaceA set of co-operative tools that make networking simple and straightforwardA general purpose, double precision, Celestial Mechanics, Astrometry and Astrodynamics libraryA library that implement Microsoft's NTLM authenticationC library to generate ICMP echo requestsLibrary of Optimized Inner Loops (Oil) Runtime Compiler (Orc)Pluggable Authentication Modules for LinuxA system-independent interface for user-level packet captureThe pixel-manipulation library for X and cairoReference library for supporting the Portable Network Graphics (PNG) formatThe command-line option parsing libraryConverts Outlook PST files to mailbox and others formatsThe C library for quantum computing and quantum simulationSample Rate Converter for audioA free package management library, using SAT technology to solve requestsThe Security Enhanced Linux libraryProvides an API for the manipulation of SELinux binary policiesAllows programs to easily modify SELinux policy binariesThe X11 Inter-Client Exchange libraryProviding access to as much BIOS information as possibleA library for reading and writing files containing sampled sound through one standard library interfaceThe HTTP client/server library for GNOMEA small library for rendering Postscript documentsA patent-free audio compression format designed for speechSimple pop3 mail client libraryThe client-side C library implementing the SSH2 protocolThe Flexible Communications FrameworkFree and open video compression formatThe library for manipulating TIFF image format filesProvides a set of functions for accessing the udev database and querying sysfsThe library for writing single instance applicationThe Universal Plug and Play (UPnP) SDK for Linux provides support for building UPnP-compliant control points, devices, and bridges on LinuxThe library to enable user space application programs to communicate with USB devicesGeneral-purpose compressed audio format for mid to high quality audioThe library for importing WordPerfect (tm) documentsA client interface to the X Window SystemThe X11 Cursor management libraryThe X11 miscellaneous extensions libraryThe Xinerama Extension libraryThe C++ wrapper for the libxml XML parser libraryThe X11 toolkit intrinsics libraryThe X Record and X Test extensions libraryX11 XFree86 video mode extension libraryThe C library for reading, creating, and modifying zip archivesA new userspace toolset that provide logical volume management facilities on linuxA high-quality MPEG audio decoderAn embedded SSL and TLS implementation designed for small footprint applications and devicesA scalable, high-performance, open source, document-oriented databaseThe fast and free console based real time MPEG Audio Player for Layer 1, 2 and 3Kernel multi-touch transformation libraryThe MXP library implements the parser for the MUD eXtension protocol. This protocol aims to provide a better experience for MUD playersA very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database serverA C++ wrapper for MySQL’s C APILibrary for developing network-based applicationsThe C++ netCDF DAP2 Client LibraryThe OpenAIS Standards Based Cluster Framework is an OSI Certified implementation of the Service Availability Forum Application Interface Specification (AIS)A cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applicationsA chemical toolbox designed to speak the many languages of chemical dataA library of programming functions for real time computer visionThe OpenLDAP Lightweight Directory Access Protocol APIAn open source PAM library that focuses on simplicity, correctness, and cleanlinessOpen Robotics Automation Virtual EnvironmentA FREE version of the SSH connectivity toolsThe NVIDIA® OptiX™ Ray Tracing EngineOS Abstraction Layer library from NASA/GSFCA system designed to make installing and updating software on your computer easierThe library for layout and rendering of internationalized textPerl Compatible Regular ExpressionsA multimedia API for KDE developersCross-platform software package for creating scientific plotsC++ class libraries that simplify and accelerate the development of network-centric, portable applications in C++An application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processesA PDF rendering library based on the xpdf-3.0 code basePortable Cross-Platform Audio I/O LibraryA powerful, open source object-relational database systemAn intelligent predictive text entry systemCartographic Projections LibraryA Qt Cryptographic ArchitectureA qt-based library that maps JSON data to QVariant objectsA collection of APIs and frameworksCross-platform application and UI frameworkC library to communicate with network devices by MikroTik running their Linux-based operating system RouterOSA library for performing atomic creation and replacement of filesThe SceniX scene management engineA cross-platform implementation of the Dirac video compression specification as a C libraryThe main core of the Spatial DBMS engineIntel® Threading Building BlocksA port of Suns Transport-Independent RPC library to LinuxA graphical user interface toolkitAn open source project that implements the ODBC APIAn implementation of the GEIS (Gesture Engine Interface and Support) interfaceGesture Recognition And Instantiation LibraryGoogle's open source JavaScript engineVideo Decode and Presentation API for UnixThe X C-language Bindings libraryThe Xen® hypervisor, the powerful open source industry standard for virtualizationA fast, flexible and reliable cross-platform database engine derived from FLAIMA modular implementation of XML-RPC for C and C++The Xvid video codec implements MPEG-4 Simple Profile and Advanced Simple Profile standardsThe zlib compression and decompression libraryTimeline of unintentional ABI breaks

Tuesday, March 1, 2011

4G base-station on a chip runs Linux

4G base-station on a chip runs Linux
By Eric Brown
2011-02-16

Article Rating:starstarstarstarstar / 2


Freescale Semiconductor announced a Linux-ready system-on-chip family for femtocell and picocell 4G base stations. The QorIQ Qonverge SoCs combine a Power-PC core for the PSC9130/31 femtocell version -- or dual cores for the PSC9132 picocell model -- as well as one or two Freescale StarCore DSP cores, a Maple baseband accelerator, and other accelerators that create a scalable "base station-on-chip."

QorIQ Qonverge is billed as the "first scalable family of products sharing the same architecture to address multi-standard requirements spanning from small to large cells."

By integrating communications processing, digital signal processing, and wireless acceleration technologies on a single SoC, QorIQ Qonverge avoids the cost and complexity of integrating separate FPGAs, ASICs, DSPs, and CPUs on a single device, while also reducing power consumption and footprint, says the company.

Compared to discrete silicon based products, the SoCs can provide 4x cost reduction and 3x power reduction for LTE + WCDMA macro base stations, and 4x cost and power reductions for LTE + WCDMA pico base stations, claims Freescale. QorIQ Qonverge is said to support GSM, LTE FDD & TDD, LTE-Advanced, HSPA+, TD-SCDMA, and WiMAX cellular standards.


Simplified QorIQ Qonverge architecture

QorIQ Qonverge combines one or more e500 Power Architecture (PowerPC) cores, along with one or more Freescale StarCore DSPs for signal processing, a Freescale Maple multimode baseband accelerator, plus a security accelerator and packet processing acceleration engines, says Freescale. These are all connected via an interconnect fabric, and enhanced with "next-node process technology," says the company.

According to Preet Virk, Global Networking Segment Marketing Lead at Freescale, the processors are related to the company's QorIQ processors, sharing the same e500 cores and offering other similarities. However, the QoriQ processors, which have often been deployed in base station designs along with Freescale's StarCore and Maple baseband chips, needed to be redesigned for this application, said Virk in a recent interview briefing with LinuxDevices. As a result, the Qonverge is not hardware-compatible with previous QorIQ designs, he said.

"This level of integration requires systematic thinking and engagement at the systems level," said Virk. "It took a lot of R&D to pull it together -- each fundamental IP block had to be optimized."

According to Virk, QorIQ Qonverge is "the first comprehensive platform to support multiple 4G standards and different cell sizes." Virk added, "It's truly a base station on a chip."

In order to support all those standards,  Freescale is "working with partners to put logic on-chip to create a glueless interface to various types of radios," said Virk. To ensure various radio-optimized versions are developed quickly, meanwhile, Freescale established an "open ecosystem" with its partners. "All internal silicon level hooks are presented with an API to our partners at the same time as they are to our internal tools team," said Virk.

Four different QorIQ Qonverge products

The QorIQ Qonverge portfolio includes four products optimized for small cell (femto and pico) and large cell (metro and macro) applications, says Freesacle. QorIQ Qonverge is also said to support remote radio head and emerging cloud-based radio access network (C-RAN) configurations.

The first two products -- the PSC9130/PSC9131 femto SoCs and the PSC9132 picocell/enterprise SoC -- use 45nm process technology and should be available in the second half of 2011, says Freescale. The company plans to introduce metro and macro versions of QorIQ Converge for larger base stations later this year using 28nm technology, with shipments occurring after that.


QorIQ Qonverge PSC9130/31 block diagram

The PSC9130/31 SoCs support 8-16 user femotcell base stations using WCDMA, LTE, or CDMA2K technology. The SoCs support 3G-LTE at up to 100Mbps downloads and50Mbps uploads, HSPA+ at 42Mbps/11Mbps, and also offer CDMAx support, says Freescale.

The PSC9130/31 models each combine a single e500 core, StarCore SC3850 DSP, Maple B2P accelerator, and a security engine connected by a multicore fabric, says the company. The SoCs are said to support simultaneous multimode and 2x2 MiMO, and offer a single 64-bit DDR3 memory channel, security and trust architecture, multiple timing sources, and an antenna interface.

Touted Maple baseband features include Turbo/Viterbi decoding, Turbo encoding with rate match, Fourier transform acceleration, and chip-rate acceleration. Peripheral support includes Ethernet and USB 2.0 support, as shown in the diagram above. The difference between the 30 and 31 models, however, is not clear.


QorIQ Qonverge PSC9132 block diagram

The Picocell-oriented PSC9132, meanwhile, supports 32-64 users on WCDMA or LTE picocell or enterprise base stations. The PSC9132 supports 3G-LTE at 150Mbps/75Mbps, dual-carrier HSPA+ at 42Mbps/11Mbps, and WiMAX 802.16e at 50Mbps/13Mbps, claims Freescale.

The PSC9132 doubles up with dual e500 and StarCore SC3850 cores, and the Maple accelerator also adds MiMo equalization in addition to the features listed above for the PSC9130/31, says the company.

Other touted features are similar, with the exception that the SoC moves up to 2x4 MiMO support, offers dual DDR3 channels instead of one, and supplies both local and remote antenna interfaces. Additional interfaces are also supplied, including PCIe expansion.

Mentor Graphics to offer Linux support

Both the PSC9130/31 and PSC9132 will ship with L1 and reference, as well as L2 through L4 software, says Freescale. A development platform based on the QorIQ P2020-MSC8156 AMC is available, bundled with partner software and RF solutions, says the company.

Mentor Graphics will be handling the Linux BSP, said Virk. The company last April signed a partnership deal with Freescale involving Linux support for QorIQ processors with a version of its Development System for Linux toolsuite. In December, Mentor Graphics acquired all the substantial assets of CodeSourcery, including its Sourcery G++ GNU toolchain.

Meanwhile, Green Hills and others will support various other real-time operating systems (RTOSes). Freescale also provides a portfolio of GaAs MMICs and LDMOS RF solutions that can be integrated into QorIQ Qonverge pico and femto cell base-station designs, says the company.

Customers can also combine their own differentiated IP with off-the-shelf components from Freescale and ecosystem partners. Integrated tools include Freescale?s CodeWarrior and VortiQa software.

In addition to the following Mentor Graphics quote, testimonials supporting QorIQ Qonverge were posted by Freescale from customers Alcatel-Lucent and Airvana, analyst Will Strauss of Forward Concepts, as well as software ecosystem partners Continuous Computing, Critical Blue, Enea, Green Hills, L&T Infotech, Signalion, and Tata-Elxsi.

Stated Glenn Perry, general manager of the Mentor Graphics Embedded Software Division, "The integration of StarCore DSP technology with Power Architecture cores in the new Freescale QorIQ Qonverge portfolio is a major advancement for the wireless industry. The Mentor Embedded Linux platform for Freescale devices combined with CodeSourcery software development tools will enable our mutual customers to develop advanced, innovative and scalable systems with increased performance and power efficiency.""

Availability

The QorIQ Qonverge PSC9130/PSC9131 (femto) and PSC9132 (picocell/enterprise) SoCs should be available in the second half of 2011, says Freescale. The metro and macro versions of QorIQ Qonverge for larger base stations will be announced later this year using 28nm technology, with shipments occurring sometime after that. More information may be found on Freescale's QorIQ Qonverge page.

Related Stories:






FUEL Database on MontaVista Linux
Whether building a mobile handset, a car navigation system, a package tracking device, or a home entertainment console, developers need capable software systems, including an operating system, development tools, and supporting libraries, to gain maximum benefit from their hardware platform and to meet aggressive time-to-market goals.

Breaking New Ground: The Evolution of Linux Clustering
With a platform comprising a complete Linux distribution, enhanced for clustering, and tailored for HPC, Penguin Computing?s Scyld Software provides the building blocks for organizations from enterprises to workgroups to deploy, manage, and maintain Linux clusters, regardless of their size.

Data Monitoring with NightStar LX
Unlike ordinary debuggers, NightStar LX doesn?t leave you stranded in the dark. It?s more than just a debugger, it?s a whole suite of integrated diagnostic tools designed for time-critical Linux applications to reduce test time, increase productivity and lower costs. You can debug, monitor, analyze and tune with minimal intrusion, so you see real execution behavior. And that?s positively illuminating.

Virtualizing Service Provider Networks with Vyatta
This paper highlights Vyatta's unique ability to virtualize networking functions using Vyatta's secure routing software in service provider environments.

High Availability Messaging Solution Using AXIGEN, Heartbeat and DRBD
This white paper discusses a high-availability messaging solution relying on the AXIGEN Mail Server, Heartbeat and DRBD. Solution architecture and implementation, as well as benefits of using AXIGEN for this setup are all presented in detail.

Understanding the Financial Benefits of Open Source
Will open source pay off? Open source is becoming standard within enterprises, often because of cost savings. Find out how much of a financial impact it can have on your organization. Get this methodology and calculator now, compliments of JBoss.

Embedded Hardware and OS Technology Empower PC-Based Platforms
The modern embedded computer is the jack of all trades appearing in many forms.

Data Management for Real-Time Distributed Systems
This paper provides an overview of the network-centric computing model, data distribution services, and distributed data management. It then describes how the SkyBoard integration and synchronization service, coupled with an implementation of the OMG?s Data Distribution Service (DDS) standard, can be used to create an efficient data distribution, storage, and retrieval system.

7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

Monday, February 28, 2011

Embedded Linux file system rev'd for performance

The Reliance Nitro SDK for Linux 2.0 is the latest in a number of Linux-compatible file system products from Datalight, including the Datalight Flash File System announced in early 2008. That product combined the Linux version of the Reliance file system with DataLight's FlashFX Pro flash media manager and block device driver, an earlier version of the FlashFX Tera software mentioned farther below.

The new Reliance Nitro 2.0 SDK offers tools to validate hardware, including DCLTest, DevIOTest, and RelTest, says Datalight. Performance testing tools include FSIOTest and FSStressTest, while other tools help perform standard file system preparation activities such as formatting (relFsVolFormat) and integrity checking (relFsChk), says the company.


Reliance Nitro's platform-independent FSIOTest and FSStressTest performance and reliability testing utilities, meanwhile, are said to be compatible with any file system. Also included is a Reliance Nitro Windows Driver "for seamlessly moving data between a Linux system and a Windows XP, Windows Vista, or Windows 7-based system," says Datalight.


Reliance Nitro's tree-based architecture


Touted for providing faster performance and boot times, Reliance Nitro uses a tree-based metadata and "transactional extent-based" architecture. The architecture integrates a system of configurable transaction settings dubbed "Dynamic Transaction Point," claimed to balance performance with the amount of at-risk user data, says Datalight. It also provides immunity from file corruption, even after unexpected system interruption, claims the company.

The Reliance Nitro architecture is compatible with "virtually any storage medium," and maintains efficiency "whether an OEM is designing with hardware-managed or software-managed storage media," says Datalight.


Reliance Nitro can be used in combination with Datalight's Linux-compatible FlashFX Tera flash media manager for a complete flash memory based file system solution, says the company. FlashFX Tera supports over 300 flash parts, including MLC, and works with virtually any NAND controller, says the company. The software is also said to feature wear leveling, bad block management, and background compaction.


Stated Datalight VP of Engineering Ken Whitaker, "With Reliance Nitro 2.0, OEMs using Linux no longer have to choose between performance, reliability, a full set of tools and professional support."


Availability


The Reliance Nitro SDK for Linux 2.0 is available now at an undisclosed price. More information, including a number of videos, may be found at Datalight's Reliance Nitro page.

Related Stories:







FUEL Database on MontaVista Linux
Whether building a mobile handset, a car navigation system, a package tracking device, or a home entertainment console, developers need capable software systems, including an operating system, development tools, and supporting libraries, to gain maximum benefit from their hardware platform and to meet aggressive time-to-market goals.


Breaking New Ground: The Evolution of Linux Clustering
With a platform comprising a complete Linux distribution, enhanced for clustering, and tailored for HPC, Penguin Computing?s Scyld Software provides the building blocks for organizations from enterprises to workgroups to deploy, manage, and maintain Linux clusters, regardless of their size.


Data Monitoring with NightStar LX
Unlike ordinary debuggers, NightStar LX doesn?t leave you stranded in the dark. It?s more than just a debugger, it?s a whole suite of integrated diagnostic tools designed for time-critical Linux applications to reduce test time, increase productivity and lower costs. You can debug, monitor, analyze and tune with minimal intrusion, so you see real execution behavior. And that?s positively illuminating.


Virtualizing Service Provider Networks with Vyatta
This paper highlights Vyatta's unique ability to virtualize networking functions using Vyatta's secure routing software in service provider environments.


High Availability Messaging Solution Using AXIGEN, Heartbeat and DRBD
This white paper discusses a high-availability messaging solution relying on the AXIGEN Mail Server, Heartbeat and DRBD. Solution architecture and implementation, as well as benefits of using AXIGEN for this setup are all presented in detail.


Understanding the Financial Benefits of Open Source
Will open source pay off? Open source is becoming standard within enterprises, often because of cost savings. Find out how much of a financial impact it can have on your organization. Get this methodology and calculator now, compliments of JBoss.


Embedded Hardware and OS Technology Empower PC-Based Platforms
The modern embedded computer is the jack of all trades appearing in many forms.


Data Management for Real-Time Distributed Systems
This paper provides an overview of the network-centric computing model, data distribution services, and distributed data management. It then describes how the SkyBoard integration and synchronization service, coupled with an implementation of the OMG?s Data Distribution Service (DDS) standard, can be used to create an efficient data distribution, storage, and retrieval system.


7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

Thursday, February 17, 2011

Puppet 2.6.2 on SLES SUSE Linux Enterprise

If you’re a puppet user and running SLES and have been looking for the latest version shipped via an RPM, then you’re in luck. I’ve been building packages recently for SLES and openSUSE with the recent releases of Puppet because in my organization I’ve implemented puppet to handle configurations (of sorts) for many of my servers (currently development).


You can get the latest packages using the openSUSE BuildServer in my repository, which can be found:
http://download.opensuse.org/repositories/home:/eclipseagent:/puppet/


Linux Kernel 2.6.30+ RDS Vulnerability

Blue Security LockRecently it was reported by VSR Security that Linux Kernel versions 2.6.30+ are affected by an exploit due to the implementation of RDS (Reliable Datagram Sockets).


Linus Torvalds has committed a patch upstream to close the exploit. VSR Security has released a proof-of-concept exploit, to show the severity of the exploit.


You can compile the exploit using:
gcc linux-rds-exploit.c -o CVE-2010-3904-exploit


Upon running the binary on an affected machine, you’ll get:



[*] Linux kernel >= 2.6.30 RDS socket exploit
[*] by Dan Rosenberg
[*] Resolving kernel addresses…
[+] Resolved rds_proto_ops to 0xf7f577b0
[+] Resolved rds_ioctl to 0xf7f52000
[+] Resolved commit_creds to 0xc04596eb
[+] Resolved prepare_kernel_cred to 0xc04595e9
[*] Overwriting function pointer…
[*] Triggering payload…
[*] Restoring function pointer…
[*] Got root!
sh-4.1#


For your machine to be affected you need to have to be loaded. Which can be checked with:
lsmod | grep rds
Which would return:
sh-4.1# lsmod | grep rds
rds 52948 4


If your machine is not affect the run of the above binary would result in a message like so:



[*] Linux kernel >= 2.6.30 RDS socket exploit
[*] by Dan Rosenberg
[*] Could not open socket.


Wednesday, September 15, 2010

11 reasons to switch to Linux

linux, posted: 4-Feb-2009 09:24

People like to publish top-10 lists of all sorts. And "reasons to switch to Linux" is no exception. Many of those have been published, and the latest entry is here. However, I think the author completely forgot a very important point. Also, some of the points he makes should be examined a bit more closely and critically. The comments on the original article reflect some valid and some unfounded criticism. Let me just run through those points (italics are quotes from the original 10-point list, m(read the entire post)...

Permalink to

A Linux distro for Cuba

linux, posted: 12-Feb-2009 11:35

Cuba has presented its own Linux distro, called Nova. Some of the argumentation laid out by the Cuban officials is very good:
...Nova was introduced at a Havana computer conference on "technological sovereignty" and is central to the Cuban government's desire to replace the Microsoft software running most of the island's computers....
Unlike Microsoft, Linux is free and has open access that allows users to modify its code to fit their needs. "Private software can have black holes and(read the entire post)...

Permalink to