Category: Laptop


sqlplus and rlwrap

By default in sqlplus , you can not use special keystrokes such Ctrl-R to look for previous typed SQL requests.

Within Debian, there is a package named rlwrap, which gives you the features that sqlplus does not have.

To install it :

root@localhost:~# apt-get install rlwrap

To use it  as a non-root user, add an alias to your .bashrc file  : alias sqlplus=’rlwrap sqlplus’

fool@localhost:~$ source .bashrc

And then, sqlplus is again available with new features.

I am not able to see the content of my MP3 player. (MPMAN TK250)
When I connect it to my PC, here is the output I get from /var/log/syslog :

fool@localhost:~$ tail -f /var/log/syslog

usb 1-4: new high speed USB device using ehci_hcd and address 19
kernel: [34983.036040] usb 1-4: new high speed USB device using ehci_hcd and address 20
kernel: [34983.556034] usb 1-4: new high speed USB device using ehci_hcd and address 21
kernel: [34984.100043] usb 1-4: new high speed USB device using ehci_hcd and address 22
kernel: [34984.988039] usb 2-2: new full speed USB device using ohci_hcd and address 6
kernel: [34985.031471] usb 2-2: New USB device found, idVendor=1cae, idProduct=4efc
kernel: [34985.031479] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: [34985.031484] usb 2-2: Product: TK250
kernel: [34985.031487] usb 2-2: Manufacturer: RockChip
kernel: [34985.031491] usb 2-2: SerialNumber: USBV1.00
kernel: [34985.031669] usb 2-2: configuration #1 chosen from 1 choice
kernel: [34985.035532] scsi4 : SCSI emulation for USB Mass Storage devices
kernel: [34985.041634] usb-storage: device found at 6
kernel: [34985.041639] usb-storage: waiting for device to settle before scanning
kernel: [34990.041679] usb-storage: device scan complete
kernel: [34990.048284] scsi 4:0:0:0: Direct-Access     TK250                     1.00 PQ: 0 ANSI: 0
kernel: [34990.093337] sd 4:0:0:0: [sda] 15941632 512-byte hardware sectors: (8.16 GB/7.60 GiB)
kernel: [34990.276034] usb 2-2: reset full speed USB device using ohci_hcd and address 6
kernel: [34990.344354] sd 4:0:0:0: [sda] Test WP failed, assume Write Enabled
kernel: [34990.366530] sd 4:0:0:0: [sda] Attached SCSI removable disk
kernel: [34993.321810] sd 4:0:0:0: [sda] 15941632 512-byte hardware sectors: (8.16 GB/7.60 GiB)
kernel: [34993.504035] usb 2-2: reset full speed USB device using ohci_hcd and address 6
kernel: [34993.572858] sd 4:0:0:0: [sda] Test WP failed, assume Write Enabled
kernel: [34993.594861] sda: detected capacity change from 8162115584 to 0
kernel: [34995.323160] sd 4:0:0:0: [sda] 15941632 512-byte hardware sectors: (8.16 GB/7.60 GiB)
kernel: [34995.504043] usb 2-2: reset full speed USB device using ohci_hcd and address 6
kernel: [34995.572180] sd 4:0:0:0: [sda] Test WP failed, assume Write Enabled

Here is what lsusb gives :

root@localhost:~# lsusb

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 1cae:4efc
Bus 002 Device 002: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

uname -r : 2.6.30-2-686

With modinfo , you can check the parameters available for a given module.

root@localhost:~# modinfo scsi_mod

modinfo scsi_mod
filename:       /lib/modules/2.6.30-2-686/kernel/drivers/scsi/scsi_mod.ko
license:        GPL
description:    SCSI core
depends:
vermagic:       2.6.30-2-686 SMP mod_unload modversions 686
parm:           dev_flags:Given scsi_dev_flags=vendor:model:flags[,v:m:f] add black/white list entries for vendor and model with an integer value of flags to the scsi device info list (string)
parm:           default_dev_flags:scsi default device flag integer value (int)
parm:           max_luns:last scsi LUN (should be between 1 and 2^32-1) (uint)
parm:           scan:sync, async or none (string)
parm:           max_report_luns:REPORT LUNS maximum number of LUNS received (should be between 1 and 16384) (uint)
parm:           inq_timeout:Timeout (in seconds) waiting for devices to answer INQUIRY. Default is 5. Some non-compliant devices need more. (uint)
parm:           scsi_logging_level:a bit mask of logging levels (int)

All the lines beginning with “parm” are all the parameters available.
I created a file in which I put the following lines (as a matter of test) :

