Jul 29, 2008

Applications menu not working in Ubuntu

This was the problem faced by Sanaklp, one of my friend. He was trying to install some apps via apt-get. during the installation he was warned about for no space in root partition. Somehow the system was working fine even after all this. But once he rebooted his system, he couldnt see any sub-menu under "Applications" menu. At the moment i reached there and he asked me to resolve the problem.

I thought that some configuration associated with the menu must be wrong and I was right. I just deleted the config file at /home//.config/menus/applications.menu.

$ rm /home/<username>/.config/menus/applications.menu

What happens after you delete this file is the system assumes your menu to be same as the default. Whenever you change the menu (Right click and "Edit Menus"), the system will again generate the file which you deleted earlier.

Relogin and your system must be fine now.

Jul 22, 2008

NETDEV WATCHDOG: eth0: transmit timed out

NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timeout, status 00000004 00000249

This was the error that i got in my kernel log message.

I was unable to use internet in my laptop "MS 1006". I tried setting up the network in either way (dhcp and static) but non of these solved the problem. I got terribly wired, as i could see no other message beside "destination host unreachable" and waiting for never offering, DHCP.

I even wasted 2 days and even googled for many keywords. But i couldnt get the solution. But finally the end of the second day was fruitful. I solved it.

This was due to the interrupt conflict that occured between the acpi and network modules.
I turned off acpi while booting by adding following words at the end of the boot option.


title Ubuntu 8.04, kernel 2.6.24-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=e89b77d0-3183-4036-b508-15d9a23dc86c ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic


title Ubuntu 8.04, kernel 2.6.24-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=e89b77d0-3183-4036-b508-15d9a23dc86c acpi=off ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic

Enjoy the net.


  1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/183588

  2. http://bugzilla.kernel.org/show_bug.cgi?id=7595

Jul 17, 2008

Solve [mount_point cannot contain the following characters: newline, G_DIR_SEPARATOR (usually /)]

I recently suffered from this problem. I googled it and finally solved it.
This is a bug filed here.

I specified the mount point like "sata/160GB", expecting it to mount the device in "/media/sata/160GB". But the problem started here. The system expects only a word here with no slashes(/) in it. While mounting it just creates a folder which you provided, in /media and mounts the volume there.

And this is what I did:

Open gconf-editor in terminal:
$ gconf-editor
In the left panel:
System -> Storage -> volumes

Here you will see the mount point you specified for the device.
Change it to just a single word (OR just remove it :) )
Thats it. Replug your device.


1. Do not use sudo for this purpose.
See this comment by Anonym... (Thanx to Anonym) for detail.

2. Sometimes instead of System -> Storage -> volumes you may also get System -> Storage -> drives , depending upon what you messed up. The rest process is same.

Jul 13, 2008

writing-udev-rules, the other way

Here's my earlier post on about writing the udev rules:
writing-udev-rules, the easier way
This will give you a bit of understanding about what a udev-rule is and how can you write a udev rule on the basis of vender-id and product-id.

Here is the other way (Its easier but a bit time consuming):
So here you go..
Insert your usb-device, and watch the log:
# tail -f /var/log/messages
Jul 13 16:47:20 workbench kernel: [ 5418.740803] sd 7:0:0:0: [sdb] 312581808 512-byte hardware sectors (160042 MB)
Jul 13 16:47:20 workbench kernel: [ 5418.743055] sd 7:0:0:0: [sdb] Write Protect is off
Jul 13 16:47:21 workbench kernel: [ 5418.743072] sdb: sdb1
Jul 13 16:47:21 workbench kernel: [ 5419.323103] sd 7:0:0:0: [sdb] Attached SCSI disk
Jul 13 16:47:21 workbench kernel: [ 5419.323163] sd 7:0:0:0: Attached scsi generic sg2 type 0

Notice the third-last line. It shows that the device is mounted as sdb1.
Now lets dig into it.
# udevinfo -q path -n /dev/sdb1

