WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can't understand all the permutations of persitence.  (Read 6005 times)

Offline h-munster

  • Newbie
  • *
  • Posts: 49
Can't understand all the permutations of persitence.
« on: November 22, 2009, 04:46:36 AM »
Hi,

I am very interested in using Tiny Core on my Dell Mini 9.  I have tried several different versions of TC since January, 2009, but I can never get the set-up/configuration that I desire.

One of the biggest hurdles is understanding how things are saved.  In a typical distro, data is saved to certain places, libraries are saved to certain places and applications are installed in certain places, etc.  The places usually don't change, unless one makes an intentional change to one of the places (i.e. one saves a data file to a different directory).

If one knows those places, everything is peachy, and it is fairly easy to find most of the important places with typical distros.

With TC, it is difficult to understand some of the locations of those places.

Those who have been with TC since the beginning, probably have no trouble visualizing TC's places and concepts, but for some who came along later, visualizing the places and concepts are tough.

Someone tried to make some diagrams:  http://forum.tinycorelinux.net/index.php?topic=995.0  However, these diagrams are confusing (I'm not sure that the artist fully comprehended the places and concepts).  Furthermore, TC keeps changing, and parts of these diagrams no longer apply (no more TCEs, for instance).

It would be great if someone would make diagrams, who possesses a thorough understanding of the places and concepts, and who has experience conveying concepts visually.

I have read several times the TC FAQs, the Tiny Core concepts and the TC Wiki, and I am still having a lot of trouble.

Another problem is knowing when extensions will be retained for the next boot and when they will evaporate before the next boot and also knowing when they will automatically load into RAM or when they will not load into RAM.

I just recently learned the difference between "install" and "mount" in the Appbrowser.  The term "mount" threw me off:  does it mean that I am temporarily mounting an extension and not installing it?  Perhaps the name of these two actions should be changed to something a little more indicative of the fact that they sort of do the same thing, but that they also differ with each other in one way.  For instance, "ram-install" and "drive-install."

By the way, in the "Backups" section of the TC Wiki, there seems to be a typo in this sentence, "The control panel "backup/restore" button with activate/deactivate the backup function."  Should the word "with" instead be "will?"

In addition, the "Backups" section of the TC Wiki says, "Backup on exit defaults (exittc) to on, unless the shell variable BACKUP is set to 0."  It might be helpful to also include an explicit example in the Wiki, for instance:
"In ~/.profile write:  export BACKUP=0"

For what I would like from TC, I found this thread to be a little enlightening:  http://forum.tinycorelinux.net/index.php?topic=3563.0

However, I would really like to understand the places and concepts of TC.

Thanks!

[^thehatsrule^: fixed url]
« Last Edit: November 24, 2009, 03:09:00 PM by h-munster »

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Can't understand all the permutations of persitence.
« Reply #1 on: November 24, 2009, 03:03:30 AM »
mounting is a technical term, but I think it's a pretty common one.
"ram/drive-install" doesn't indicate much to me... but suggestions are welcome.  Perhaps "mount-install" and "extract-install" would be better?  Or maybe even "TCE install" hehe ;)

The wiki contains user contributions - if you are up to it, go ahead and sign up! :)

Offline h-munster

  • Newbie
  • *
  • Posts: 49
Re: Can't understand all the permutations of persitence.
« Reply #2 on: November 24, 2009, 03:07:37 PM »
Thanks for the reply.

I ran "mount".  Now I see the meaning behind the "mount" button on the Appbrowser -- there are a lot of mounted loops!

I wonder if the scripts described in this thread in posts #1 and #4 are ultimately "cleaner" and faster alternatives (in booting and shutdown) to mounting extensions:  http://forum.tinycorelinux.net/index.php?topic=3563.0

Regardless, it might be clearer to the uninitiated if the Appbrowser buttons differentiated between the two ways to install an extension.  To me, the basic difference between "installed" extensions and "mounted" extensions is that one type is automatically loaded into ram while the other type is on opened when desired.

Part of the confusion is that the "mounted" extensions are also actually "installed."  Furthermore, the meaning of the button's immediate action (install/download) is muddled with how the extensions will work after they arrive at one's machine (auto-load/manual-load).  It might take more than one word to convey the meaning of these differing types.

Perhaps the Appbrowser buttons should actually be "radio" buttons.  Radio buttons allow a more descriptive, multi-word name for each selection, and they would clearly indicate that only one selection would be downloaded/installed.

For instance, the radio button for the "installed" extensions could have an adjacent label that reads, "Install to be automatically loaded into ram."  The radio button for the "mounted" extensions could read, "Install to be opened manually."  The "download" radio button could read, "Download only -- do not install."

Of course, there would need to be a separate, regular button to start the process:  "Install/Download"; or "Okay"; or "Go".

What do you think?

