Difference between revisions of "Ubuntu"

From VNUML-WIKI
Jump to: navigation, search
(New page: <pre> Installing VNUML 1.7.0 over a fresh Ubuntu 6.02 LTS distribution ---------------------------------------------------------------- David Fernndez (david@dit.upm.es) Dpto. Ingeniera ...)
 
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
==Installing VNUML over a Ubuntu 6.06, 6.10 or 7.04==
 +
 +
 +
===Installation using debian package and vnuml repository===
 +
 +
<ol>
 +
 +
<li> Open a shell terminal ("Applications|Accesories|Terminal" menu option) and give it root priviledges:</li>
 +
 +
  sudo su
 +
 +
Note: remember that in Ubuntu when you issue a command preceded by '''sudo''' you have to type your own password, not the root one, which is normally disabled.
 +
 +
<li> Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
 +
</li>
 +
 +
* Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
 +
* Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
 +
 +
<li> Add VNUML repository to sources.list file:</li>
 +
 
<pre>
 
<pre>
 +
<nowiki>echo "deb http://jungla.dit.upm.es/~vnuml/debian binary/" >> /etc/apt/sources.list</nowiki>
 +
</pre>
  
Installing VNUML 1.7.0 over a fresh Ubuntu 6.02 LTS distribution
+
<li> Update and upgrade the system:
----------------------------------------------------------------
+
</li>
  
David Fernndez (david@dit.upm.es)
+
  apt-get update
Dpto. Ingeniera de Sistemas Telemticos
+
  apt-get upgrade
Universidad Politécnica de Madrid
 
version 1 - July 26th, 2006
 
  
 +
Note: you should restart the system after upgrading in case a new version of the kernel is installed.
  
 +
<li> Install vnuml package:
 +
</li>
  
Installation using debian package and vnuml repository:
+
  apt-get install vnuml
  
1 - Do the normal installation from Ubuntu CD.
+
<li> Install linux uml kernel:
 +
</li>
 +
  apt-get install linux-um
  
2 - Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
+
Alternatively, you can download and install the kernel manually:
 +
cd /usr/share
 +
tar xfvz linux-um_2.6.18.1-bb2-xt-2m.orig.tar.gz
 +
ln -s linux-um-2.6.18.1-bb2-xt-2m linux-um
 +
mv linux-um/linux-2.6.18.1-bb2-xt-2m /usr/share/vnuml/kernels
 +
ln -s /usr/share/vnuml/kernels/linux-2.6.18.1-bb2-xt-2m /usr/share/vnuml/kernels/linux
  
* Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
+
<li> Install root filesystem using root-fs-installer perl script:
    * Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
+
</li>
  
3 - Update and upgrade the system:
+
  cd /usr/share/vnuml/filesystems/
 +
  wget http://www.dit.upm.es/vnuml/download/scripts/root-fs-installer
 +
  perl root-fs-installer
  
> sudo su   
+
Alternatevely, you can download and install the rootfilesystem manually:
> apt-get update
+
  cp root_fs_tutorial-0.5.1.bz2 /usr/share/vnuml/filesystems
> apt-get upgrade
+
  cd /usr/share/vnuml/filesystems
+
  bunzip2 root_fs_tutorial-0.5.1.bz2
Note: remember that in Ubuntu when you issue a command preceded by sudo you have to type your own password, not the root one, which is disabled. You should restart the system after upgrading, as a new version of the kernel is installed.
+
  ln -s root_fs_tutorial-0.5.1 root_fs_tutorial 
 
 
 +
<li> Create ssh key:
 +
</li>
 +
 +
  ssh-keygen -t rsa1
 +
 +
<li> Installation is finished. Test simple.xml example to see if everything works:
 +
</li>
  
 +
  vnumlparser.pl -t /usr/share/vnuml/examples/simple.xml -v -u root
 
 
+
Note: if you execute the example from a "root" session, you should add the option "-u root" at the end of the line. There are some pending bugs that prevent a simulation to work when executed as "vnuml" user (the default when you do not use -u option) from a root session.
  
 +
</ol>
  
Installation steps:
+
=== Manual installation from tar file===
  
1 - Do the normal installation from Ubuntu CD.
+
<ol>
  
2 - Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
+
<li> Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
 +
</li>
  
* Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
+
* Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
    * Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
+
* Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
  
3 - Update and upgrade the system:
+
<li> Update and upgrade the system:
 +
</li>
  