options scsi_mod maxluns=254
options scsi_mod scan=sync
options scsi_mod inq_timeout=10

This file, named module_scsi_mod.conf, is located in /etc/modprobe.d.
To take it into account, relaunch udev :

root@localhost:~# service udev restart

The problem still remains.

I have looked through the web for tips, some troubleshooting but nothing interesting.
If you have any ideas, feel free to post your comments here.

While upgrading VirtualBox to the lastest version (3.0.12) available in Debian repositories (for squeeze), I discovered that the modules needed for VirtualBox to work were compiled on the fly. An unknown process did the job for me : DKMS.

Until very recently, I had to compile myself the source of the following modules : vboxdrv and vboxnetflt

The compilation process was made with module-assistant.

Then, I had to load myself the new modules :

root@localhost:~# modprobe vboxdrv

root@localhost:~# modprobe vboxnetflt

Since the version 3.0 of VirtualBox, its installation has changed a bit.

Manual compilation is no more needed. This job is henceforth done by DKMS.

DKMS stands for Dynamic Kernel Module Support Framework.

Some programs need extra modules to work. These can be already compiled and included in a dedicated Debian package and possibly be loaded at boot time or manually loaded during an user session.

If you want VirtualBox to run properly, the following modules must exist and be loaded :

vboxnetflt, vboxnetadp and vboxdrv

These modules are compiled at boot time by a DKMS process if there are not already present. Then they are automatically loaded.

Before launching VirtualBox, check whether they are here or not :

root@localhost:~# lsmod |grep vbox
vboxnetflt             72328  0
vboxnetadp             66864  0
vboxdrv               102576  1 vboxnetflt


For further technical information about DKMS, please visit the following websites :


http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support

Dell and DKMS

Most is a pager very similar to less and more.
It does the same job except that it displays the content of files in a colourized way.
Reading man pages is then more pleasant.

To install it :

root@localhost:~# apt-get install most

To make most as the default pager for all your system :

root@localhost~# update-alternatives –config pager
There are 6 choices for the alternative pager (providing /usr/bin/pager).

Selection    Path            Priority   Status
————————————————————
0            /bin/less        77        auto mode
1            /bin/less        77        manual mode
2            /bin/more        50        manual mode
*  3            /usr/bin/less    77        manual mode
4            /usr/bin/most    60        manual mode
5            /usr/bin/pg      10        manual mode
6            /usr/bin/w3m     25        manual mode

Press enter to keep the current choice[*], or type selection number: 4

And then, here is the result :

root@localhost:~# update-alternatives –display pager

pager – manual mode
link currently points to /usr/bin/most

/bin/less – priority 77
slave pager.1.gz: /usr/share/man/man1/less.1.gz
/bin/more – priority 50
slave pager.1.gz: /usr/share/man/man1/more.1.gz
/usr/bin/less – priority 77
slave pager.1.gz: /usr/share/man/man1/less.1.gz
/usr/bin/most – priority 60
slave pager.1.gz: /usr/share/man/man1/most.1.gz
/usr/bin/pg – priority 10
slave pager.1.gz: /usr/share/man/man1/pg.1.gz
/usr/bin/w3m – priority 25
slave pager.1.gz: /usr/share/man/man1/w3m.1.gz
Current `best’ version is /bin/less.

I have recently installed the latest stable Debian on a new Toshiba Satellite L300 – 251 laptop.

Until now, everything was running well except the wifi PCI card. This one is detected and the right module ath5k is loaded. Here is what lspci -k gives :

03:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
Kernel driver in use: ath5k
Kernel modules: ath5k

Unfortunately, I was unable to see which wireless networks were around me. Each time I issued the command iwlist wlan0 scan, I received this error : wlan0  No scan results.

After looking at Debian official wiki, I did find the right solution to my problem : upgrading my current kernel to a more recent one.

In the official Debian repositories for the stable version, the most recent version for a kernel image is 2.6.26-2.  Fortunately, we can get a very recent kernel from the Debian backports repositories : 2.6.30-bpo.2

After issuing the following command apt-get install linux-image-2.6.30-bpo.2-686, you will have to reboot with this kernel. Otherwise, your problem will remain. The version of the ath5k module is much more recent than the one loaded by default after my initial Debian setup. Do not forget to possibly modify your Grub file to boot on the new installed kernel or to make it as the default one at boot time.

For more informations on this module :

ath5k module in Debian

Nota Bene : Last but not least, do not forget  to switch on your wifi card or you will get my initial error message !

Follow

Get every new post delivered to your Inbox.