In regards to contributing to the wiki, I would be happy to try, but I would be worried that I would get something wrong.
« Last Edit: November 24, 2009, 04:06:45 PM by h-munster »

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Can't understand all the permutations of persitence.
« Reply #3 on: November 24, 2009, 05:22:54 PM »
Quote
I wonder if the scripts described in this thread in posts #1 and #4 are ultimately "cleaner" and faster alternatives (in booting and shutdown) to mounting extensions:  http://forum.tinycorelinux.net/index.php?topic=3563.0
Sorry, I don't follow..?

Quote
Regardless, it might be clearer to the uninitiated if the Appbrowser buttons differentiated between the two ways to install an extension.
OK, but due to varying setups, it does assume the user knows the difference.  I suppose it could be improved.

Quote
To me, the basic difference between "installed" extensions and "mounted" extensions is that one type is automatically loaded into ram while the other type is on opened when desired.
Loading to memory may not be the case depending on what mode the system is running.  I don't think "opened" is a good term either... when "installed" they would've been "opened" too.


Interesting idea for the radio buttons... although the gui design would need to be changed to accomodate the extra text somewhere.

Quote
The radio button for the "mounted" extensions could read, "Install to be opened manually."
They are mounted automatically and ready for use afaik


The wiki will be ready for you at anytime :)

Offline h-munster

  • Newbie
  • *
  • Posts: 49
Re: Can't understand all the permutations of persitence.
« Reply #4 on: November 24, 2009, 10:01:20 PM »
Quote
Quote
I wonder if the scripts described in this thread in posts #1 and #4 are ultimately "cleaner" and faster alternatives (in booting and shutdown) to mounting extensions: http://forum.tinycorelinux.net/index.php?topic=3563.0
Sorry, I don't follow..?

The two users who posted in the thread evidently have scripts that mount/run the extensions only when they when needed -- avoids a lot of pre-mounting extensions.

You are correct -- "opened" is the wrong term.  I forgot that, just because an extension is loaded into ram, it doesn't mean that it is opened.

So, if radio buttons were used on Appbrowser, perhaps the "Install" button would still read, "Install to be automatically loaded into memory."  However, the "mount" button would read, "Install to standby on partition/drive."

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Can't understand all the permutations of persitence.
« Reply #5 on: November 24, 2009, 10:43:39 PM »
The difference between "Installed" and "Mounted" is merely how the files are read.

"Installed" - Files from the extension are extracted and stored in RAM when the extension is loaded. Faster loading, more RAM is used.

"Mounted" - Files are not extracted from the extension - They get read off the disk when needed. Slower, uses a loop device, lowers RAM use.

"Mounted" extensions ARE available for use the moment they get mounted. the "auto mounting" happens either at boot, or when you click "mount" when installing a new extension.

As to your questions in your original post...

Almost every extension can be found in /usr/local once it is loaded. That is where you will find it's bin files, it's config files, it's libraries. The only exception to this rule is applications hard-coded to look for things in particular locations.

Any extension in your TCE directory gets loaded upon boot. If you clicked "Install" to install the extension, it will get loaded to RAM on boot, if you clicked "mount" it will be mounted as a loop device.

Extensions only evaporate if you have not specified a TCE location in your boot parameters.

Does that make things clearer?

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Can't understand all the permutations of persitence.
« Reply #6 on: November 24, 2009, 10:52:42 PM »
Quote
So, if radio buttons were used on Appbrowser, perhaps the "Install" button would still read, "Install to be automatically loaded into memory."  However, the "mount" button would read, "Install to standby on partition/drive."
Like I've described, it may not be loaded to memory.  Also, I think "standby ..." could be misleading - I'm not even sure what "standby" means in this context.  I guess the mount term describes the situation well, still.

Quote
"Installed" - [...] stored in RAM when the extension is loaded. Faster loading, more RAM is used.

"Mounted" - [...] They get read off the disk when needed. Slower, uses a loop device, lowers RAM use.
This is not always the situation.  "Installed" may or may not have the data loaded to memory - in the default mode they are though.  "Mounted" may not be read off a disk (where I assume you mean a physical storage device) and could use more memory (squashfs loop layer) - by default they are stored in memory.
« Last Edit: November 24, 2009, 10:54:14 PM by ^thehatsrule^ »

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Can't understand all the permutations of persitence.
« Reply #7 on: November 24, 2009, 11:28:17 PM »
Yes, by disk I meant physical storage.

Hm, so it's not quite as black and white as it may seem, though I think my definitions are correct enough for somebody trying to grasp the general ideas...?

Offline h-munster

  • Newbie
  • *
  • Posts: 49
Re: Can't understand all the permutations of persitence.
« Reply #8 on: November 25, 2009, 03:47:28 AM »
@althalus
Thank you for your explanation.  The part about how TCZs evaporate is especially helpful.

What is the name of the file that determines which extensions get loaded into ram and which ones get mounted?

I think your word "stored" is close to the term we have been seeking.  The difference between the "installed" and "mounted" extensions is how they are "stored" when TC is running.