> sudo su     
+
  sudo su     
> apt-get update
+
  apt-get update
> apt-get upgrade
+
  apt-get upgrade
 
 
Note: remember that in Ubuntu when you issue a command preceded by sudo you have to type your own password, not the root one, which is disabled. You should restart the system after upgrading, as a new version of the kernel is installed.
+
Note: remember that in Ubuntu when you issue a command preceded by sudo you have to type your own password, not the root one, which is normally disabled. You should restart the system after upgrading, as a new version of the kernel is installed.
+
 
4 - Install development utils and vlan support (optional):
+
<li> Install development utils and vlan support (optional):
 +
</li>
  
> apt-get -y install build-essential vlan
+
  apt-get -y install build-essential vlan
 
 
5 - Install VNUML related utilities and perl libraries:  
+
<li> Install VNUML related utilities and perl libraries:  
 +
</li>
  
> apt-get install bridge-utils uml-utilities
+
  apt-get install bridge-utils uml-utilities
> apt-get -y install libmodule-build-perl liberror-perl libexception-class-perl libxml-dom-perl libxml-checker-perl libterm-readkey-perl libnet-pcap-perl libnetwork-ipv4addr-perl libnetaddr-ip-perl
+
  apt-get -y install libmodule-build-perl liberror-perl \
 +
    libexception-class-perl libxml-dom-perl libxml-checker-perl \
 +
    libterm-readkey-perl libnet-pcap-perl libnetwork-ipv4addr-perl \
 +
    libnetaddr-ip-perl
  
Net::IPv6Addr perl module is not avalaible as debian package, so it has to be installed using MCPAN:
+
Net::IPv6Addr perl module is not avalaible as debian package, so it has to be installed using MCPAN:
 
 
> perl -MCPAN -e "install Net::IPv6Addr"
+
  perl -MCPAN -e "install Net::IPv6Addr"  
(answer "NO" if asked "Are you ready for manual configuration?". Answer the default option to other questions).
+
  (Note: answer "NO" if asked "Are you ready for manual configuration?")
 
 
