Hardcore Linux

Anything about Ubuntu, Centos, openSuSe and Fedora

Category Archives: System Admin

Fix for Elantech touchpad on Ubuntu 14.04

Since I recently got my new Lenovo G5070 notebook few days ago, I rush in to install second OS : Ubuntu 14.04, though installation process is tough, need to fix video card defaults, from fgrlx to intel graphics. Then another issue is wireless network RTL8723BE drops after each connection, but this article is about the touchpad: the ElanTech Touchpad, which by default not functioning well. Issues like there’s no switch off touchpad option in Ubuntu settings, multi-touch is not working, neither the scrolling.

Now to fix this issues, here’s the guide:

1. First, download the patch for the touchpad here.

2. Install dkms (if you haven’t done it yet)

sudo apt-get install dkms

3.  Go to the directory where you store the file and perform the following:

sudo dkms ldtarball psmouse-elantech-x551c.tar.gz
sudo dkms install -m psmouse -v elantech-x551c

4. Then reconfigure the driver

sudo rmmod psmouse
sudo modprobe psmouse
sudo update-initramfs -u -k all

5. Done

error: Diskfilter writes are not supported Ubuntu 14.04

After a clean install or upgrade from 12.04 to 14.04 on raid or lvm setup, normally you will encounter this error, which is related to the setup I mentioned. From various test, I encounter a workaround to fix this error.

Modify /etc/grub.d/10_linux 

Replace quick_boot=1 with quick_boot=0


Allow Standard User to connect to wifi on Ubuntu

Still using Ubuntu 12.04, and one of the problem we’ve encountered is it requires normal user to authenticated the designated admin user’s password when connecting to wireless network, which in my opinion doesn’t make sense. How can a normal user access internet over wifi if they aren’t allowed to do so?

Check what google search has to offer, I finally found a fix for this. Adding policykit rules for wifi users.

Create or modify a file  etc/polkit-1/localauthority/50-local.d/52-wifi-management.pkla

$> sudo gedit etc/polkit-1/localauthority/50-local.d/52-wifi-management.pkla

and then enter the following

[Wifi management]

and save on exit.

Add the user to the netdev group

$> sudo usermod -a -G ftp jerry

Restart the system and standard user should now be able to connect to wifi..


Ubuntu 12.04 /etc/resolv.conf implementation with dnsmasq

On the current version of Ubuntu (12.04), you might notice that the current /etc/resolv.conf file always record a nameserver which then resolv dns via dnsmasq, but most of the time after test few things, I found it more problematic. It always disregard my local DNS server, and goes directly to the DNS of my ISP.

If you’re having the same problem like mine, here’s a quickfix:

1. Modify the configuration /etc/NetworkManager/NetworkManager.conf

$> sudo gedit /etc/NetworkManager/NetworkManager.conf

2.  Comment the line that contain “dns=dnsmasq


3. Then restart the network-manager

$> sudo  service network-manager restart

4. Done



Installing KVM with OpenVSwitch on Ubuntu 12.04

Here’s a good article from http://blog.allanglesit.com/, I myself tried it my in test server and it’s working great, though I’m still new with OpenVSwitch.

The article has been released for Ubuntu 12.04 system. I also found out that the KVM version currently available in Ubuntu 12.04 has better performance compare to 10.04, which I think is a good sign when planning to deploy KVM host for your VMs.

The actual URL: http://blog.allanglesit.com/2012/03/linux-kvm-ubuntu-12-04-with-openvswitch/


Novell iManager workstation on Ubuntu 11.04

Currently unning a Novell eDirectory  LDAP service and wonder how to use iManager on your Ubuntu workstation.

Here’s how:

1. Download the latest iManager Workstation for Linux in Novell Download Center

2. Extract the package (for me usually in $HOME/Desktop)

3. Install the necessary packages and libraries for alien (alien, libstdc++5, gcc), installing alien package also includes rpm in the requirements.

4.  Prepare NICI for installation.

$> cd  $HOME/Desktop/imanager
$> cd  NICI/linux
$> sudo alien -d --scripts nici.i386.rpm
$> sudo dpkg -i nici_2.7.3-1.01_i386.deb

