Friday, December 21, 2012

[Fedora] Mounting a network shared folder under LXDE X11 Desktop

Switching from Xfce to LXDE has made me unable to access my network shared folder. The reason is using Nautilus in Xfce will automatically mount the network folder. But in LXDE, the network folder is not mounted by default, and I need to mount it using command line.

The bad thing is as a novice user, command line doesn't work as smooth. Luckily there is a tools namely "Gigolo" to simplify the procedure. It is located under Application Menu > System Tools > Gigolo. In some case it does not come with LXDE installation, then one would need to manually install it, yum install gigolo.x86_64.

Open up Gigolo we can see a connect button, press it and set the following:

  • Service type = Windows Share
  • Server = your server hostname / IP address
  • Share = the shared folder you would like to mount
  • Domain = this can be left blank
  • Username = username to access the server
Once enter / connect is pressed, there could be a pop up dialog (single line field) asking for password. For some reason entering password doesn't get rid of this dialog. Simply close it, then there will be another dialog box pop up, this time with two text field - Domain & Password. Simply ignore the Domain field and key in password. Voila! The network folder is now mounted.

[Ubuntu] Bonding - ALB and 802.3ad

Update 31/07/13: Be sure to install ifenslave before configuring the bonding.

Office network switch was upgraded to layer 3 switch recently, play around with bonding to create link aggregation. This can be done easily under Windows, but in Linux it is really big headache. Not because the steps are complicated and redundant, but you simply can't proof whether the configuration is working or not because Linux doesn't have a friendly way for user to check whether the bonding is up and running fine.

We can check under /proc/net/bonding/bonding, but even if it is up and running, it doesn't mean the networking is actually well connected.

By the time I write this article, I still unable to get it run fine, probably due to the switch is not well configured yet, waiting for technician to do a check on that. Meanwhile, I would like to share my /etc/networking/interfaces configuration here, so whoever encountered Linux bonding problem can refer to here, without the need to search for thousand solutions online but none of those are beginner friendly or prove working.

I would say the configuration below "should be working", due to the fact that such configuration appear working when we do "netstat -i" or "ifconfig". There are a lot of solutions online, some help you to understand the concept but can never get the "bond0" interface up.

Without more words, here we go:

Adaptive Load Balancing, bonding mode=6
 auto lo  
 iface lo inet loopback  
 auto bond0  
 iface bond0 inet static  
      slaves none  
      address 192.168.0.2  
      gateway 192.168.0.1  
      netmask 255.255.255.0  
      dns-nameservers 8.8.8.8  
      bond-mode 6  
      bond-miimon 100  
 auto eth0  
 iface eth0 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  
 auto eth1  
 iface eth1 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  
 auto eth2  
 iface eth2 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  
 auto eth3  
 iface eth3 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  
802.3ad Link Aggregation, bonding mode=4
 auto lo  
 iface lo inet loopback  
 auto bond0  
 iface bond0 inet static  
      slaves none  
      address 192.168.0.2  
      gateway 192.168.0.1  
      netmask 255.255.255.0  
      dns-nameservers 8.8.8.8  
      bond-mode 4  
      bond-lacp-rate 1  
      bond-miimon 100  
 auto eth0  
 iface eth0 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  
 auto eth1  
 iface eth1 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  
 auto eth2  
 iface eth2 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  
 auto eth3  
 iface eth3 inet manual  
      bond-master bond0  
      bond-primary eth0 eth1 eth2 eth3  

I hope the above will help one who stuck with bonding. If this doesn't work properly and better solution is found, I would greatly welcome feedback and input.

Enjoy bonding!

========================================

Update 24/12/12:
The bonding configuration above is proven working, the issue I encountered was caused by the Dell PowerConnect layer 3 switch, which has some unknown issue that made the ports reserved for LACP not working properly. Re-configure and restart has get it up and running.

One more matter to take note is that you can actually remove the "bond-primary" under each eth. As for the dns-nameservers, it is advisable to specify that. Without that we have encountered some strange issue with VMs:

  1. the host and guest OS cannot ping and see each others.
  2. there is a "ghost" IP address, 192.168.0.222 appeared and tie with one of the ethernet. Bring up/down the bonding as well as each ethernet cannot get rid of it. Not even after restart.
Issues above being solved once the dns-nameservers is specified.

Now my server is running @ 4 Gbps and the HDDs has now become the bottleneck. Sigh... it's time to upgrade!

Thursday, December 13, 2012

[CentOS] Dependencies problem during DraftSight installation

libaudio.so.2 download for other distribution: http://pkgs.org/download/libaudio.so.2

Installing DraftSight in CentOS 6 with the binary package from official website may give error: 
requires libaudio.so.2
and I cannot find any useful solution from online. So how can we fix this?

It actually not hard to get it done:
  1. Go to http://pkgs.org/centos-6-rhel-6/epel-i386/nas-1.9.1-7.el6.i686.rpm/download/
  2. Download the binary package, install it with Package Manager. This should contain the libaudio.so.2
  3. Run the DraftSight.rpm again
  4. The setup will ask you to install extra stuff before it continues. Click install. Wait until it done.
  5. Once it is  done, navigate to Applications > Graphics.  Voila! DraftSight is running perfectly!

Install Skype 4.0 on Centos 6

Has not seen anyone get Skype 4.1 work on CentOS 6 yet. Here's a step-by-step guide to install Skype 4.0 on CentOS 6.3:

http://www.if-not-true-then-false.com/2012/install-skype-on-fedora-centos-red-hat-rhel-scientific-linux-sl/

Somehow I feel Linux should automatically solve the dependency of major software, else novice users are hardly adopt Linux.. It's great, but it's too cumbersome as well to get a simple task done. Haiz....

Wednesday, December 12, 2012

[Centos 6.3] How to run Nautilus as root from terminal?

If using "su", one might not be able to run Nautilus from the terminal. Instead use "su -" then Nautilus will open.

[Fedora] How to disable C6 Media Repo

There are two methods being discussed online:
  • yum --disablerepo=c6-media
  • yum-config-manager --disable c6-media (this one work for me)

Problem with installing Centos 6.3 on USB Stick

If you ever face "kernel panic" issue when trying to boot Centos 6 from your USB stick, it is due to the EFI bootloader doesn't point to root to your USB stick.

To fix this, simply go under the EFI folder in your USB stick, then find those files end with *.conf, use a notepad to change the "root=" to your USB device. In my case, it is some things like "live:UUID=xxxx".

Another note to take care is instead of install using UNetBootIn or ISO2USB, we can actually use Fedora Live USB Creator. The good thing about use Fedora's is that you can find your USB device's UUID under syslinux\syslinux.cfg.

Wish you will have a smooth boot!