Video lectures from the iCS group @ IIT Madras

TI lab setup

The computers in TI lab will be setup as follows.

  • All home directories will be on the server ramanujan(10.7.51.101).
  • You will be able to login from any of the machines and see your(and other's) home directory
  • Access will be using EE (athreya) login and password.
  • All tools and libraries will be under /cad on the server and replicated on local machines.
  • /data partition on local machines will hold cadence (and any other long) simulation results. These will be accessible from everywhere as /host/machinename e.g. /host/ti1
  • You don't need local installation of tools. Point to the correct global directory. This also ensures consistency. Any new tool can be experimented with in the local directory, but should finally be installed under /cad/tools and the local copy removed. This way everyone can use it.
  • All the programs in /usr will be updated regularly on ramanujan and will be replicated on local machines

Users

  • In general, personal setup should be the only things that you need to set. You shouldn't be resetting things which are already set by default.
  • Your shell will be zsh which is DCF default. Do tcsh or whatever to get into your favourite shell and set environment variables. DCF will soon change this default setting and it will be more convenient after that.
  • Files that you'll have to modify after the transition
    • .cshrc: Tool paths, tool related environment variables
    • See these links for setting up Cadence IC6, Cadence IC5, and Calibre.
    • .cdsinit: Bindkey paths, default simulation directory. The following line in .cdsinit will set the default correctly. envSetVal(“asimenv.startup” “projectDir” 'string “/data/yourusername/simulation”)
    • assura_tech.lib: assura path
    • cds.lib: Paths to cadence design libraries
  • Sample setup files-use these files for tcsh(.cshrc, .aliases, .environment, .tcsh.bindings), .cdsinit for cadence initialization, .cdsplotinit for cadence plotter setup, and .environment.mentor for setting environment variables for mentor tools. Look through these files and change things, e.g. usernames, appropriately
  • Right now, the printer is connected to ti14 and you need to login to it to print.
  • TI lab users can see VLSI I/II and DSD lab user directories under /mnt/imports/vlsinfs and design directories of Nagendra and Shanthi under /mnt/imports/nagendra and /mnt/imports/shanthi respectively
  • VLSI I/II and DSD lab users can see TI lab user directories under /mnt/ramanujan and design directories of Nagendra and Shanthi under /mnt/imports/nagendra and /mnt/imports/shanthi respectively

Administrators

Bringing up a new machine for Debian/Lenny 64 bit hardware

Basic Installation Procedure:

    Partitions: On a 160 GB HDD : 
    16 GB for /
    71 GB for /cad
    51 GB for /data
   (no more than) 2 GB for swap 
    remaining for /opt        
  • Default installation : Desktop version , Kernel Version : 2.6.26-1-amd64, Choose the correct timezone during installation - Asia/Kolkata. Setup the correct root password during installation.
  • In the file /etc/X11/xorg.conf add the below said line in the Section Device
           Option      "NoAccel"           "True"
  • Create directories home1, home2, home3, home5 and databse in /mnt. Create directories nagendra, shanthi and vlsinfs in /mnt/imports. Add the required entries in /etc/fstab to mount filesystems automatically at startup. (see other machine's /etc/fstab file)

Setting up Repositories & Installation of basic packages:

  • Setting repositories : The file /etc/apt/sources.list should contain only the below entries
    • deb ftp://10.65.0.42/debian lenny main contrib non-free
    • deb-src ftp://10.65.0.42/debian lenny main contrib non-free
    • Run apt-get update after this once. The command apt-get install “packagename” as root downloads packages and its dependencies from the repository and installs it.
  • Basic Packages to be installed:
    • apt-get install build-essential ssh rsync nfs-common rdist libstdc++5 nfs-kernel-server ntpdate autofs acl ksh nfs-common gv enscript
    • apt-get install xvnc4viewer vnc4server xcircuit vim vim-gtk imagemagick xpdf xfig mplayer emacs nedit unrar htop pdftk
    • apt-get install jabref kile texlive-latex-extra texlive-latex-recommended
    • apt-get install octave3.0 octave-communications octave-control octave-data-smoothing octave-general octave-io octave-nan octave-missing-functions octave-odepkg octave-optim octave-plot octave-signal octave-specfun octave-symbolic octave-splines
    • apt-get install libck-connector0 libpam-ck-connector libpolkit2 libpolkit-dbus2 consolekit libpam-devperm
    • apt-get install texlive-full lyx noweb unison unison-gtk impose+ scilab smplayer

Other settings

  • Copy ti9:/root/.ssh/authorized_keys from ti9 to the same location in the new machine. This lets root from ramanujan and ti9 to ssh into this machine without password.
  • Add the machine name to /etc/hosts in Ramanunjan and propagate it to all machines.
  • Following Pam settings are to be made
    • Uncomment the line account required pam_access.so in /etc/pam.d/login and /etc/pam.d/sshd (position of the entry shouldn't be changed)
    • Add the line account required pam_access.so after the first entry in /etc/pam.d/su.
    • Add the line session optional pam_xauth.so in the last line before the include statement. (See settings in ti9)
    • Now only login entries in /etc/security/access.conf can have physical access, ssh or do an su in the machine. Copy the access.conf file from another machine.
  • Make a softlink that /bin/zsh points to /bin/tcsh(or your favorite shell) to setup default shell in terminal.
  • Add the line UseDNS no to the file /etc/ssh/sshd_config
  • Sync the time of this machine to athreya /usr/sbin/ntpdate -u 10.7.0.1
  • Copy the cad tools and libraries to this machine from ti9 using rdist or rsync only. Make sure the /rdist/Distfile contains only the relevant files like /etc/security/access.conf /etc/sudoers and the required cad tools. Make sure you comment out unnecessary entries.

Setting up LDAP:

  • Install the ldap packages: apt-get install libnss-ldapd libpam-ldap nss-updatedb libnss-db nscd finger-ldap
  • Answer the following during installation:

ldap server : ldap://10.7.51.101 or ldap://10.7.0.2 (NOTE IT SHOULD BE ldap: NOT ldapi:)

     Search base : dc=ee,dc=iitm,dc=ac,dc=in
     Make local root Database admin: No
     Does the LDAP database require login: No
     Services to be used : group,password,shadow   
  • The PAM configuration files in /etc/pam.d should look like this
     File name - common-account
        account    sufficient      pam_ldap.so
        account    required        pam_unix.so  
     File name - common-auth
        auth    sufficient      pam_ldap.so 
        auth    required        pam_unix.so use_first_pass
     File name - common-session
        session    required        pam_unix.so 
        session    optional        pam_ldap.so 
     File name - common-password
        password   sufficient   pam_unix.so nullok obscure md5
        password   required   pam_ldap.so
  • Create a soft link /etc/libnss-ldap.conf pointing to /etc/nss-ldapd.conf. Enable read permissions for all users to read the file nss-ldapd.conf with the command chmod a+r nss-ldapd.conf

Setting up Automount for /data directories:

  • Add the appropriate entry in /etc/exports so that any user can mount /data in other machines on demand through Automount.

For e.g. /data 10.7.51.0/255.255.255.0(rw,sync) shares(with write access) the folder /data in this machine to other machines in the network with Internet address 10.7.51.0. These are controlled appropriately through the subnet mask. Google for more information

  • Comment all lines in /etc/auto.master add the below entry in the file
      /host	/etc/auto.host
  • The file /etc/auto.host hould look like this
      ∗    &:/data 
  • Create a directory named “host” in the location /
  • Finally reboot the machine. One should be able to login now with ldap authentication.

To make Cadence and Matlab work properly

  • Install the following packages: apt-get install ia32-libs elfutils libc6-dev-i386
  • Create a soft link for the file /cad/tools/Berkeley_DA/lib/Linux_x86_64_AMD_64bit/libelf.so.1 in the folder /usr/lib32 so that Spectre Verilog works
  • Run the command sed -i 's/XINERAMA/FAKEEXTN/g' libmawt.so in the following folder(make a backup of the file!)
    • /cad/tools/matlab7p1/sys/java/jre/glnx86/jre1.5.0/lib/i386/xawt
  • FIXME Only Matlab 7 works in debian. There is some issue with java that Matlab 6 GUI doesn't work. But Matlab6 can be used in command prompt by starting as matlab -nodesktop
  • FIXME The cadence help manager invoked using cdsdoc doesn't work because of some issues with Java. A fix is required for this.
  • Currently the ldap user doesn't have privileges to access special devices like /dev/snd/ /dev/cdrom because the console-kit-daemon which is supposed to give permissions to these nodes through Access control List couldn't be configured properly. As a result these nodes in /dev/ doesn't have read permission. Unmounting the cdrom may not be possible, but the eject button in the cd drive will automatically unmount it. Temporarily the system administrator can give permission through a particular user through ACL with the command setfacl -m <login name>:rw- /dev/snd/* But this should be used with caution as it may potentially collapse the Kernel. The device node should be reverted back to its original state using the command setfacl -b /dev/snd/* Fixed by installing the pam module libpam-devperm.

Setting Correct access permissions for Audio, CDrom, Flash player

  • Make sure the module libpam-devperm is installed
  • Add the entry :0 0600 /dev/snd/∗ to the file /etc/logindevperm
  • Add the entry session required pam_devperm.so before the line @include common-password in /etc/pam.d/gdm
  • These settings work only for gdm. For tty's it doesn't work
  • FIXME The user should copy this file libflashplayer.so to his .mozilla/plugins folder. This 64 bit flash player is a beta version. The machine can be updated with this flash version once the stable version is released.

Wheezy Installation

Basic Packages to be installed:

  • apt-get install build-essential ssh rsync nfs-common rdist libstdc++5 nfs-kernel-server ntpdate autofs acl ksh nfs-common gv enscript
  • apt-get install xvnc4viewer vnc4server xcircuit vim vim-gtk imagemagick xpdf xfig mplayer emacs nedit htop pdftk
  • apt-get install jabref kile texlive-latex-extra texlive-latex-recommended
  • apt-get install octave-communications octave-control octave-data-smoothing octave-general octave-io octave-nan octave-missing-functions octave-odepkg octave-optim octave-plot octave-signal octave-specfun octave-symbolic octave-splines
  • apt-get install zsh csh tcsh
  • apt-get install libck-connector0 libpam-ck-connector consolekit
  • apt-get install texlive-full lyx noweb unison unison-gtk impose+ scilab smplayer

LDAP Setting

Package installation

  • apt-get install libpam-ldap libnss-ldap libnss-db nss-updatedb nscd
  • Comment all the lines in /etc/pam.d/common-account and copy the following lines
   account sufficient pam_unix.so
   account required pam_ldap.so
  • Comment all the lines in /etc/pam.d/common-auth and copy the following lines
   auth sufficient pam_unix.so nullok_secure
   auth required pam_ldap.so use_first_pass
  • Comment all the lines in /etc/pam.d/common-password and copy the following lines
   password sufficient pam_unix.so nullok obscure min=4 max=8 md5
   password required pam_ldap.so use_first_pass

edit /etc/nsswitch

  • Add ldap as shown below

passwd: compat ldap group: compat ldap shadow: compat ldap

Edit /etc/ldap/ldap.conf

Comment all the lines and add the following lines.

URI ldap://10.7.0.2:389
BASE dc=ee,dc=iitm,dc=ac,dc=in

To install 32 bit libraries

dpkg --add-architecture i386
apt-get update
apt-get install libc6:i386
apt-get install ia32-libs

Hosts list

  • Edit /etc/hosts to have the following
# DCF Related
10.7.0.1        athreya.ee.iitm.ac.in   athreya
10.7.0.2        volt.ee.iitm.ac.in      volt
10.7.0.3        agasthya.ee.iitm.ac.in  agasthya proxy
# NFS Servers
10.7.7.43       server3
# License servers
10.7.9.36       server6
10.7.9.34       server1
10.7.9.35       server5
10.7.7.42       server2
10.65.0.45      moon

Mounting /home

  • Edit /etc/fstab file to have the following line
server3:/home    /home     nfs     rw,rsize=8192,wsize=8192,timeo=14,intr,bg,soft 0 0