@^thehatsrule^
Just curious, in which mode/scenario are the "installed" extensions not loaded into memory?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Can't understand all the permutations of persitence.
« Reply #9 on: November 25, 2009, 04:08:27 AM »

What is the name of the file that determines which extensions get loaded into ram and which ones get mounted?


File is /tce/tcz2ram.lst It is a text file listing the extensions installed (copied into) RAM. File is created automatically by appbrowser, but you can edit it too.

Placing /tce/tcz2ram.flg with any content indicates all extensions copied into RAM. If you have both, tcz2ram.flg  is having higher priority.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline h-munster

  • Newbie
  • *
  • Posts: 49
Re: Can't understand all the permutations of persitence.
« Reply #10 on: November 25, 2009, 05:38:54 AM »
Quote
File is /tce/tcz2ram.lst It is a text file listing the extensions installed (copied into) RAM. File is created automatically by appbrowser, but you can edit it too.

Placing /tce/tcz2ram.flg with any content indicates all extensions copied into RAM. If you have both, tcz2ram.flg  is having higher priority.

Thanks!

73,
h-munster

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Can't understand all the permutations of persitence.
« Reply #11 on: November 25, 2009, 02:21:15 PM »
Quote
Just curious, in which mode/scenario are the "installed" extensions not loaded into memory?
Well, they can be loaded to some partition on some device or some loop file with PPI afaik.

althalus: Also, I thought that loading via "installed" is generally slower than "mounting" - which would be most noticeable during boot.

Offline h-munster

  • Newbie
  • *
  • Posts: 49
Re: Can't understand all the permutations of persitence.
« Reply #12 on: November 27, 2009, 06:21:36 PM »
Quote
Just curious, in which mode/scenario are the "installed" extensions not loaded into memory?
Well, they can be loaded to some partition on some device or some loop file with PPI afaik.

Now I am really confused.  I thought that the "mounted" extensions were the ones that are mounted with loops.  Is this scenario common with "installed" extensions loaded to a loop file?

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Can't understand all the permutations of persitence.
« Reply #13 on: November 27, 2009, 06:41:55 PM »
It's an option in one of the modes, as listed in the core concepts page.

Offline h-munster

  • Newbie
  • *
  • Posts: 49
Re: Can't understand all the permutations of persitence.
« Reply #14 on: December 06, 2009, 04:40:28 AM »
I have put TC on it's own partition, which really helps one see the structure and operation of TC (or at least of the TC mode one is using).

Before, I was trying to learn TC while it was intermingled with the bloated/cluttered, stock version of Ubuntu on my Dell Mini 9.  I finally wiped the partition clean and reinstalled TC.

I'm going to start thinking "out loud" here.  Please correct me if I misstate anything.

As I understand, almost all extensions are now squashfs images that can be used in the "Local/Install" mode.  If so, then, for the most part, the difference between the four modes lies in the way the extensions are being handled by TC and in the physical/virtual locations of the extensions -- not in the nature of the type of extension.

So, the function of the Appbrowser's single "Install" button is being applied to three different methods of placing/loading extensions, which could be a little confusing.  On the other hand, the Appbrowser's "Mount" button is used only for the "TCE/Mount" mode.

The "TCE/Install" and "TCE/Mount" modes seem to be the same thing with a different setting.  The extensions of both modes share the same physical, persistent location, and they also share the same "tce=<partition></directory>" bootcode.

The only detail that distinguishes the TCE/Install mode from the TCE/Mount mode is the content of a single text file -- /tce/tcz2ram.lst.  If this file is set to allow some or none of the the extensions copied into ram, then TC is in the TCE/Mount mode.  If this file is set so that all of the extensions are copied into RAM, then TC is in the TCE/Install mode. (There is another file that only indicates that all extensions should be copied into RAM -- /tce/tcz2ram.flg -- which apparently supersedes tcz2ram.lst.)

Perhaps these two TC modes should be considered to be the same mode, in which one merely chooses to have some, all or none of the extensions copied into RAM.

The consolidation of these two modes would simplify the TC model into three scenarios:
Mode #1 -- all extensions are loaded into RAM, without any physical persistent storage;
Mode #2 -- all extensions are placed into a physical, persistent repository, with some, all or none of the extensions copied into RAM, and those not copied into RAM are mounted as individual loops;
Mode #3 -- all extensions are placed into a physical, persistent repository, with none of the extensions copied into RAM, and with all extensions being "literally installed" into a physical directory (or into a single, mounted loop back file).

It goes without saying that, in all modes, initialized extensions use RAM and that user data files are saved/persistent in a separate "backup" operation from these extension modes.

If the model above is accurate, then it might be the beginning of a more comprehensible way to explain the the structure and operation of TC.

Of course, it would be less confusing if all "TCE" titles were changed to "TCZ."
« Last Edit: December 06, 2009, 05:13:10 AM by h-munster »