5. Modify the current  iManager.sh in the bin folder ($HOME/Desktop/imanager/bin) and remove the word  “function” in every functions of the script.


 echo "Test permissions" > $IMANAGER_BIN_NATIVE_DIR/perm.txt

should be

echo "Test permissions" > $IMANAGER_BIN_NATIVE_DIR/perm.txt 

5.  In the STARTMANAGER() function, remove the CHECK_NICI;

6.  Save the script and do  some test run.

$> cd $HOME/Desktop/imanager/bin
$> ./iManager.sh

7. Done.

Ubuntu 11.04 Shutdown and Restart Problem with CIFS

UPDATE(07/29/2011): The GRUB thing didn’t work at all, back to basic trapping signal via upstart scripts in /etc/init/dbus.conf.  I tried it before using /etc/init/network-manager.conf but on Ubuntu 10.10, it’s not working anymore. Here’s another test and works for me.

1. Modify the current /etc/init/dbus.conf.

$> sudo vi /etc/init/dbus.conf

2. Add a pre-stop script, which looks like this:

pre-stop script
       trap "TERM signal" TERM
      /bin/umount -a -t cifs -l -f
      trap - TERM
end script 

3. Save the script and have a test.

4. Done.

UPDATE(07/28/2011): Found a better alternative via GRUB, link here. Mainly you just need to modify the  /etc/default/grub. Here’s the details:

1. Edit the /etc/default/grub

$> sudo vi /etc/default/grub

2. Add “reboot=pci” on the GRUB_CMDLINE_LINUX line, it should look something like this:

... GRUB_CMDLINE_LINUX="reboot=pci" ...

3. Update the grub

$> sudo update-grub


4. Done


It’s an ancient bug (here), which still exist in Ubuntu 11.04, or even in other distros. When you got a mounted samba shares before the shutdown or restart process, the machine waits for around 10 minutes before it complete the operation. Very troublesome that’s why I tried various workaround but none of them  works with Ubuntu 11.04. Not even the /etc/rc6.d/K*  or the upstart /etc/init configurations, nor the old python script I posted before (here’s the link).

After few considerations, I made a desperate workaround, creating a script that triggers before the /sbin/shutdown, /sbin/reboot and /sbin/restart commands.

1. Rename the current shutdown, reboot and restart commands in /sbin.

#> mv /sbin/shutdown /sbin/shutdown2
#> mv /sbin/reboot /sbin/reboot2
#> mv /sbin/restart /sbin/restart2 

2. Then create scripts with names of the previous commands in /sbin, which contains the following:

umount -t cifs -a -f -l
/sbin/shutdown2 $@
exit 0 

3. Make similar script for reboot and restart command which also points to /sbin/reboot2 and /sbin/restart2.

4.  Until the dbus implementation of stop on deconfiguring-networking comes to Ubuntu 11.04, which I think working with
Ubuntu 11.10 oneiric. I think this is the least workaround that works for me.

5. Done

Recover Deleted or Corrupted Files in Linux

In most cases, the data stored in your memory cards or USB drives likely being corrupted and there are some files you accidentally deleted and removed in trash. Fear not, there is another chance to recover them back again.

I tried scalpel but didn’t work our right, then tried foremost, and it works like a charm. I’ve been always a victim of corrupted memory cards every time I extracted or deleted something using memory card readers or even using the delete utility of my digital camera.

Well, here’s the basic command to recover things in your memory cards  or USB thumb drives.

1. First, install foremost

$> sudo apt-get install foremost

2. Then, determine the target device, mines is /dev/sdb1

$> sudo fdisk -l

3. Finally, issue the foremost command\

$> sudo foremost -t all -i /dev/sdb1 -o output_dir

4. Done

passwd: Module is unknown

After modifying your workstation authentication and adds optional LDAP or KERBEROS authentication, you end up messing your pam configurations. Here’s a quick fix that works for me:

$ sudo pam-auth-update --force

I hope it works in your case too.


Get every new post delivered to your Inbox.

Join 354 other followers

%d bloggers like this: