Clone wiki

site / how_to_setup_dpkg_zone

How to setup DPKG zone

(This instruction for DilOS: www.dilos.org)

  • Create dataset (need run at ones)
zfs create -o mountpoint=/zones rpool/zones
  • If you try to setup DPKG zone on DEB based system you have to skip next step.
    You have to install packages on IPS based system:
pkg install gnupg - you can skip this step in you have updated your system by DilOS packages

# need to fix package 'gnupg' in OI userland
# workaround
ln -s /usr/bin/gpgv2 /usr/bin/gpgv

pkg set-publisher -p http://ips.dilos.org:10000/
pkg set-publisher -P dg.dilos.org
pkg set-publisher -P du.dilos.org

pkg set-publisher --non-sticky opensolaris.org
pkg set-publisher --non-sticky openindiana.org

pkg install apt apt-utils dilos-keyring \
	pkg://du.dilos.org/system/zones/brand/dpkg \
	pkg://du.dilos.org/dpkg

apt-key update
  • If you try to setup DPKG zone on IPS based system you have to skip next step.
    You have to install package on DEB based system:
apt-get install system-zones-brand-dpkg
  • Update your /etc/apt/source.list with correct repos DEB packages will be installed from these repos.

For example:

deb http://apt.dilos.org/dilos dilos-testing main contrib non-free

NOTE: if you try to configure DPKG zone on oi151a5 try to use 'dilos-oi-testing' instead of 'dilos-testing'
because oi151a5 have older illumos kernel then DilOS

After update /etc/apt/source.list need run update:

apt-get update

You can try commands below as example for setup DPKG zone:

zonecfg -z t4

zonecfg:t4> create -t SUNWdpkg
zonecfg:t4> set zonepath=/zones/t4

zonecfg:t4> add net
zonecfg:t4:net> set address=172.16.92.4/16
zonecfg:t4:net> set defrouter=172.16.90.1
zonecfg:t4:net> set physical=e1000g0
zonecfg:t4:net> end

zonecfg:t4> add fs
zonecfg:t4:fs> set dir=/export/home/admin
zonecfg:t4:fs> set special=/export/home/admin
zonecfg:t4:fs> set type=lofs
zonecfg:t4:fs> end

zonecfg:t4> add fs
zonecfg:t4:fs> set dir=/export/builds
zonecfg:t4:fs> set special=/export/builds
zonecfg:t4:fs> set type=lofs
zonecfg:t4:fs> end

zonecfg:t4> commit
zonecfg:t4> verify
zonecfg:t4> exit
  • Install zone:
zoneadm -z t4 install
  • Boot zone:
zoneadm -z t4 boot
  • Login to zone for configuration:
zlogin -e\# -C t4

Hint: type '#.' for exit form zlogin

Example of screens based on my local system you can find here: screens of zone configuration

  • Login by 'root' for next modifications:
t4 console login: root
Password: <your own>

You can add local admin user with the same UID/GID from global zone.
Before this step you have to identify UID and GID of user by command: id <user>

# useradd -u 1000 -g staff -d /export/home/admin -s /bin/bash admin
# passwd admin

You be able to login to your new zone by SSH from global zone or another comp by command:

$ ssh admin@<your ip>

Updated