Wednesday, February 8, 2012

Allowing users to mount CD and DVD ROM

Step 1: Do take a look at finding out the device name of the CD-ROM or DVD-ROM for your Linux Box if you are using the CentOS, you may want to take a look at the Checking Device Name of CD-ROM in CentOS

Step 2: Make a directory to mount the DVD ROM
# mkdir -p /media/dvdrom 


Step 3: Update your /etc/fstab file
/dev/dvd                /media/dvdrom           iso9660 ro,user,noauto  0 0 


Step 4: Test the setup as a typical user. Put in a CD-ROM or DVD-ROM
$ mount /media/dvdrom


Step 5: To unmount, just simply type
$ umount /media/dvdrom


Tuesday, February 7, 2012

Using Ethtool to manage Ethernet Card

Ethtool is really a swiss army knife for diagnosing and managing and manipulating Network Card. I used it rather often. Here are some which I use more often.

Usage 1: ethtool eth0
# ethtool eth0

Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

Interesting information include "Link Detected Status", Duplex, Speed, Supported Ports etc. I particular find the Link Detection Usage one of my most used tool. :)


Usage 2: Checking of Ethernet Drivers Version
# ethtool -i eth0

driver: bnx2
version: 2.0.23b
firmware-version: bc 1.9.6
bus-info: 0000:03:00.0


Usage 3: Identify the Physical Network Card (Blink LED Port of NIC Card)
# ethtool -p eth0


Usage 4: Display Auto-negotiation, RX and TX of Network Card
# ethtool -a eth0

Pause parameters for eth0:
Autonegotiate:  on
RX:             on
TX:             on


Usage 5: Show offl-load property of Network Card.
# ethtool -k eth0

Cannot get device udp large send offload settings: Operation not supported
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
udp fragmentation offload: off
generic segmentation offload: off
generic-receive-offload: off


For more information, do look at the excellent article on
  1. Ethtool man page
  2. 9 Linux ethtool Examples to Manipulate Ethernet Card (NIC Card)

Unable to remove mpi-selector for OFED 1.5.3 during uninstallation

If  you encounter this error "cannot remove mpi-selector" when uninstalling or even installing OFED package, it is best to exit the package and do a yum remove mpi-selector. Apparently, there there are a number of dependencies to BLAS, Scalapack etc.
# yum remove mpi-selector.


Later you can reinstall the dependencies like BLAS, SCALAPACK etc

Monday, February 6, 2012

vncserver for CentOS 6

To do a installation of tigervnc for the CentOS 6, just do
# yum install vnc-server

Sunday, February 5, 2012

Checking Device Name of CD-ROM in CentOS

If you are checking what is the device name of CD-ROM in CentOS 6, you can install the package wodim which is actually a command line CD/DVD recording program

# yum install wodim


To check the device name of CD-ROM / DVD-ROM,
just type
#  wodim --devices

wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0  dev='/dev/scd0'     rwrw-- : 'NECVMWar' 'VMware IDE CDR10'
-------------------------------------------------------------------------


For CentOS 5, somehow they do not have wodim in the commonly used repository. But you can easily deduce from /dev directory. It is usually /dev/dvd or /dev/cdrom. Just check the symbolic links lead to...