Tiny Core Base > TCB Q&A Forum
Understanding tc: Why is “mount on boot” not super fast?
Rich:
Hi CentralWare
--- Quote from: CentralWare on August 26, 2024, 09:23:52 AM --- ... I'd imagine this doesn't operate as expected on every extension, ...
--- End quote ---
It doesn't work for every extension. You don't want to use it for
libraries, kernel modules, or firmware.
It works for curl because a script that loads curl.tcz is created and that
script is called curl. It is found because $PATH includes the ondemand
directory:
--- Code: ---tc@E310:~$ echo $PATH
/home/tc/.local/bin:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/sysconfig/tcedir/ondemand
tc@E310:~$
--- End code ---
It will likely fail with tar.tcz because busybox /bin/tar will be found before
/etc/sysconfig/tcedir/ondemand/tar.
It will only work if the name of the extension exactly matches the name
of the program you want to run.
Anyone placing compiletc.tcz ondemand expecting gcc to magically
load and execute will be disappointed.
Stefann:
--- Quote from: CentralWare on August 26, 2024, 09:23:52 AM ---@Stefann: Have you experimented with OnDemand?
I'm going through the steps right now while describing it to ensure I'm being as accurate as possible.
1. tce-load -wo curl
This loads the extension curl as an OnDemand program; I just rebooted that machine. Curl is NOT loaded.
2. curl http://www.google.com
The curl extension is loaded/mounted and then launched. Google's heavily obfuscated javascript content is returned, as expected.
3. Until the machine is rebooted, the curl extension remains loaded.
I'd imagine this doesn't operate as expected on every extension, but for compiler tools and other things you may not use very often, this may be a way to speed up booting AND reduce memory usage AND in the process, reduce CPU during startup by reducing the number of extensions being dealt with at that time. It should also be "upgrade" friendly.
Note: Upgrades to the operating system should never be affected by /opt scripts as your backups or persistent directories generally fall outside the core operation files and extensions.
REMEMBERING changes you've made, however, is another story. It's always wise if you make changes and need to remember 5 years from now WHY you did something or what you did it for, in shell scripts like bootlocal.sh, bootsync.sh (and other .sh files) simply leave yourself detailed notes/comments preceded by a pound sign (#)
--- Code: ---# put other system startup commands here
--- End code ---
is a good example found at the start of /opt/bootlocal.sh The "#" and everything that follows it on that line is ignored by the system.
This is a similar concept to the comments you're accustomed to in C.
--- End quote ---
Thanks,
That is indeed how I was hoping this would work.
No I did not try this yet. As I have a day job it will need to wait until Saturday.
And... even worse... today it became clear I will need to help my son with his business for some time. I'm afraid "tiny core time" will be very restricted in the weeks to come (but I will need some tiny core relax time now and than :) ).
I'll keep you posted on progress.
Yes... indeed I make notes on how I configure things.
preferably as comments in the files I have as you say
I made a full text file that describes step-by-step the whole process that I went through to get tiny core working. Including sections and config info for each application I loaded.
For that reason I feel quite "fine" to add some lines to boot local.sh
But feel more reserved on adding an other script.sh file:
- extra lines in boot local.sh I can simply accompany by comment
- an extra script.sh file will need an extra section in my step-by-step documentation. Which makes it more cluttered. As said... I may still do it... but I have a basic reluctance against extra files, especially if the benefit is very marginal.
For info: I timed a reboot yesterday. The console is no longer there to monitor boot-steps but I can of course time between reboot-command & functional again. I am currently at 80 seconds (on a 500MHz single core 32bit ultra low power VIA EDEN processor). In principle "that is very acceptable", just enough to make a coffee.
--- Quote from: Rich on August 26, 2024, 10:35:11 AM ---It doesn't work for every extension. You don't want to use it for
libraries, kernel modules, or firmware.
Anyone placing compiletc.tcz ondemand expecting gcc to magically
load and execute will be disappointed.
--- End quote ---
Ah.. thanks for that update.
So... it will require testing. And it will need "retesting" for any application.
We'll see... as mentioned above, it looks like I will not have much time in coming weeks, I keep you guys posted.
And... main goal of the start of this tread is certainly achieved: I got guided into understanding things and I will built on that.
CentralWare:
@Stefann: The extra script isn't a requirement; the same content can be added to bootlocal.sh directly; it's merely my own practice to separate things for organizational reasons.
(bootlocal.sh is already run as a background task.)
@Rich: compiletc... yes, I hadn't considered that one but can imagine the reaction! Until recently, I didn't utilize macro extensions at all - nor did OnDemand seem useful for what I do on a day-to-day basis, so putting the two together wasn't going to come from experience :) I do, however, miss the "TC" macro concept! (TCL 8.x I believe - "instant desktop")
Rich:
Hi CentralWare
--- Quote from: CentralWare on August 26, 2024, 11:48:19 AM --- ... Until recently, I didn't utilize macro extensions at all ...
--- End quote ---
I guess you are referring to meta-extensions ?
--- Quote --- - nor did OnDemand seem useful for what I do on a day-to-day basis, ...
--- End quote ---
I've never used OnDemand myself. I felt it was too easy to misuse. Though it's been
a while, there have been some occasions where a user saw OnDemand and assumed
it meant every command could be at your fingertips by placing extensions there
instead of OnBoot.
--- Quote from: Rich on August 26, 2024, 10:35:11 AM --- ... It will only work if the name of the extension exactly matches the name
of the program you want to run.
Anyone placing compiletc.tcz ondemand expecting gcc to magically
load and execute will be disappointed.
--- End quote ---
Just to hammer the point home (or beat it to death), here are a handfull of
(non-meta extension) examples that are also not candidates for OnDemand:
--- Code: ---ace-of-penguins.tcz
alsa.tcz
alsa-config.tcz
aoetools.tcz
apache2.4.tcz
bind.tcz
binutils.tcz
blueman.tcz
bluez.tcz
bluez5.tcz
cairo.tcz
cdrtools.tcz
connman.tcz
coreutils.tcz
cups.tcz
ffmpeg3.tcz
findutils.tcz
fox.tcz
freebasic.tcz
ijs.tcz
inetutils.tcz
inotify-tools.tcz
pci-utils.tcz
usbutils.tcz
util-linux.tcz
--- End code ---
Also, most, if not all of the following:
--- Code: ---*-dev.tcz
*-doc.tcz
*-icon*.tcz
lib*.tcz # Plus library extensions by other names (cairomm.tcz, clucene.tcz, clutter.tcz, freeglut.tcz, glu.tcz, ... )
*-locale.tcz
*-theme*.tcz
--- End code ---
Stefann:
--- Quote from: CentralWare on August 26, 2024, 11:48:19 AM ---@Stefann: The extra script isn't a requirement; the same content can be added to bootlocal.sh directly; it's merely my own practice to separate things for organizational reasons.
(bootlocal.sh is already run as a background task.)
--- End quote ---
Than actually makes a lot of sense.
I will try it.
As said… time will be bit of a problem upcoming weeks
--- Quote from: Rich on August 26, 2024, 01:51:48 PM ---
Just to hammer the point home (or beat it to death), here are a handfull of
(non-meta extension) examples that are also not candidates for OnDemand…..
--- End quote ---
Shortened the quote… but you fully made your point.
Amen..
Will not go that route
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version