So, today I was messing around with the concept of sandboxing a running instance of Tiny Core inside of a chroot for remastering purposes - I think this subforum would probably get the most use out of what I learned because I think it would be great for building extensions. It took me a few tries but I eventually did get it to work.
If this does work as it appears to, it seems to me that it would be a superior method of creating extensions compared to the touch mark / find newer method, or messing around with prefix variables that makefiles may or may not even respect in the first place.
Basically, what I did was, I booted a base tinycore (base boot option - so technically i guess it was a microcore), installed fuse and unionfs-fuse, created a union of a read-only copy of the root directory with a temp directory on top to capture changes with copy-on-write, and chroot'd into it. This is basically what happens with most live CD distro's... but it allows you to
make install
something onto your current running system inside of the chroot and capture all changes into a temporary directory.
For my purposes, I was wanting to
tce-install
some stuff and re-compress into a separate cpio.gz to load on boot. Here's the process, it's actually pretty straightforward:
The only non TC thing you need to grab is fuse-unionfs, because it's not an extension currently.
If you get it in RPM form you can just do
sudo rpm -i fuse-unionfs-0.25-1.el6.rf.i686.rpm
everything else is done in TC:
tce-load -iw fuse.tcz
sudo su
mkdir /tmp/root-cow
mkdir /mnt/union
unionfs -o allow_other,use_ino,suid,dev,nonempty -ocow /tmp/root-cow=RW:/=RO /mnt/union
cd /mnt/union
chroot .
su tc
And that's about it. Any changes performed in that shell will go into the /tmp/root-cow directory.
So you could compile everything, test it out and what not, then just chroot and do a make install
This method just needs to be tested to make sure that the results are what would be expected - for now, I'm just putting it out there.
Enjoy
-la