WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: question about extensions  (Read 3426 times)

Offline P5music

  • Full Member
  • ***
  • Posts: 167
question about extensions
« on: November 16, 2010, 05:23:32 AM »
Hello,
I ask what happens when an extension is loaded, as with tce-load. I would like to know what changes on tinycore system, for example: "this is mounted there", "this file is updated", "this directory is created" etc.
I hope it is not so complex that this question cannot be answered here.
Thanks

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: question about extensions
« Reply #1 on: November 16, 2010, 05:55:21 AM »
Code: [Select]
less /usr/bin/tce-load
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: question about extensions
« Reply #2 on: November 16, 2010, 05:58:16 AM »
The extension is mounted as a loop device /tmp/tcloop/extension_name.

Symlinks are created in the tc base filesystem for each file in /tmp/tcloop/extension_name as:

/path-to-file/filename -> /tmp/tcloop/extension_name/path-to-file/filename

Offline P5music

  • Full Member
  • ***
  • Posts: 167
Re: question about extensions
« Reply #3 on: November 16, 2010, 06:02:22 AM »
so,
just mounting and symlinking are performed?
no other file or register is updated?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: question about extensions
« Reply #4 on: November 16, 2010, 06:11:48 AM »
There's more to it than that - have a look at the tce-load script as suggested above

Offline P5music

  • Full Member
  • ***
  • Posts: 167
Re: question about extensions
« Reply #5 on: November 16, 2010, 01:15:37 PM »
I looked at the script and it seems that much work is done every time.
Is it possible to choose a bunch of extension that serve for a particular purpose and create a tinycore systems that just mounts and symlinks, without all that work?

I explain:
I experimented and found useful, for a particular purpose, symlinking /root to a permanent directory, putting a symlink creation command in .xsession (after a rm command that deletes the original /root stuff). It works. So I think this method could be useful also for creating a non-standard tinycore system in which I put in .xsession some commands to connect the extensions stuff to persistent directories created only the first time (copied from RAM "filesystem" if the stuff is there).
I know this sounds like making a customized linux system but I want to use tinycore because it is a good starting point.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: question about extensions
« Reply #6 on: November 16, 2010, 02:50:46 PM »
/root is not the root file system.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: question about extensions
« Reply #7 on: November 16, 2010, 05:46:33 PM »
In case you want to find out exactly what commands are executed by 'tce-load' why don't you run it like sh -vx tce-load -wi EXT That should give you a fairly good idea.

Please note that any scripts that are called in that process will run "outside" of the '-vx' scope. But if that is the case and you really want to know what's going on you could create a custom version of 'tce-load' where you replace 'SCRIPT-NAME OPTIONS' with 'sh -vx /path/to/SCRIPT-NAME OPTIONS'

I'd suggest you do a bit more of your own work instead of asking that many questions you could find out easily by yourself by studing the relevant code properly.

Offline P5music

  • Full Member
  • ***
  • Posts: 167
Re: question about extensions
« Reply #8 on: November 17, 2010, 05:10:55 AM »
@gerald_clark:
OK it's not root filesystem but I made /root persistent and it served me very well.

@maro
I thank you all for your patience. Yes I realized it is better to study and search on my own. Indeed I am studying LFS book, but I am struggling as far as I can not to have to do all that work because many things some people said I could not do with tinycore, well, I am doing them now. I am sorry that when I "touch" certain subjects no real information leak, so I think I'd better hurry up reading that book.