Skip to content

Installing Omnet++ in Debian 9 chroot Jail Under Debian 11 Host OS

Problems in installing Omnet++ under Native and Virtual Hardware/OS:

The  most common issues that we may face under native hardware a

re:

  1. The Unix/Linux variant operating system(host OS) that is installed in the native hardware will not support or will not
  2.  have the necessary version of GCC and other dependent packages that are needed to compile Omnet++ successfully.
  3. Further, if we try to install the necessary version on GCC and other dependent packages under the host operating system, then it may raise some package conflicts so that some of the software that is previously installed in the system may fail to work.

The  most common issues that we may face under type II hypervisors are:

  1. Generally, the virtual hardware (under VirtualBox or VMWare or Microsoft Virtual PC) will not have sufficient memory (RAM); so that the software that are requiring high memory and disk i/o will run with poor performance in terms of speed under virtualization.
  2. Since some components of Omnet++ expects a 3D graphic acceleration hardware by default, and such 3D graphics hardware will not be available or will not be configured under virtualization, (Even if we can successfully complete the compile process under VM) simply, Omnet++  fails to start with some ‘3D graphics’ related errors.

 

Chroot based Virtualization

According to Wikipedia “A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally cannot access) files outside the designated directory tree. The modified environment is called a chroot jail.”

So, using this amazing chroot facility, we can easily install any guest UNIX/Linux variant under a host operating system and install/compile any software without disturbing the packages and software that are installed on the guest OS.

It is a classical and unique way of virtualization.

Installation of Debian 9 Stretch (64 bit) chroot Jail Environment under Debian 11

The Installation Requirements of chroot jail environment in Host

  1. Any version of unix/linux desktop Host OS installation ( we need not worry about the version of GCC and other libraries installed in the Host OS)
  2. binutils and debootstrap package

 

Installation of chroot Jail

Step 1: Install the dependencies 

$ sudo apt install binutils  debootstrap

 

Step 2: Create a directory for holding the root file system (of the guest OS -Debian 9). Here I am creating a folder  “Debian9StretchAMD64” under a partition that is mounted under /mnt/Virtual.

$ cd /mnt/Virtual
$ mkdir Debian9StretchAMD64 

 

Step 3: Download the entire directory structure of 64 bit Debian 9 (Stretch) Linux under the folder Debian9StretchAMD64 using debootstrap command

$ sudo debootstrap –arch=amd64 stretch ./Debian9StretchAMD64 http://deb.debian.org/debian

The following  image shows the downloaded root directory structure of Debian 9 under the mounted file system of Host OS Debian 11

 

 

Step 4: Download the entire directory structure of 64 bit Debian 9 (Stretch) Linux under the folder Debian9StretchAMD64 using debootstrap command

# export display environment of host OS for running GUI application of chroot (guest) using the host OS’s windowing system.
$ export DISPLAY=:0.0
$ xhost +

# Enter into chroot jail
$ cd /mnt/Virtual
$ sudo chroot ./Debian9StretchAMD64

The above command opens the terminal of chroo jail Environment.

The following terminal output shows the root (/) of the chroot jail.

 

 

So the above terminal is a root (/) file system of the Debian 9 Stretch which is under chroot jail.

From this terminal, we can not access the root file system of the Debian 11 host. So we can safely do all our installations and experiments under this chroot jail.

The following is the view from the host OS’s desktop. Here the left side file explorer shows the absolute path of the chrooted folder.  But the right-side terminal shows the same location under restricted chroot jail.

 

 

Installation of Omnet++ 5.6.2 Under Chroot Jail

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

The following screenshots of the guest OS (Debian 11) shows the starting of Omnet++ gui from the chrooted Debian 9.

 

The startup window of Omnet++

 

Selecting the default work space

 

The Omnet++ IDE with  selected project

Running an Example simulation

The following screenshot shows the output of running a 3D satellite network simulation under Omnet++.  

Final Note :

We have to keep in mind that the simulation is actually running in Debian 9 (chrooted Guest OS) and only just showing its output on Debian 11’s (Host OS) windowing system. The important thing we have to understand here is, the application which is running under chroot jail environment will get the native or near-native performance of the Host OS and Host hardware. So, we are getting the native software and hardware performance under this unique virtualization technology.

Important: If you face any issues or error while  running  Omnet++ GUI under chroot, then you have to mount  the /proc and /dev file systems of the host under the root / of  chroot (mount -t proc /proc proc/) before entering into chroot jail.  

 

The following is another example of chroot based installation :

References:

  1. https://doc.omnetpp.org/omnetpp/InstallGuide.pdf
  2. https://en.wikipedia.org/wiki/Chroot
WhatsApp Discuss Through WhatsApp