WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can I remaster a snapshot of my running TC setup?  (Read 2554 times)

Offline philip

  • Full Member
  • ***
  • Posts: 125
Can I remaster a snapshot of my running TC setup?
« on: June 22, 2009, 11:44:25 PM »
My system would boot even faster if it never had to load any extensions, because they were all preloaded into a customized copy of tinycore.gz. Is there some way to build a bespoke copy by just asking TC to take a snapshot of its current configuration? I know there will be challenges (trying to copy all the files in /proc or /dev would make lots of trouble, for example), but is it worth thinking about?

An alternative could be to try remastering. I could extract an inactive prototype copy of TC as described in the wiki, and then insert extensions into that copy before packing it back into a new initrd. For standard "tce" extensions, I can probably figure out how to do this on my own. But for library and module extensions ("tcel" and "tcem"), the appbrowser does extra magic when loading. Would they need some kind special treatment or extra steps when they were inserted into a remastering prototype? (I'm not asking about "tcz" extensions because so far I haven't used any. If this thread takes off, somebody else may want to raise that issue.)

Thanks!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14620
Re: Can I remaster a snapshot of my running TC setup?
« Reply #1 on: June 23, 2009, 12:15:20 AM »
Perhaps I'm wrong, but I believe that if you extract tce/tcel/tcem extensions into your remaster, then the normal tc startup will take care of loading the additional libs and modules...

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Can I remaster a snapshot of my running TC setup?
« Reply #2 on: June 23, 2009, 07:06:12 AM »
Another option is to combine the extensions of the programs you always use, so you have less extensions. This wouldn't require a remaster. You could even use this when a new version of Tiny Core is released. However, you may need to redo it when extensions are updated.

I have not tried this myself yet, but see not reason why it wouldn't work.
Many people see what is. Some people see what can be, and make a difference.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: Can I remaster a snapshot of my running TC setup?
« Reply #3 on: June 23, 2009, 11:22:18 AM »
Quote
But for library and module extensions ("tcel" and "tcem"), the appbrowser does extra magic when loading. Would they need some kind special treatment or extra steps when they were inserted into a remastering prototype?
When creating a remaster you can chroot into the source directory and run the commands "depmod -ae" and "ldconfig" to update the modules list and library cache for the remaster. This will allow the new libraries and modules to be used upon boot.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10974
Re: Can I remaster a snapshot of my running TC setup?
« Reply #4 on: June 26, 2009, 04:30:05 AM »
One can even avoid chrooting with options for depmod and ldconfig (ldconfig -r /path/to/new/root for example)
The only barriers that can stop you are the ones you create yourself.

Offline philip

  • Full Member
  • ***
  • Posts: 125
Re: Can I remaster a snapshot of my running TC setup?
« Reply #5 on: June 27, 2009, 09:32:32 AM »
I found a script that remasters a running instance of TC elsewhere in these forums, http://forum.tinycorelinux.net/index.php?topic=1461.0, and spent some time experimenting with it. Except for one unresolved issue I won't bore you with, it works for TC2.0. So the short answer to the question in our subject line is, "Yes, and here's a link that shows how."

This process has an important disadvantage: it's fundamentally un-upgradeable. If you upgrade an extension and remaster from a snapshot taken before rebooting, obsolete junk that was supposed to get purged will be saved and propagated instead. So this idea needs to be used only in very special circumstances, where an upgrade is almost never going to happen ... and when it is, the upgrade starts from a conventional clean TC installation. This actually describes my situation, but I expect most people to have different needs.

So, having worked out the first option in my original post, I'm going to investigate the second. That's what everybody has been commenting on, anyway. Thanks for the input. I'll keep you posted. My next move will be to investigate the impressive TC-rebuilding script in this thread: http://forum.tinycorelinux.net/index.php?topic=677.0.