You are here
For a few monthes I've been using a VM based on the Turnkey PostgresQL appliance. I've made a bunch of mods (package installs, conf file changes etc)
Now I'd like to create an ISO that others can use to install my modified appliance. I'm trying to do so using the tklpatch scripts, which I chose for a couple of reasons:
-- I'd like to be able to create patches in the future
-- I'm new to the process of creating ISOs, and to related topics like chroot and mksquashfs. Tklpatch seems like a nice way to see how these steps fit together.
The only trouble is that the tklpatch workflow seems to assume that you start with an ISO and end up with a modified ISO.
By contrast, I want to simply:
(1) Mount the filesystem from my appliance on some other machine (a Turnkey core VM)
(2) On that VM, use tklpatch-prepare-cdroot and tklpatch-geniso to create an ISO from the mounted appliance
However step (2) relies on the original ISO to prepare the cdroot. Is there a way to avoid the need for an original ISO (eg by creating the squahed FS by hand?). Or should I instead start with some Turnkey ISO, and uses its squashed FS in combination with the rootfs from my appliance?
Bootstrap cdroot
I think I've just about solved this problem. I started by following my own suggestion of starting with "some Turnkey ISO" and using it to bootstrap the rest of the workflow. This worked I think (I haven't yet tested the resulting ISO) but with hindsight it seems to me to be pretty easy to create the cdroot structure without needing a bootstrap ISO. Will try this tomorrow and post again.
Btw thanks for TKL guys, its great!
enlightenment
I feel a little stupid now.
tklpatch-prepare-cdroot only requires an empty cdroot directory (and a rootfs). Theres no need for any "bootstrap ISO" or any such nonsense.
What confused me was the fact that tklpatch-extract-iso creates a cdroot and copies a file to it.
However tklpatch-prepare-cdroot overwrites this file with the equivalent file from rootfs.
So all I need to do is:
Might be worth modifying tklpatch-prepare-cdroot so that it creates the supplied cdroot dir (foo.cdroot in my example) if it doesn't already exist ?
Good feedback!
You know for some reason we never even considered this particular usage scenario: building an ISO from a VM.
You're right regarding the contents of the cdroot being populated from the filesystem so we don't actually need to use the ISO's cdroot as a template. I'll ask Alon if maybe we should remove the cdroot as an argument entirely and just create it on the fly...
cdroot-dir is now optional
If cdroot-dir is not specified, a minimal isolinux.cfg will be created on the fly to automatically boot the system, otherwise the kernel, initrd and other boot options need to be specified manually.
Building an ISO from a VM is a cool idea, and hopefully with this update it will be a little easier. Keep us posted, I'd love to hear what you come up with...
As always, feedback is welcome!
TBH I'm not 100% sure
So my guess is either you have the newer version and it's not backwards compatible. Or you need the newer version. TBH though I'm only guessing...
Add new comment