6 - Download the latest version of VNUML from http://www.dit.upm.es/vnuml and:
+
<li>Download the latest version of vnuml parser from [http://www.dit.upm.es/vnumlwiki/index.php/Download VNUML site] and install it:
 +
</li>
 +
 
 +
  tar xfvz vnuml_1.7.3.orig.tar.gz
 +
  cd vnuml-1.7.3
 +
  ./configure --with-build_modules
 +
  make
 +
  make install    (Note: answer "NO" if asked "Are you ready for manual configuration?")
  
  > tar xfvz vnuml-1.7.0-1.tar.gz
+
<li> Download root filesystem (root_fs_tutorial-0.4.1.bz2) from [http://www.dit.upm.es/vnumlwiki/index.php/Download VNUML site] and:
> cd vnuml-1.7.0-1
+
</li>
  > ./configure
 
> make
 
> make install
 
  
7 - Download root filesystem (root_fs_tutorial-0.4.X.bz2) from VNUML sourceforge site and copy it to /usr/local/share/vnuml/filesystems. Create a symbolic link to it named "root_fs_tutorial":
+
  cp root_fs_tutorial-0.4.1.bz2 /usr/local/share/vnuml/filesystems
 +
  cd /usr/local/share/vnuml/filesystems
 +
  bunzip2 root_fs_tutorial-0.4.1.bz2
 +
  ln -s root_fs_tutorial-0.4.1 root_fs_tutorial
 
 
> cp root_fs_tutorial-0.4.X.bz2 /usr/local/share/vnuml/filesystems
+
<li> Download guest kernel (linux-2.6.16.27-bs2-xt-1m.tar.bz2) from [http://www.dit.upm.es/vnumlwiki/index.php/Download VNUML site] and:
> cd /usr/local/share/vnuml/filesystems
+
</li>
> bunzip2 root_fs_tutorial-0.4.X.bz2
+
 
   > ln -s root_fs_tutorial-0.4.X root_fs_tutorial 
+
  mkdir /usr/local/share/vnuml/kernels/src
+
  cp linux-2.6.16.27-bs2-xt-1m.tar.bz2 /usr/local/share/vnuml/kernels/src
8 - Download guest kernel (linux-2.6.XXXX.tar.bz2) from VNUML sourceforge site and copy it to /usr/local/share/vnuml/kernels/src. Untar the file, copy the kernel and create a symbolic link to it:
+
  cd /usr/local/share/vnuml/kernels/src
 +
  tar xfvj linux-2.6.16.27-bs2-xt-1m.tar.bz2
 +
   cp linux-2.6.16.27-bs2-xt-1m/linux-2.6.16.27-bs2-xt-1m ..
 +
  cd ..
 +
  ln -s linux-2.6.16.27-bs2-xt-1m linux
 +
 
 +
<li> Create ssh key:
 +
</li>
 +
 
 +
  ssh-keygen -t rsa1
  
  > mkdir /usr/local/share/vnuml/kernels/src
+
<li> Installation is finished. Test simple.xml example to see if everything works:
  > cp linux-2.6.XXXX.tar.bz2 /usr/local/share/vnuml/kernels/src
+
</li>
> cd /usr/local/share/vnuml/kernels/src
 
> tar xfvj linux-2.6.XXXX.tar.bz2
 
> cp linux-2.6.XXXX/linux-2.6.XXXX ..
 
> cd ..
 
  > ln -s linux-2.6.XXXX linux
 
 
9 - Create ssh key:
 
  
> ssh-keygen -t rsa1
+
  vnumparser.pl -t /usr/local/share/vnuml/examples/simple.xml -v -u root
 
 
10 - Installation is finished. Launch the "simple" example to see if everything works:
+
Note: if you execute the example from a "root" session, you should add the option "-u root" at the end of the line. There are some pending bugs that prevent a simulation to work when executed as "vnuml" user (the default when you do not use -u option) from a root session.
  
  > vnumparser.pl -t /usr/local/share/vnuml/examples/simple.xml -v
+
</ol>
 
Note: if you execute the example from a "root" session, you should add the option "-u root" at the end of the line. There are some bugs in 1.6.1-1 version that prevent a simulation to work when executed as "vnuml" user (the default when you do not use -u option) from a root session. Alternatively, you can execute the command "xhost +local:" to allow local X-windows connections.
 
  
+
==Installing SKAS patch in host kernel==
Installing host kernel with SKAS patch
 
--------------------------------------
 
  
 
VNUML works well over the standard kernel that comes with Ubuntu (using SKAS 0 mode). However, if you want to improve the performance, you can install the the SKAS 3 patch to the kernel. To do that:
 
VNUML works well over the standard kernel that comes with Ubuntu (using SKAS 0 mode). However, if you want to improve the performance, you can install the the SKAS 3 patch to the kernel. To do that:
  
1 - Install kernel sources and some system utilities:  
+
<ol>
 +
<li> Install kernel sources and some system utilities:  
 +
</li>
  
> apt-get install linux-source libncurses5-dev initrd-tools
+
  apt-get install linux-source libncurses5-dev initrd-tools
  
2 - Download SKAS3 patch from Blaisorblade's server and apply it to kernel sources:
+
<li> Download SKAS3 patch from Blaisorblade's server and apply it to kernel sources:
 +
</li>
  
> cd /usr/src
+
  cd /usr/src
> wget http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.15-v8.2/skas-2.6.15-v8.2.patch.bz2
+
  wget http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.15-v8.2/skas-2.6.15-v8.2.patch.bz2
> tar xfvj linux-source-2.6.15.tar.bz2
+
  tar xfvj linux-source-2.6.15.tar.bz2
> cd linux-source-2.6.15
+
  cd linux-source-2.6.15
> bzcat ../skas-2.6.15-v8.2.patch.bz2 | patch -p1
+
  bzcat ../skas-2.6.15-v8.2.patch.bz2 | patch -p1
  
3 - Configure, compile and install the new kernel:
+
<li> Configure, compile and install the new kernel:
 +
</li>
  
> make oldconfig
+
  make oldconfig
> make
+
  make
  (Note: I´ve got an error related to "drivers/usb/net/zd1211/zddevlist.h"; to solve it, do a "make menuconfig" and desactivate support for that usb card in "Device drivers|USB support|USB network adapters")
+
  Note: I´ve got an error related to "drivers/usb/net/zd1211/zddevlist.h"; to solve it, do a "make menuconfig" and desactivate support for that usb card in "Device drivers|USB support|USB network adapters")
> make modules
+
  make modules
> make modules_install
+
  make modules_install
> make install
+
  make install
+
 
Note: make install fails and does neither generate initrd file nor configure grub. Do it by hand:
+
Note: make install fails and does neither generate initrd file nor configure grub. Do it by hand:
 
 
> mkinitrd -o /boot/initrd.img-2.6-15.7-ubuntu1-skas3-v8.2 2.6-15.7-ubuntu1-skas3-v8.2
+
  mkinitrd -o /boot/initrd.img-2.6-15.7-ubuntu1-skas3-v8.2 2.6-15.7-ubuntu1-skas3-v8.2
 
 
And edit /boot/grub/menu.lst and add a new entry for the new kernel like (this is just an example; change the parameters as appropriate to your system):
+
And edit /boot/grub/menu.lst and add a new entry for the new kernel like (this is just an example; change the parameters as appropriate to your system):
 
 
title Ubuntu, kernel 2.6.15.7-ubuntu1-skas3-v8.2
+
  title Ubuntu, kernel 2.6.15.7-ubuntu1-skas3-v8.2
root (hd0,3)
+
  root (hd0,3)
kernel /boot/vmlinuz-2.6.15.7-ubuntu1-skas3-v8.2 root=/dev/hda4 ro quiet splash
+
  kernel /boot/vmlinuz-2.6.15.7-ubuntu1-skas3-v8.2 root=/dev/hda4 ro quiet splash
initrd /boot/initrd.img-2.6.15.7-ubuntu1-skas3-v8.2
+
  initrd /boot/initrd.img-2.6.15.7-ubuntu1-skas3-v8.2
savedefault
+
  savedefault
boot
+
  boot
+
</ol>
 
 
 
 
 
 
 
 
</pre>
 

Latest revision as of 00:32, 1 October 2007

Installing VNUML over a Ubuntu 6.06, 6.10 or 7.04

Installation using debian package and vnuml repository

  1. Open a shell terminal ("Applications|Accesories|Terminal" menu option) and give it root priviledges:
  2.  sudo su
    

    Note: remember that in Ubuntu when you issue a command preceded by sudo you have to type your own password, not the root one, which is normally disabled.

  3. Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
    • Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
    • Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
  4. Add VNUML repository to sources.list file:
  5. echo "deb http://jungla.dit.upm.es/~vnuml/debian binary/" >> /etc/apt/sources.list
    
  6. Update and upgrade the system:
  7.  apt-get update
     apt-get upgrade
    

    Note: you should restart the system after upgrading in case a new version of the kernel is installed.

  8. Install vnuml package:
  9.  apt-get install vnuml
    
  10. Install linux uml kernel:
  11.  apt-get install linux-um
    

    Alternatively, you can download and install the kernel manually:

    cd /usr/share
    tar xfvz linux-um_2.6.18.1-bb2-xt-2m.orig.tar.gz
    ln -s linux-um-2.6.18.1-bb2-xt-2m linux-um 
    mv linux-um/linux-2.6.18.1-bb2-xt-2m /usr/share/vnuml/kernels
    ln -s /usr/share/vnuml/kernels/linux-2.6.18.1-bb2-xt-2m /usr/share/vnuml/kernels/linux
    
  12. Install root filesystem using root-fs-installer perl script:
  13.  cd /usr/share/vnuml/filesystems/
     wget http://www.dit.upm.es/vnuml/download/scripts/root-fs-installer
     perl root-fs-installer
    

    Alternatevely, you can download and install the rootfilesystem manually:

     cp root_fs_tutorial-0.5.1.bz2 /usr/share/vnuml/filesystems
     cd /usr/share/vnuml/filesystems
     bunzip2 root_fs_tutorial-0.5.1.bz2
     ln -s root_fs_tutorial-0.5.1 root_fs_tutorial  
    
  14. Create ssh key:
  15.  ssh-keygen -t rsa1
    
  16. Installation is finished. Test simple.xml example to see if everything works:
  17.  vnumlparser.pl -t /usr/share/vnuml/examples/simple.xml -v -u root
    

    Note: if you execute the example from a "root" session, you should add the option "-u root" at the end of the line. There are some pending bugs that prevent a simulation to work when executed as "vnuml" user (the default when you do not use -u option) from a root session.

Manual installation from tar file

  1. Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
    • Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
    • Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
  2. Update and upgrade the system:
  3.  sudo su     
     apt-get update
     apt-get upgrade
    

    Note: remember that in Ubuntu when you issue a command preceded by sudo you have to type your own password, not the root one, which is normally disabled. You should restart the system after upgrading, as a new version of the kernel is installed.

  4. Install development utils and vlan support (optional):
  5.  apt-get -y install build-essential vlan
    
  6. Install VNUML related utilities and perl libraries:
  7.  apt-get install bridge-utils uml-utilities
     apt-get -y install libmodule-build-perl liberror-perl \
       libexception-class-perl libxml-dom-perl libxml-checker-perl \ 
       libterm-readkey-perl libnet-pcap-perl libnetwork-ipv4addr-perl \
       libnetaddr-ip-perl
    

    Net::IPv6Addr perl module is not avalaible as debian package, so it has to be installed using MCPAN:

     perl -MCPAN -e "install Net::IPv6Addr" 
     (Note: answer "NO" if asked "Are you ready for manual configuration?")
    
  8. Download the latest version of vnuml parser from VNUML site and install it:
  9.  tar xfvz vnuml_1.7.3.orig.tar.gz
     cd vnuml-1.7.3
     ./configure --with-build_modules
     make
     make install    (Note: answer "NO" if asked "Are you ready for manual configuration?")
    
  10. Download root filesystem (root_fs_tutorial-0.4.1.bz2) from VNUML site and:
  11.  cp root_fs_tutorial-0.4.1.bz2 /usr/local/share/vnuml/filesystems
     cd /usr/local/share/vnuml/filesystems
     bunzip2 root_fs_tutorial-0.4.1.bz2
     ln -s root_fs_tutorial-0.4.1 root_fs_tutorial  
    
  12. Download guest kernel (linux-2.6.16.27-bs2-xt-1m.tar.bz2) from VNUML site and:
  13.  mkdir /usr/local/share/vnuml/kernels/src
     cp linux-2.6.16.27-bs2-xt-1m.tar.bz2 /usr/local/share/vnuml/kernels/src
     cd /usr/local/share/vnuml/kernels/src
     tar xfvj linux-2.6.16.27-bs2-xt-1m.tar.bz2
     cp linux-2.6.16.27-bs2-xt-1m/linux-2.6.16.27-bs2-xt-1m ..
     cd ..
     ln -s linux-2.6.16.27-bs2-xt-1m linux
    
  14. Create ssh key:
  15.  ssh-keygen -t rsa1
    
  16. Installation is finished. Test simple.xml example to see if everything works:
  17.  vnumparser.pl -t /usr/local/share/vnuml/examples/simple.xml -v -u root
    

    Note: if you execute the example from a "root" session, you should add the option "-u root" at the end of the line. There are some pending bugs that prevent a simulation to work when executed as "vnuml" user (the default when you do not use -u option) from a root session.

Installing SKAS patch in host kernel

VNUML works well over the standard kernel that comes with Ubuntu (using SKAS 0 mode). However, if you want to improve the performance, you can install the the SKAS 3 patch to the kernel. To do that:

  1. Install kernel sources and some system utilities:
  2.  apt-get install linux-source libncurses5-dev initrd-tools
    
  3. Download SKAS3 patch from Blaisorblade's server and apply it to kernel sources:
  4.  cd /usr/src
     wget http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.15-v8.2/skas-2.6.15-v8.2.patch.bz2
     tar xfvj linux-source-2.6.15.tar.bz2
     cd linux-source-2.6.15
     bzcat ../skas-2.6.15-v8.2.patch.bz2 | patch -p1
    
  5. Configure, compile and install the new kernel:
  6.  make oldconfig
     make
     Note: I´ve got an error related to "drivers/usb/net/zd1211/zddevlist.h"; to solve it, do a "make menuconfig" and desactivate support for that usb card in "Device drivers|USB support|USB network adapters")
     make modules
     make modules_install
     make install
     
    

    Note: make install fails and does neither generate initrd file nor configure grub. Do it by hand:

     mkinitrd -o /boot/initrd.img-2.6-15.7-ubuntu1-skas3-v8.2 2.6-15.7-ubuntu1-skas3-v8.2
    

    And edit /boot/grub/menu.lst and add a new entry for the new kernel like (this is just an example; change the parameters as appropriate to your system):

     title		Ubuntu, kernel 2.6.15.7-ubuntu1-skas3-v8.2
     root		(hd0,3)
     kernel		/boot/vmlinuz-2.6.15.7-ubuntu1-skas3-v8.2 root=/dev/hda4 ro quiet splash
     initrd		/boot/initrd.img-2.6.15.7-ubuntu1-skas3-v8.2
     savedefault
     boot