You are here: CBM Wiki>Homepages Web>HomepageFlorianUhlig>UbuntuFlorianUhlig (revision 2)EditAttach

Download the iso image

Get the ISO image of the 32bit Ubuntu desktop version from the official download location at Ubuntu.com.

Create a new Virtual machine with Virtualbox

Create a new virtual machine with 1 CPU, 1 GB memory and 30 GB dynamic disk. The acceleration options for the graphics should be switched off. The settings are chosen in such a way that the image can run on nearly any computer. The settings could be changed later on by the users to their needs.

Install Ubuntu on the virtual machine

Connect the ISO image from the download above with the CD device of the virtual machine. If done start the virtual machine which will load the image and stop in some menu to choose the preferred language. Choose English which is the most common language for all Physicists. In the next menu choose Install Ubuntu. Concerning questions about the installation procedure please read the Ubuntu documentation. At the end of the installation procedure the virtual machine has to be restarted and the computer will boot in the newly installed system.

Install Ubuntu Guest Additions on the virtual machine

Follow the instructions given here if you are not sure what to do. After installation reboot the virtual machine that the new functionality can take effect.

Install additional software

Open a terminal window and become root and use apt-get to install additional software. This is much faster then using the Ubuntu Software Center.

 
sudo su 

Software needed to be able to download and compile external packages and FairRoot

apt-get install g++ gfortran subversion cmake patch libx11-dev libxpm-dev libxmu-dev libxft-dev \
libxext-dev libglu1-mesa-dev

Editors

apt-get install joe emacs xemacs21 xfte

Additional usefull stuff

apt-get install clang cppcheck apt-show-versions

Remove unnecessary data

Clean up your package installations (partial packages, the apt cache and unused dependencies). This will release some hundreds MB depending of the installed packages. There are more steps which can be done (see here).

sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

Shrink the disk image used by the virtual machine

Since the disk image is a big file it is growing all the time. Even if one delete files in the virtual machine the size of the disk image can't be reduced automatically. VirtualBox comes with command line tools which will do shrink the size of the disk image. Unfortunately a simple on the host filesystem

VBoxManage modifyhd --compact <full path to disk image>

will not do the job. The problem is that the blocks freed in the virtual machine are still occupied in the disk image. Fortunately there is a tool which will do this job. To use it you have to shutdown the running virtual machine. When now booting press the shift key on the keyboard to get the boot loader menu. There chose the recovery mode. At the next menu chose root Drop to the root shell prompt which will bring up a root shell. Check with

df

which is the device file for the root filesystem and remount this filesystem readonly by doing

mount -n -o remount,ro -t ext4 /dev/sda1 /

Now you can run the zerofree tool (find description here which will release all free blocks.

zerofree /dev/sda1

where /dev/sda1 is the device file of the root file system which can be different. After the tool finished the run shutdown the virtual machine

shutdown -h now

and run on the host filesystem again the command to shrink the disk image

VBoxManage modifyhd --compact <full path to disk image>

Create a snapshop

Now after you installed all the additional you end up with a basic system which can be used to install any experiment specific software (CbmRoot, PandaRoot ...). So this is a good point to safe a snapshot of the virtual machine. From this snapshot you can create independent version which will fulfill different tasks. For doing a snapshot one has two different possibilities. Either one clones the machine which will create a one to one copy with a different name and also a new copied disk image. The second possibility is to save the state as a snapshot which will create a new overlaid disk image which will contain all the changes made after creating the snapshot. This allow to test new stuff with the safety to go easily back to the original system. Which solution fits better has to be decided on the special case.

To safe the state as snapshot or clone click on the icon Snapshot in the main window of VirtualBox. Here you can chose now between Snapshop (camera symbol) or Clone (Sheep symbol).

Install the software

Download the external packages from the SVN repository and install them at /opt/fairsoft as user root.

mkdir -p /opt/fairsoft/source
cd /opt/fairsoft/source
svn co https://subversion.gsi.de/fairroot/fairsoft/release/jan12
cd /opt/fairsoft/source/jan12

Edit the configure.ah script and set the install directory for the automatic setup to the correct location /opt/fairsoft/jan12.

Edit the file scripts/check_system.sh and add the following searchpath _/usr/lib/i386-linux-gnu to any list of directories where to look for libraries. This is specially needed for Ubuntu.

Run the configure.sh script in automatic mode to install the external packages.

./configure.sh automatic

-- FlorianUhlig - 12 Jun 2012
Edit | Attach | Print version | History: r12 | r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r2 - 13 Jun 2012, FlorianUhlig
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CBM Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)