Create customized NexentaCore-based distributions
NexentaCore is a minimal (core) foundation that can be used to quickly build servers, desktops, and custom distributions tailored for specialized applications.
With power of Debian tools behind it, NexentaCore could be customized for any vertical application or distribution: KDE, GNOME, XFCE centric Desktops, LAMP servers, Xen Dom0 ZFS-powered servers, and more.
Nexenta Builder is a developer's kit that integrates a set of tools and applications into freely installable and redistributable package. The Builder simplifies the process of creating a new ISO, and is used by the Nexenta Core team to produce Nexenta ISO images.
Interested individuals, communities and companies could create highly customized and polished NexentaCore based distributions tailored for specific verticals - 'software appliances'.
In addition to Nexenta Builder, Nexenta Platform is capable of merging multiple specialized remote application repositories (APT) into a single upgrade source, which allows to create and have as many distributed (but well organized!) repositories as user wants to be available for his specific needs.
Such distributions could be:
- Embedded OS with small footprint of 128MB or less
- KDE-centric Desktop
- GNOME-centric Desktop
- XFCE-centric Desktop or so called 'minimalistic Unix Desktop'
- Specialized Web Server appliance
- Specialized Database appliance
- Xen Dom0 - ZFS powered appliance
- Sound Studio with best of class OSS Sound stack integrated appliance
- Graphical Studio appliance
- Medical appliance
- Financial appliance
- Game station appliance
-
Storage appliances, such as NexentaStor (good example of commercial appliance)
- . and many many others!
Simplify OpenSolaris distribution creation with Nexenta Builder!
Step 1. Setting up the build machine
Recommended hardware for the build machine:
- 2-way Opteron system
- 4GB RAM
- 10GB of free disk space
Software requirements:
- NexentaOS. We recommend to use the latest available stable NCP version.
Other requirements:
- Superuser privileges.
Installation of nexenta-builder is simple, as everything else in Nexenta: just type one command 'apt-get install nexenta-builder'. And here is an example:
# apt-get install nexenta-builder (Reading database ... 45701 files and directories currently installed.) Preparing to replace nexenta-builder 1.0-1 (using .../nexenta-builder_1.0-1_solaris-i386.deb) ... Unpacking replacement nexenta-builder ... Setting up nexenta-builder (1.0-1) ...
Step 2. Customize set of packages
First, review configuration file /etc/nbld.cf and make sure that all looks good. Note: as of the v1.0, nexenta-builder requires local copy of the entire APT repository. Use the following command to retrieve official repository:
# rsync --inplace --delete -avHr nexenta.org::repository/* /tank/ncp
Make sure /tank/ncp location exists. We recommend to use ZFS for APT storage (assuming 'tank' is your ZFS pool):
zfs create tank/ncp
Second, you'll need to sign up on-ISO APT repository during bootstrap stage. Make sure your GNU GPG key is properly configured. Use CreatePublicGPGKey page for detailed instructions. If you are a Debian or Nexenta developer, you'll likely will have it ready and you could skip this step.
At this point you can customize your local APT repository, add/remove packages, etc. Currently nexenta-builder can't build ISO from several repositories. However, it is not difficult to setup debarchiver and debootstrap to work with multiple input repositories for package resolution and extraction.
Lets create new ISO profile:
cp /usr/lib/nbld/core.profile /usr/lib/nbld/mycore.profile edit /usr/lib/nbld/mycore.profile edit /etc/nbld.cf
While editing /etc/nbld.cf, change mode="core" to mode="mycore". While editing mycore.profile, add some more Debian packages you want to be there.
You likely would want to do more customizations, especially if you want to release new polished like KDE or GNOME Desktop oriented distribution. Take a look how /usr/lib/nbld/nexenta-installer.sh is organized - it supports profiles, and capable of running commands after installation process. Example of core.profile:
product_title="NexentaCP" rootsize1="1024" profile1="core" lines1="3000" desc1="Standard Core installation profile" longdesc1="" profiles="1" dot_screenrc="core-dot-screenrc" release_file="core-release.txt" apt_sources="http://apt.nexenta.org elatte-stable main contrib non-free" ks_min_mem_required="256" ks_rootdisk_type="zfs" ks_auto_reboot="0" ks_use_grub_mbr="1" mode_type="install"
Once you done with profile editing, proceed to the next step.
Step 3. Build new ISO
We are now ready for the final step - building a new distribution ISO. One simple command will run the entire process and produce a CD image in 5-10 minutes. Note: the builder will request your GPG password, so do not run this command in the background!
Here is an example:
# nbld-bootstrap
==============================================================================
Mode: core
Repository: /tank/ncp (elatte-unstable)
Fakeroot: /var/tmp/miniroot
==============================================================================
Live-CD/DVD mode is OFF
Generic install mode is OFF
Core mode is ON
Debug mode is OFF
Cleaning up /var/tmp/miniroot ...
Syncing /tank/ncp/incoming ...
...
...
I: Configuring libgnutls11...
I: Configuring libldap2...
I: Configuring libldap-2.2-7...
I: Configuring sasl2-bin...
I: Configuring gnupg...
I: Configuring nexenta-keyring...
I: Configuring libgnutls12...
I: Base system installed successfully.
Creating local repository...
Propagating local repository...
You need a passphrase to unlock the secret key for
user: "Nexenta Systems <maintainer@nexenta.com>"
1024-bit DSA key, ID 16E16062, created 2005-10-05
Finalizing local repository...
Copying pre-generated filelists...
Initial local repository APT update ...
Get:1 file: elatte-unstable Release.gpg [187B]
Get:2 file: elatte-unstable Release [7111B]
Fetched 7298B in 0s (162kB/s)
Reading package lists... Done
Preparing mdisco/hwdisco ...
Preparing install scripts...
Remove excluded packages ...
Polishing ...
NOTE: log file saved at /tmp/debootstrap.log.latest.19528
==============================================================================
Custom: /usr/lib/nbld
Fakeroot: /var/tmp/miniroot
==============================================================================
Cleaning up staging directory ... done
Creating miniroot (excluding 64-bit):
populating miniroot staging area [17/17] ... done
customizing mini stage ... done
bootstrapping smf repository [88/88] ... done
preparing ramdisk image ... done (198373 KB, uncompressed)
populating ramdisk image using /tmp/miniroot_staging.tmp ... done
compressing ramdisk image ... done (51881 KB, compressed)
Exiting.
==============================================================================
Mode: install core
Staging: /var/tmp/nbld-staging
Custom: /usr/lib/nbld
Fakeroot: /var/tmp/miniroot
==============================================================================
Cleaning up staging directory ... done
Creating miniroot (excluding 64-bit):
populating miniroot staging area [33/33] ... done
bootstrapping smf repository [74/74] ... done
preparing ramdisk image ... done (92253 KB, uncompressed)
populating ramdisk image using /var/tmp/nbld-staging/miniroot_staging.tmp ... done
compressing ramdisk image ... done (24853 KB, compressed)
Creating CD image:
preparing GRUB ... done
creating CD-ROM based directories (excluding 64-bit):
copying /usr ... done
copying /var/lib/apt ... done
copying /var/lib/dpkg ... done
copying /var/cache/man ... done
cleaning /var/tmp/nbld-staging/iso_staging.tmp/root ... done
creating ISO using /var/tmp/nbld-staging/iso_staging.tmp ... done (421433 KB)
CD image /var/tmp/nbld-staging/elatte_install.iso is ready
Exiting.
That's all: /var/tmp/nbld-staging/elatte_install.iso is our resulting ISO image which now could be freely redistributed on the Internet or used in your organization.