CERN Scientific Linux

CERN Scientific Linux is a derivative of Red Hat Enterprise Linux (RHEL), probably the most used and known Linux distribution in corporate environment.

RHEL requires a paying license to be used, but its source code is released for free. There are several free Linux distributions which are made by re-compiling the RHEL source. These distros permit to enjoy at no cost a powerful and full-fledged Linux distro such as RHEL, albeit obviously lacking benefits such as Red Hat support or Red Hat security certification.
Examples of these derivatives are CentOS, Oracle Linux, and Scientific Linux, created by Fermilab and CERN. CERN Scientific Linux is in fact Scientific Linux customized for the CERN lab.

Here I'll briefly explain how to install CERN Scientific Linux 6.3 (Carbon), the latest release, on a VMware virtual machine.
This is intended only for external users; if you're at CERN, follow the official guidelines from CERN IT instead.

Install

First, download the SLC 6.3 ISO from CERN.

Create a VM using Red Hat Enterprise Linux 6, 64-bit as a template. Give it 2048 Mb RAM and a 20-Gb hard disk. Then, start installing the ISO on it.

The installation is pretty straightforward, and you can safely let the installer proceed with the default options. When partitioning the disk, ensure you select "Replace existing Linux system(s)" to correctly create a main Linux partition with a 4-Gb swap. When you're asked to choose the installation type, which defines the packages and services to install on the machine, select the recommended CERN configuration.

Upon first reboot yum-autoupdate will update all necessary packages over the network.
A configuration session will follow. In the section "CERN customization", you must choose the option "I will do the setup myself" since your machine is not at CERN.

Once this is completed, you'll be presented with the GNOME environment in all its glory.

It is useful to install VMware Tools on the Linux VM. To do so proceed as follows:

On VMware Player, select Virtual Machine -> Install VMWare Tools and wait until the latest version of VMWare Tools is downloaded.
Then, issue the following commands on a shell logged in as root:

mkdir /vmtmp
cd /vmtmp
mount -o ro /dev/cdrom /mnt
cp /mnt/* .
tar xvfz VMwareTools-*
cd vmware-tools-distrib
perl vmware-install.pl

When running the Perl script, accept all default settings. Once installation and configuration is finished, delete the /vmtmp directory and reboot the VM.

Suspend / Restore

One of the big advantages of a VM (along with being able to run two OSes at the same time on your laptop) is the ability to suspend and restore from where you left. There are some caveat, though.

A restored VM will have a huge time offset, because the clock on the host OS was frozen at the instant the VM was suspended. In this case the NTP daemon detects an erratically clock behaviour and will exit. VMware therefore suggests to add the line

tinker panic 0

at the top of /etc/ntp.conf to force the NTP daemon to run.
This fix may have nasty side effects if applied alone. The panic exit has the purpose of protecting NTP from large leaps backwards or forwards should a NTP source become a falseticker (i.e. it fails and starts giving the wrong time).

Since we have disabled the panic protection, we need also to ensure that we have at all times sufficient reliable sources for time synchronization. We must hence specify at least four timeservers on /etc/ntp.conf:

server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org
server 3.rhel.pool.ntp.org

With this configuration, NTP should be able to sync to the correct time within a few minutes from restore.

An alternative is to use ntpdate to do an immediate sync. If you choose to do so you must install the ntpdate package, and stop ntpd before running ntpdate. It is better not to resort to it, as the NTP daemon includes sophisticated algorithms to improve accuracy and reliability of the clock.

VMware Tools can be used, too, for this purpose. To enable time synchronization, run the shell command vmware-toolbox-cmd timesync enable. Alternatively, you can do so from the GUI by running vmware-toolbox and tick the option Time synchronization between the virtual machine and the host operating system.



by Daniele Raffo         page created on 5 December 2012