Tuesday, July 28, 2009

Common NFS Error

Recently while trying to connect to an NFS share I got a familiar error message:


mount: wrong fs type, bad option, bad superblock on Machine:/path,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so

I checked the usual configuration files to verify that I had the necessary permissions:


/etc/exports <- client should be allowed here with necessary access rights (r,w,rw etc)

/etc/hosts.allow

/etc/hosts.deny <- client should not be listed here.


All the configuration files were valid. The solution to the problem was to install nfs-common:


sudo apt-get install nfs-common
The nfs share can be mounted with:


sudo mount server_name:/path/to/remote/share local_mount_dir


eg.

sudo mount Harry_Hardcore:/home/harry/share /home/user/share

Enjoy! :)

Apple Silver Keyboard on Ubuntu 9.0.4

This is becoming a habit. Whenever a new version of Ubuntu comes out, the function keys on my apple keyboard stop working. Not only that, but, the fixes used previously to get them working, don't work any more! Arrrg! The bug still stands.

After a little digging around I came across this article which provided the simple solution. Have a look at your /sys/module/hid_apple/parameters/fnmode file:


cat /sys/module/hid_apple/parameters/fnmode


Chances are that its value is 1. We need to set this to 2.

We can do this by editing the /etc/rc.local file


sudo vim /etc/rc.local


Add the following lines before the exit 0:


#Added to enable the apple function keys by default.
echo 2 > /sys/module/hid_apple/parameters/fnmode


save, exit and reboot your system.

Before you give the function keys a go, have another look at the /sys/module/hid_apple/parameters/fnmode file. It should have a value of 2.

After this I discovered that function keys F13-F19 did not work! Sigh. I created ~/.Xmodmap file with the following entries


keycode 191 = Insert
keycode 192 = Print Sys_Req
keycode 193 = Scroll_Lock
keycode 194 = Pause Break
keycode 195 = First_Virtual_Screen
keycode 196 = Next_Virtual_Screen
keycode 197 = Last_Virtual_Screen

clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add Shift = Shift_L Shift_R
add Lock = Caps_Lock
add Control = Control_L Control_R
add Mod1 = 0 Alt_L 0x007D
add Mod2 = Num_Lock
add Mod4 = Super_L Super_R
add Mod5 = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift

keycode 0x7D = equal


This file will be referenced the next time you log in and all should be sweet in the world! :)

And that it should be it.... until the next Ubuntu release!

Also have a look here for alternative solutions.