Experimental Linux 2.6 Support
In OpenSolaris build 72 the lx brand was enhanced with experimental Linux 2.6 kernel emulation support. This enhancement was made by Evan Hoke from CMU. This support is not complete (as documented below) but it addresses the basic issues of allowing users to install, boot, and use Linux 2.6 based zones. It should also make it much easier for interested community members to do application/feature testing and to contribute fixes.
Distribution support
The following distributions have been tried:
*CentOS [45].x - Installs from archives, boots, and runs reasonably well.
*Ubuntu 7 - Won't install by default, boots, but many commands don't work.
Application/Feature testing support:
The following applications/features have been tested on CentOS [45].x and Ubuntu 7 and seem to work:
*Sshd
The following applications/features have been tested on CentOS 5.x and seem to work:
*Gnome
*KDE
*Firefox
*Thunderbird
*Gaim
*AcrobatReader
*OpenOffice
*Java
*AdobeFlash
The following applications/features are known to be broken or unsupported:
*apache - CentOS [45].x and Ubuntu 7
*evince - CentOS 5.x
*console login - Ubuntu 7
*apt-get - Ubuntu 7
The following applications/features have not been tested and it's unknown if they will work:
*Audio
*NFS Client
*Automounter
*x11 applications - Ubuntu 7
Known Issues
These are some of the known problems. Note that this is not a complete list.
*CD and ISO based zone installation is not supported for any Linux 2.6 based distributions.
*Archive based zone installation is broken for Ubuntu. Installing Ubuntu based zones is possible with a modified versions of the lx brand install scripts (available below).
*CentOS init complains: INIT: Id "co" respawning too fast: disabled for 5 minutes. This problem can be fixed by editing /etc/inittab in the zone and commenting out the line that begins with "co:".
*The inotify subsystem is currently not emulated. This means that files will fail to refresh automatically in Gnome and certain applications such as evince are broken.
*Edge poll system calls are unimplemented. This breaks apache.
*SELinux is not supported. (It must be disabled by setting "SELINUX=disabled" in /etc/selinux/config.)
*Auditing is not supported.
Enabling Linux 2.6 Support
To enable support for the creation of Linux 2.6 based zones you should first ensure that you are running an OpenSolaris based distribution that is sync'd up with snv_72 or later. Then download the following zone template file, SUNWlx26.xml,
and copy it into /etc/zones.
cd /etc/zones
wget http://www.opensolaris.org/os/community/brandz/files/SUNWlx26.xml
Installing and Booting CentOS [45].x
First, be sure to enable Linux 2.6 support as described above.
Since installation from CD/ISOs is currently not supported
you will need to create a .tar.bz system archive file to install from.
To do this, install CentOS on real hardware and then tar up the root directory excluding the pseudo file systems.
For example, to create an archive named centos5.tar.bz on a CentOS 5.x system run the following commands as root (note, the command below will traverse filesystem boundaries and may need updating depending on your environment):
cd /
tar \-jcf centos5.tar.bz \-\-exclude centos5.tar.bz \-\-exclude dev \-\-exclude proc \-\-exclude sys \-\-exclude boot \*
Once you have created the archive file make it available on your Solaris system.
To create a Linux 2.6 based zone, use zonecfg to create a lx branded
zone just like you normally would, except when you issue the "create"
command within zonecfg you should specify the new template:
create \-t SUNWlx26
From here on out the install process is the same as for
normal lx branded zones
To install the zone run:
zoneadm \-z <zonename> install \-d /path/to/archive.tar.bz
The installation should go smoothly for CentOS [45].x. Next boot the zone and login.
zoneadm \-z <zonename> boot
zlogin \-C <zonename>
You may see some error messages as the zone boots up. Eventually will be presented with a login prompt.
Congratulation, you successfully installed a Linux 2.6 zone.
Installing and Booting Ubuntu 7
First, be sure to enable Linux 2.6 support as described above.
Now download the following modified lx_init_zone install script to replace the existing script in /usr/lib/brand/lx/. Even though this new installer script can install both Ubuntu and CentOS zones, you should probably make a backup of the original script before replacing it.
cd /usr/lib/brand/lx
mv lx~_init~_zone lx~_init~_zone.original
wget http://www.opensolaris.org/os/community/brandz/files/lx~_init~_zone
From here the install method is the same as for the CentOS zone.
(Create an .tar.gz system archive, zonecfg, zoneadm install, etc.)
You will see errors during the zone install phase, this is expected.
Note that since console login for Ubuntu is broken you will probably want to run zlogin without the -C option.