Wednesday, May 03, 2006
Tuesday, April 18, 2006
How Microsoft lost the API war
Came across this very interesting (perceptive) article when searching for something else.
http://www.joelonsoftware.com/articles/APIWar.html
http://www.joelonsoftware.com/articles/APIWar.html
Tuesday, April 04, 2006
Mounting NTFS partition linux
usually the following line in /etc/fstab should do the trick
/dev/hda2 /winc ntfs ro,users 0 0
and then a mount /winc
I had a problem wherein root could do a ls /winc and view contents of the NTFS directory whereas normal users couldnt. This was solved by doing the following
/dev/hda2 /winc ntfs ro,users,umask=000 0 0
Aside: This looks like a very good site for more info about NTFS operations in linux
/dev/hda2 /winc ntfs ro,users 0 0
and then a mount /winc
I had a problem wherein root could do a ls /winc and view contents of the NTFS directory whereas normal users couldnt. This was solved by doing the following
/dev/hda2 /winc ntfs ro,users,umask=000 0 0
Aside: This looks like a very good site for more info about NTFS operations in linux
Thursday, March 30, 2006
hotplug usermap file format
A sample file is here.
# script match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi
# bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass
# bInterfaceSubClass bInterfaceProtocol driver_info
perf 0x0003 0x04b4 0x8613 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
perf 0x0003 0x06cd 0x010b 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
match_flags tells the hotplug usb agent what to match for to
run the script.
match_flags for the various fields are
idVendor:0x0001
idProduct:0x0002
bcdDevice_lo:0x0004
and so on
so if I needed to match the idVendor & idProduct only with
what is there match_flags needs to be 0x0001 + 0x0002 = 0x0003
So if the necessary fields match the script named "perf"
will be called.
DMA for HDD
hdparm -i /dev/hda
check the dma line and make sure that DMA is on. If not try setting it to DMA by doing
hdparm -d1 /dev/hda
If that doesn't work it is probably because the driver that controls IDE chipset(which accesses the HDD) is probably the generic IDE driver. Find out the IDE chipset details and try to compile the driver into the kernel(not as a module). Having DMA is the like the difference between night and day. KDE startups and runs smoother. Video capturing works like a charm without dropping frames.....
check the dma line and make sure that DMA is on. If not try setting it to DMA by doing
hdparm -d1 /dev/hda
If that doesn't work it is probably because the driver that controls IDE chipset(which accesses the HDD) is probably the generic IDE driver. Find out the IDE chipset details and try to compile the driver into the kernel(not as a module). Having DMA is the like the difference between night and day. KDE startups and runs smoother. Video capturing works like a charm without dropping frames.....
Wednesday, March 29, 2006
NTP time synchronization debian
apt-get install ntp-server ntpdate
ntpdate can set the current time based on information from NTP servers. ntp-server actually syncronizes the current clock with other NTP servers.
ntpdate can set the current time based on information from NTP servers. ntp-server actually syncronizes the current clock with other NTP servers.
Dell Axim X30 sync in Debian
apt-get install synce-kde synce-serial synce-dccm
Download the kernel driver from http://synce.sourceforge.net/tmp/kernel-2.6-driver.tar.gz
as non-root
tar zxvf kernel-2.6-driver.tar.gz
edit the Makefile and change
LINUX_SOURCE_PATH := /usr/src/linux-$(shell uname -r)
to
LINUX_SOURCE_PATH := /usr/src/kernel-source-$(shell uname -r)
make
(root)
make install
modprobe ipaq.ko
Download the kernel driver from http://synce.sourceforge.net/tmp/kernel-2.6-driver.tar.gz
as non-root
tar zxvf kernel-2.6-driver.tar.gz
edit the Makefile and change
LINUX_SOURCE_PATH := /usr/src/linux-$(shell uname -r)
to
LINUX_SOURCE_PATH := /usr/src/kernel-source-$(shell uname -r)
make
(root)
make install
modprobe ipaq.ko
Saturday, March 25, 2006
Getting sound to work on debian
I had installed alsa but on doing a alsaconf I found that the sound card wasnt being detected. lspci had listed the card as unknown. Looking up the vendor/card id database online I found the card description which I used for looking up the sound card list at http://www.alsa-project.org/ . This was listed with some special compilation instructions. So I downloaded the lasted driver(1.0.10) from the website and did the following
cd /usr/src
mkdir alsa
cd alsa
cp /downloads/alsa-*
bunzip2 alsa-driver-1.0.10
tar -xf alsa-driver-1.0.10
cd alsa-driver-1.0.10
./configure --with-cards=hda-intel --with-sequencer=yes;make;make install
Then running alsaconf it detected the card and configured it. A final word on permissions. The alsa driver creates /dev/dsp and /dev/sequencer but the files have permission 660(rw-rw---)
which means that normal users cannot access it. The user needs to be added to the 'audio' group for sound to work. This is done by logging in as root and doing
gpasswd -auser-name audio
cd /usr/src
mkdir alsa
cd alsa
cp /downloads/alsa-*
bunzip2 alsa-driver-1.0.10
tar -xf alsa-driver-1.0.10
cd alsa-driver-1.0.10
./configure --with-cards=hda-intel --with-sequencer=yes;make;make install
Then running alsaconf it detected the card and configured it. A final word on permissions. The alsa driver creates /dev/dsp and /dev/sequencer but the files have permission 660(rw-rw---)
which means that normal users cannot access it. The user needs to be added to the 'audio' group for sound to work. This is done by logging in as root and doing
gpasswd -a
Friday, March 24, 2006
Compiling kernel in debian
cd /usr/src/kernel-src-2.6.8
make-kpkg --rev Custom.1 kernel_image
this will create a kernel-src-2.6.8-Custom.1-386.deb. To install the kernel
dpkg --install /usr/src/kernel-src-2.6.8-Custom.1-386.deb
See that there are atleast two kernels present. One the original one which came with the distro and the new one that we have just installed. The original one can be used if the new one doesn't boot for some matter. Reboot. If the kernel doesnt boot, boot into the original kernel and then
cd /boot
mkinitrd -o initrd.img-2.6.8-386 2.6.8
add the following line in /boot/grub/menu.lst
initrd /initrd.img-2.6.8-386
just after
kernel /vmlinuz-2.6.8 root=/dev/hdaX ro
This might solve the problem. Even if there is no problem I find that having the initrd seems to help. I found that when making minor changes to drivers make-kpkg wasnt building the code and packing the modules. so I had to do a "make" before make-kpkg. Usually make-kpkg takes a long time only the first time. After that it is decently fast.
make-kpkg --rev Custom.1 kernel_image
this will create a kernel-src-2.6.8-Custom.1-386.deb. To install the kernel
dpkg --install /usr/src/kernel-src-2.6.8-Custom.1-386.deb
See that there are atleast two kernels present. One the original one which came with the distro and the new one that we have just installed. The original one can be used if the new one doesn't boot for some matter. Reboot. If the kernel doesnt boot, boot into the original kernel and then
cd /boot
mkinitrd -o initrd.img-2.6.8-386 2.6.8
add the following line in /boot/grub/menu.lst
initrd /initrd.img-2.6.8-386
just after
kernel /vmlinuz-2.6.8 root=/dev/hdaX ro
This might solve the problem. Even if there is no problem I find that having the initrd seems to help. I found that when making minor changes to drivers make-kpkg wasnt building the code and packing the modules. so I had to do a "make" before make-kpkg. Usually make-kpkg takes a long time only the first time. After that it is decently fast.
ieee 1394 capturing with kino in debian
modprobe raw1394
modprobe dv1394
check if /dev/raw1394 and /dev/dv1394 files exist. If no create them as follows
mknod -m 666 /dev/raw1394 c 171 0
mknod -m 666 /dev/dv1394 c 171 32
start up kino. Goto Edit ---> Preferences --> IEEE 1394
In DV Capture
Select dv1394 for driver and /dev/dv1394
modprobe dv1394
check if /dev/raw1394 and /dev/dv1394 files exist. If no create them as follows
mknod -m 666 /dev/raw1394 c 171 0
mknod -m 666 /dev/dv1394 c 171 32
start up kino. Goto Edit ---> Preferences --> IEEE 1394
In DV Capture
Select dv1394 for driver and /dev/dv1394