SmartOS is Not GNU/Linux
One of the requests we get from time to time is for SmartOS to look more like
GNU/Linux in layout and behaviour. For example, config files in
/opt/local/etc, binaries under
/usr instead of
userland by default, etc.
Whilst we believe in the technical merits of our current implementation and the clean separation and upgrade possibilities it provides, we do recognise that some users just don’t care about those things and would prefer a system which looks as close to the GNU/Linux environments they are used to.
Ordinarily this simply wouldn’t be possible given that
/usr is a read-only
mount from the global zone, however
with the highly flexible SmartOS
Zones architecture, coupled with
Joyent employing Zones guru Jerry
Jelinek, we are able to
provide you with an option to do exactly this. As Jerry says, at Sun there was
even a native Linux brand, so pretty much anything is possible!
We call it ‘SNGL’ (pronounced ‘snuggle’), which is an acronym for ‘SmartOS is Not GNU/Linux’. Currently it is somewhat experimental, but we’d love for people to try it out and provide feedback.
Here’s how you can get it running.
Install the latest platform
You need to be running SmartOS 20130222 or later. Older platforms can be
coerced into working, you will just need to work around the lack of this
by creating an empty
sngl_base.tar.gz or so.
As usual, follow the instructions here to upgrade an existing install.
Get the SNGL dataset
Create a new dataset
The important point to note here is that
brand is set to
At this point you should be able to log in and start using
pkgin etc to
install new software (there are over 2,000 packages available) as normal, but
binaries are running from
configuration files are in
the default userland tools are GNU variants (
For those that are interested, here is some further detail on how this is all implemented.
The main setup is in
the mount points to be used inside the zone, and here you can see how we are
able to use
We are transplanting the main system directories and mounting them under
/system. This leaves
/usr free for us to write packages to.
In order to support having the OS under
/system there is some additional
This is where the flexibility of Zones really shines. We are able to redefine the path to init(1M) and others so that the zone can boot correctly.
In addition, we copy in the
crle configuration files
ld.sys64.config so that binaries will look in
/system/usr/lib for their
Runtime and packages
The brand configuration is enough to set the zone up, but in order to make it
boot we need additional files available under
/usr, there are simply too many
hardcoded paths. For this we just symlink back to
any files required.
Finally, we are able to perform a full pkgsrc bulk build with
/usr within a chroot which emulates this layout, and when those packages
are installed they overwrite the compatability symlinks we have configured and
replace them with files from the packages.
Not all symlinks will be overwritten, though, which is why standard SmartOS
utilities such as
prstat(1M) are still available, as the symlink for it still
As I mentioned, this is currently experimental, and there will be plenty of problems. However, at least from some initial testing, a reasonable amount of things appear to work fine, and for users who want this particular layout it may be good enough.
Please feel free to give it a try and report issues against our GitHub project. Once we have it working with a reasonable amount of stability we may be able to offer it as an option in the Joyent Public Cloud.
- 16 Jul 2015 » Reducing RAM usage in pkgin
- 03 Mar 2015 » pkgsrc-2014Q4: LTS, signed packages, and more
- 06 Oct 2014 » Building packages at scale
- 04 Dec 2013 » A node.js-powered 8-bit CPU - part four
- 03 Dec 2013 » A node.js-powered 8-bit CPU - part three
- 02 Dec 2013 » A node.js-powered 8-bit CPU - part two
- 01 Dec 2013 » A node.js-powered 8-bit CPU - part one
- 21 Nov 2013 » MDB support for Go
- 30 Jul 2013 » What's new in pkgsrc-2013Q2
- 24 Jul 2013 » Distributed chrooted pkgsrc bulk builds
- 07 Jun 2013 » pkgsrc on SmartOS - creating new packages
- 15 Apr 2013 » What's new in pkgsrc-2013Q1
- 19 Mar 2013 » Installing SVR4 packages on SmartOS
- 27 Feb 2013 » SmartOS is Not GNU/Linux
- 18 Feb 2013 » SmartOS development preview dataset
- 17 Jan 2013 » pkgsrc on SmartOS - fixing broken builds
- 15 Jan 2013 » pkgsrc on SmartOS - zone creation and basic builds
- 10 Jan 2013 » Multi-architecture package support in SmartOS
- 09 Jan 2013 » Solaris portability - cfmakeraw()
- 08 Jan 2013 » Solaris portability - flock()
- 06 Jan 2013 » pkgsrc-2012Q4 illumos packages now available
- 23 Nov 2012 » SmartOS and the global zone
- 24 Oct 2012 » Setting up Samba on SmartOS
- 10 Oct 2012 » pkgsrc-2012Q3 packages for illumos
- 23 Aug 2012 » Creating local SmartOS packages
- 10 Jul 2012 » 7,000 binary packages for OSX Lion
- 09 Jul 2012 » 9,000 packages for SmartOS and illumos
- 07 May 2012 » Goodbye Oracle, Hello Joyent!
- 13 Apr 2012 » SmartOS global zone tweaks
- 12 Apr 2012 » Automated VirtualBox SmartOS installs
- 30 Mar 2012 » iptables script for Debian / Ubuntu
- 20 Feb 2012 » New site design
- 11 Jan 2012 » Set up anonymous FTP upload on Oracle Linux
- 09 Jan 2012 » Kickstart Oracle Linux in VirtualBox
- 09 Jan 2012 » Kickstart Oracle Linux from Ubuntu
- 22 Dec 2011 » Last day at MySQL
- 15 Dec 2011 » Installing OpenBSD with softraid
- 21 Sep 2011 » Create VirtualBox VM from the command line
- 14 Sep 2011 » Creating chroots for fun and MySQL testing
- 30 Jun 2011 » Graphing memory usage during an MTR run
- 29 Jun 2011 » Fix input box keybindings in Firefox
- 24 Jun 2011 » How to lose weight
- 23 Jun 2011 » How to fix stdio buffering
- 13 Jun 2011 » Serving multiple DNS search domains in IOS DHCP
- 13 Jun 2011 » Fix Firefox URL double click behaviour
- 20 Apr 2011 » SSH via HTTP proxy in OSX
- 09 Nov 2010 » How to build MySQL releases
- 29 Apr 2010 » 'apt-get' and 5,000 packages for Solaris10/x86
- 16 Sep 2009 » ZFS and NFS vs OSX
- 12 Sep 2009 » pkgsrc on Solaris
- 09 Dec 2008 » Jumpstart from OSX
- 31 Dec 2007 » Set up local caching DNS server on OSX 10.4