ResourcesMark

From MDWiki
Jump to navigationJump to search

System Configuration (workstations, grape)

Alarm handling/Shutting down the rack

System Configuration (windows and Linux laptop)

System Configuration (CCMS Blackhole)

Grape queueing system

Add new user (LDAP)

To get a untaken UID for the new accont, use nextUID.py placed in '/opt/scripts'. Note that the UID may be already in use on grape.

To add a group of new users with similar uid, use script ldapBatchAddUser.py placed in '/opt/scripts/'. You will have to run it as root, and keep in mind the following things.

       This program helps to create multiple user accounts on the fly. 
       In order to use it, you have to provide some basic information 
       of the new accounts. The new accounts will be named as "BASE$N",
       in which "BASE" is the base name, and $N is the count. You have
       to specify the starting number of $N. Users' home directory
       will be /home/BASE/BASE$N, and bear in mind that this program
       does not create /home/BASE automatically. The program will invoke
       "nextUID.py" to set UIDs for the new accounts, However, you still 
       have to take care of the GID issue yourself. All new accounts
       will use "BASE" as their passwords.
       Modify the program yourself to make it better suit your need.
       Use CTRL+C to interrupt the program when typing something wrong.

Add new user (grape)

Create account in /etc/passwd

useradd -u NEWUID -g md NAME

Update NIS (for cluster authentication)

cd /var/yp/
make


Gromos Live (ubuntu based live DVD)

The latest DVD image can be found in /home/exercise/LiveDVD

The DVD is based on the one from IGC ETH with some minor modifications including:

  • changing gnome background
  • removing unnecessary language and game packages
  • changing firefox homepage (/usr/share/ubuntu-artwork/home/index.html)
  • changing license file in GROMOS directory, and moving GROMOS directory from /opt to /usr/local
  • installing gromacs to /opt
  • removing nfs-common, portmap and games packages

Modify the Live DVD

Guidelines on how to modify an ubuntu live cd can be found in the following urls. Note that ALL of the above modifications are made in squash file:

http://www.debuntu.org/how-to-customize-your-ubuntu-live-cd

http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htm

Here is a rough walkthrough:

  • mount the original iso and unpack everything to a folder, here we choose /media/live as our working directory.
  sudo mount -t iso9660 -o loop /path/to/gromos-live.iso /mnt/dvd
  sudo cp -a /mnt/dvd /media/live/dvd
  • mount the squashfs image and unpack everything
  sudo mount -t squashfs -o loop /media/live/dvd/casper/filesystem.squashfs \
       /mnt/squash
  sudo cp -a /mnt/squash /media/live/squash
  • umount the original iso
  sudo umount /mnt/squash; sudo umount /mnt/dvd
  • chroot to the squash folder and start to make modifications
  cd /media/live/squash
  cp /etc/resolv.conf etc/
  sudo chroot .
  mount -t proc none /proc
  mount -t sysfs none /sys
  export $HOME=/root
  • make changes to the files in squash
    • to install new package or remove a package, use apt-get as in a normal ubuntu installation.
    • files can be put directly in to the directories and then accessed after boot, but make sure files in /home/ubuntu have owner and group id set to 999:999
  • clean up before reimaging
  rm -rf /tmp/*
  apt-get clean
  umount /sys
  umount /proc
  rm /etc/resolv.conf
  exit
  • regenerate squash image
  cd /media/live/dvd
  sudo chroot ../squash dpkg-query -W --showformat='${Package} ${Version}\n' \
       > casper/filesystem.manifest
  sudo rm casper/filesystem.squashfs
  sudo mksquashfs ../squash casper/filesystem.squashfs
  • regenerate iso image
  cd /media/live/dvd
  sudo find . -type f -print0 |xargs -0 md5sum |sudo tee md5sum.txt
  cd ..
  sudo mkisofs \
    -o Gromos-Live.iso \
    -b isolinux/isolinux.bin \
    -c isolinux/boot.cat \
    -no-emul-boot \
    -boot-load-size 4 \
    -boot-info-table \
    -r \
    -V "Gromos Live" \
    -cache-inodes  \
    -J \
    -l \
    dvd

Port the live DVD to USB key drive

please refer to the following url. As Gromos Live is based on Ubuntu 7.10, we cannot use scripts written for other versions.

http://www.pendrivelinux.com/2007/09/28/usb-ubuntu-710-gutsy-gibbon-install/

Install the live DVD to a hard disk

  • copy the unpacked /casper to the partition that you want to install on.
  • run sudo grub-install --root-directory=/media/hda1 --force-lba --no-floppy /dev/hda to install grub to the hard drive.
  • write the following content to /boot/grub/menu.lst, and modify it if needed.
timeout         10

color cyan/blue white/blue

title           Start Ubuntu in Persistent mode
root            (hd0,0)
kernel          /casper/vmlinuz boot=casper initrd=/casper/initrd.gz 
                 ramdisk_size=1048576 root=/dev/ram rw persistent
initrd          /casper/initrd.gz
boot

title           Live - Start or install Ubuntu
root            (hd0,0)
kernel          /casper/vmlinuz boot=casper initrd=/casper/initrd.gz 
                 ramdisk_size=1048576 root=/dev/ram rw
initrd          /casper/initrd.gz
boot

title           Start Ubuntu in safe graphics mode
root            (hd0,0)
kernel          /casper/vmlinuz boot=casper xforcevesa initrd=/casper/initrd.gz
                 ramdisk_size=1048576 root=/dev/ram rw
initrd          /casper/initrd.gz
boot

title           Check CD for defects
root            (hd0,0)
kernel          /casper/vmlinuz boot=casper integrity-check initrd=/casper/initrd.gz
                 ramdisk_size=1048576 root=/dev/ram rw
initrd          /casper/initrd.gz
boot

title           Memory test
root            (hd0,0)
kernel          /install/mt86plus
boot

How to compile GROMOS96 on APAC (ac)

In order to run parallel version of GROMOS96 on APAC (ac) the following changes should be made:

In ../src/prom_db.F change the line

    call system (
   $'cat /proc/cpuinfo |grep MHz| awk {print $4} > tmp.info.xyz')

to

    call system (
   $"cat /proc/cpuinfo |grep MHz| awk '{print $4}'> tmp.info.xyz")

Single quotes became a double quote and the pair of single quotes before and after the {} became just one single quote each.

You should make the same corrections a couple of lines later as well even though the code will not enter that conditional.

Then a bit further on change it to read


   call system (
   $"cat /proc/cpuinfo |grep model |
   $  awk -F: '{print $2}' > tmp.info.xyz")

We should thank Dr Margaret Kahn from APAC for this solution.