| Solaris |
|
|
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.
The following distributions have been tried:
The following applications/features have been tested on CentOS [45].x and Ubuntu 7 and seem to work:
The following applications/features have been tested on CentOS 5.x and seem to work:
The following applications/features are known to be broken or unsupported:
The following applications/features have not been tested and it's unknown if they will work:
These are some of the known problems. Note that this is not a complete list.
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://hub.opensolaris.org/bin/download/Community+Group+brandz/linux_2_6/SUNWlx26.xml
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.
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://hub.opensolaris.org/bin/download/Community+Group+brandz/linux_2_6/lxinitzone
mv lxinitzone 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.
Terms of Use
|
Privacy
|
Trademarks
|
Copyright Policy
|
Site Guidelines
|
Site Map
|
Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
© 2012, Oracle Corporation and/or its affiliates.