This shows the devpath of the device.
From this devpath you can see a lot of information.

# udevinfo -a -p /block/sdb/sdb1

At the very first line of the output you will see:

"Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device."

This pretty much explains itself.

And the (trimmed-)output is:

looking at device '/block/sdb/sdb1':
ATTR{stat}==" 11011 11620 0 0"

looking at parent device '/block/sdb':
ATTRS{stat}==" 206 10881 12228 1688 0 0 0 0 0 1272 1688"


looking at parent device '/devices/pci0000:00/0000:00:1d.7':

looking at parent device '/devices/pci0000:00':

So you can choose any block and write the rule for that.
Let me zoom into a block

looking at device '/block/sdb/sdb1':
ATTR{stat}==" 11011 11620 0 0"

So here's the rule for this :
KERNEL=="sdb1", SUBSYSTEM=="block", ATTR{dev}=="8:17", ATTR{start}=="63", ATTR{size}=="312576642", SYMLINK+="myDisk"

Now, this is also not the only rule. Go on! Generate your own rule. Mind with the spaces like in case of ATTR{stat}==" 11011 11620 0 0".

Finally place the rule in /etc/udev/rules.d/60-persistent-storage.rules. Then Plug out the device and again plug-in to see the change.

# ls /dev/ | grep my

That's it.
If you want to learn more about it:

Writing udev-rules, the easier way

What is udev-rules?
udev is the device manager for the Linux 2.6 kernel series. Its primary function is managing device nodes in /dev. It is the successor of devfs and hotplug, which means that it handles the /dev directory and all user space actions when adding/removing devices, including firmware load.

Okay, here i will show you howto write udev-rule for a USB hardisk.

# lsusb

Bus 005 Device 003: ID 04fc:0c25 Sunplus Technology Co., Ltd
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 062a:0000 Creative Labs Optical Mouse
Bus 001 Device 001: ID 0000:0000

This gives us two information, one of them is what we want.
Very first line shows that I have a Device with vernder id: 04fc and product id:0c25 named "Sunplus Technology Co., Ltd "

The second-last line points my USB-mouse, which is not of much interest now.

Now move to the /etc/udev/rules.d directory

# cd /etc/udev/rules.d

As the device is a storage device we will be writing the rule in "60-persistent-storage.rules"
So open this file with your prefered editor (I recommend scite in gui and vim in console) and add the following line:
KERNEL=="sd*[0-9]",SYSFS{idVendor}=="04fc",SYSFS{idProduct}=="0c25", SYMLINK+="sata"

This informs udev-manager, that if any storage device with vendour-id, 04fc and product-id 0c25 is plugged into the system add a symlink in /dev with name, sata.

Note: This rule is specific to the device only. And also this is not the only rule that you can write.

This is the easiest way. And there is another way round to work on this: >Here<

Jul 11, 2008

Generate your gpg-key

GNU Privacy Guard (GnuPG or GPG) is a replacement for the PGP suite of cryptographic software. It is freely available and is a part of Free Software Foundation's GNU software project.

Generating your gpg-key in linux
Terminal,:) the following:

~$ gpg --gen-key

You will be asked with the following options:
(1) DSA and Elgamal (default)
(2) DSA (sign only)
(5) RSA (sign only)

*nux-platform developers are crazy... there is no any reason for sth like this 1, 2 and then suddenly 5 ;)

Choose the option according to your choice if you dont know what DSA and RSA are. Just gooooogle them. I recommend choosing (2) as it gives better security. Remember it's just for signing purpose.

DSA keypair will have 1024 bits.
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years

Choose 0 if you dont want it to expire.
Provide your Real name ( at least 5 chars ), Email address and Comment.

Conform (enter alpha-O) it and wait few secs and your key is ready.

Ps: You may be asked to move your mouse or do any thing on your desktop to refill the pool of random numbers.