The bioinformatics lab SS 2011

From Rost Lab Open
Revision as of 13:28, 1 February 2011 by Schmidb (talk | contribs) (New page: This practical is a hands-on training that will make you successful in a Bioinformatic lab! All the services and details from bottom up, e.g. Wiki, version control, compute cluster, softwa...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This practical is a hands-on training that will make you successful in a Bioinformatic lab! All the services and details from bottom up, e.g. Wiki, version control, compute cluster, software packaging

More details can be found at the website.

External media / installing a Linux OS / Debian stable / Linux kernel

  1. date: 2010 / 04 / 19
  2. responsible: Laszlo
  3. topics: Linux distributions, rpm vs. deb, stable vs. bleeding edge; decisions to make at the time of system installation. Partitioning, LVM, cryptsetup; kernel modules, boot loader, initramdisk; dpkg, apt, aptitude, apticron; sysctl, /proc, /sys
  4. links for preparation:

Programming Challenge

Install and configure a Debian stable base system on your USB stick. Be careful with the partition, only use the USB device. Do not forget to enable boot on USB in your BIOS. Get familiar with vim.

Hints and tips

  1. Choose English so Laszlo can help
  2. Choose manual partitioning and make sure you leave alone all drives except the USB stick
  3. Note the device name of the USB stick, something like 'sda', 'sdb'...
  4. Have 3 partitions on the USB stick: one for a /boot file system which should be bootable and not more that 512 MB; one for swap space - 512MB; one for a / (root) file system. ext3 is a good choice for the /boot and / file systems.
  5. There is no proxy for accessing the internet
  6. Choose NOT to install the boot loader into the first hard drive: 'Install the GRUB boot loader to the master boot record?' NO
  7. Install the boot loader to the device you noted at step 3 above, e.g. /dev/sdb. Be careful not to install GRUB onto your hard drive.
  8. Boot from the USB key. Chances are this is going go fail because the way the installer installs GRUB (the boot loader) is not the best for removable devices.
  9. If booting fails with Error 17: Can not mount selected partition - the error we observed so far - hit 'e' on the grub screen to edit the first menu option. Hit 'e' again to edit the line root (hdX,Y). 'X' represents the hard drives as the BIOS sees them, numbered from 0. Error 17 indicates the the presently set hard drive does not contain a /boot partition where indicated by the 'root' line, so experiment with other numbers, e.g. 0: root (hd0,0). Do not change the second number 'Y': that indicates the partition and is likely to be correct. Try booting with the new 'root' line (hit 'b'). This modification is not permanent.
  10. Getting the 'root' line right should enable you to boot into Linux. The permanent solution is to use GRUB2 instead of GRUB. GRUB2 uses the universally unique identifier (UUID) to indicate root and boot partitions and so can handle removable devices well.
  11. Once you booted Linux log in as root and replace GRUB with GRUB2. You are going to need a working network connection for this step (courtesy of Fabian). Start the package manager 'aptitude'. Hit '?' and learn the keys' meanings. Search for the package 'grub2' and mark it for installation. Install it. Answer NO to the question whether to chain-load GRUB2. When the installation is complete exit aptitude.
  12. Install this version of grub to the master boot record of the USB key: execute update-grub. Find the current device name of the usb key, e.g. with mount, looking for a line like /dev/sda3 on /boot type ext3. In this case the USB stick is /dev/sda. Execute grub-install with the device for the USB key, e.g. grub-install /dev/sda.
  13. Reboot from the USB key - this time it should boot cleanly into Linux.

Advanced challenge

Install Debian into an encrypted partition.

Materials and methods


By Stefan Seemayer:

Shell scripts, command line (terminal) editors and compilation

  1. date: 2010 / 04 / 26
  2. responsible: Markus
  3. topics: vim, emacs, shell scripts, gcc, makefiles, automake, autoconf, kernel and module compilation
  4. links for preparation:

Programming Challenge

Write a short C / perl / python program that reads text from a file, removes all spaces and writes the result back into a file. Create a distributable tar ball of your program using automake and autoconf. Add a man page as well. Get familiar to command line editors. We advise to implement this programming challenge with vim.

Advanced challenge

Compile the kernel of your choice making your hard drive, video card and network card drivers compiled in (not in modules). Do the kernel compilation on an in-memory file system (such as tmpfs) - doing it on the USB stick would take forever.

Hints and tips

Automake and autoconf

  1. Edit your package sources list (/etc/apt/sources.list) and enable the 'contrib' and 'non-free' sections of the repository: add contrib and non-free after 'main' on each deb and deb-src line. Refresh the package cache.
  2. Install the 'make', 'make-doc', 'automake' and 'autoconf-doc' packages: these provide automake, autoconf and the info documentation
  3. Learn to navigate the info browser (do info automake, press '?' and read)
  4. Read section 1 Introduction and 2 Autotools Introduction up to and including 2.2.4 Standard Configuration Variables.
  5. Follow the examples (e.g. 'zardoz') in the automake info to create your and You will want to have at least these macros in your
    Use the documentation to find out more about these.
  6. You can use the --prefix ./configure option to test the install target at a custom location (e.g. --prefix=/tmp/test)
  7. I recommend you use the pod syntax to create the man page. Install the 'perl-doc' package to gain access to the 'perlpod' manpage. Read: man perlpod; man pod2man.
  8. Create rules in to have make generate the manpage for your script from a .pod source