I've made Ubuntu Linux virtual appliances for internal use a few times, and I was looking at possibly using TKL for my next project, and maybe even come up with something I could post back here.  I've never used any of the TKL appliances before.  I just downloaded the core and started it in VirtualBox, but haven't spent much time with it yet.

I was wondering if someone could point me to some instructions or best practices for creating and re-packaging an appliance with TLK Core.  General method of building/modifying the appliance, how to put it back into first-boot setup, list of things to do/sanitize before exporting, etc... Is that documented anywhere?  I thought surely if all of these are based on TLK Core, that info must be documented somewhere, but I wasn't able to find it.


Jeremy Davis's picture

Hi Karl

The way to go is to use TKLDev. IMO it's usage and workflow is fairly well documented but we love to have feedback on anything that doesn't make sense to you or anything that you think could be better.

Read through the docs, set up an instance of TKLDev and go from there... Any issues/questions/etc, please feel free to post back.

Ok, so I've got turnkey-tkldev-13.0-wheezy-i386 running in VirtualBox, and I'm following the guide on github.  I am at the first section (playing in the sandbox) of helloworld.rst.  I've done everything up to this point including building the core appliance ISO and giving it a test drive.

So it says it do this to get into the sandbox:

root@tkldev products/core# fab-chroot build/root.sandbox/

However, that does not work.

error: no such chroot (build/root.sandbox/)

I tried it with and without the trailing slash.  I also tried making the folder, and then I get this:

root@tkldev products/core# mkdir build/root.sandbox
root@tkldev products/core# fab-chroot build/root.sandbox/
mount: mount point /turnkey/fab/products/core/build/root.sandbox/proc does not exist
Traceback (most recent call last):
  File "/usr/lib/fab/wrapper.py", line 34, in <module>
  File "/usr/lib/python2.7/dist-packages/pyproject.py", line 388, in main
    commands.run(name, args)
  File "/usr/lib/python2.7/dist-packages/pyproject.py", line 261, in run
  File "/usr/lib/fab/pylib/cmd_chroot.py", line 110, in main
    chroot = Chroot(newroot, environ=get_environ(env_conf))
  File "/usr/lib/python2.7/dist-packages/chroot.py", line 69, in __init__
    self.magicmounts = MagicMounts(self.path)
  File "/usr/lib/python2.7/dist-packages/chroot.py", line 28, in __init__
  File "/usr/lib/python2.7/dist-packages/chroot.py", line 39, in mount
    executil.system("mount -t proc", "proc-chroot", self.paths.proc)
  File "/usr/lib/python2.7/dist-packages/executil.py", line 56, in system
    raise ExecError(command, exitcode)
executil.ExecError: non-zero exitcode (32) for command: mount -t proc 'proc-chroot'  '/turnkey/fab/products/core/build/root.sandbox/proc'

Not sure where to go from here.

Martijn Verwijmeren's picture

Just below "Playing in the sandbox" in the first line it says:

root.sandbox (root.tmp in earlier TKLDev versions)

You only have a root.sandbox, if you are using a TKLDev that you freshly built in the last few days. The ready made TKLDev 13.0 appliance still has root.tmp.

Also, it does let me fab-chroot into build/root.patched, which does exist after running make.  Reading ahead a bit in the docs.

Add new comment