Help Understanding of /k3os/data

I’m into the internals of k3OS on the path to customizing my ISO. But I have a nagging problem that I see just a few references to /k3os/data as a place to customize, but I cannot find any docs.

I’ve gone over the complete source to k3OS, figuring out the boot sequence. I’ve taken apart the initrd, rootfs and iso images, looking for clues. The k3os-install.sh certainly copies the full k3os/ tree from $DISTRO to $TARGET, meaning anything I place on the ISO will appear in HD.

But I’m stuck on these three statements where k3os is used as /init. I understand usage of pivot_root and chroot in normal Linux initrd setups but cannot follow this sequence.

transferroot.Relocate() copy initrd root to /mnt as tmpfs and chroot

mount.Mount("", “/”, “none”, “rw,remount”)) seems to remount root rw but tmpfs was already rw

enterchoot.Mount("./k3os/data") rancher/k3os/pkg/enterchroot
ENTER_DATA = “./k3os/data”
ENTER_ROOT = findRoot()
run($ENTER_DATA)

What is “./k3os/data” doing here, when that directory doesn’t appear anywhere. And how does running a directory make anything happen? Shouldn’t it be: run("./k3os/data/SOME_SCRIPT")?

Thanks for any insights, it’s just one of those nagging things where you almost understand something but it keeps slipping away.