WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: /opt/tce - how does it work?  (Read 3156 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
/opt/tce - how does it work?
« on: May 08, 2010, 07:41:07 AM »
How to use /opt/tce for remastering with 2.11? Using the same structure as /tce with onboot.lst and optional directory it works when /opt/tce is added to intrd but doesn't recognized on the boot media, e.g. on the CD.

Is it the expected behavior?
Béla
Ham Radio callsign: HA5DI

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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: /opt/tce - how does it work?
« Reply #1 on: May 08, 2010, 09:29:14 AM »
Do you mean opt/tce on the cd root? That's never worked, or supposed to.

Yes, what you see is expected behavior.
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: /opt/tce - how does it work?
« Reply #2 on: May 08, 2010, 10:47:18 AM »
Do you mean opt/tce on the cd root? That's never worked, or supposed to.

Yes, what you see is expected behavior.

It's bad  :(

I have an USB stick with TC 2.11 installed; there is a /tce dir with cca. 100M extensions (LXDE, FileZilla, Firefox, WICD, etc.) What happens during boot?

- TC is loaded (less than 10M) and starts
- extensions in /tce mounted
- saved data (few megs) loaded from /tce

This is really fast and there is the option to control mounting or loading to RAM extensions via the config files. This works great.

If I want to create a remastered TC which has these extensions built-in, the only way is to put them to /opt/tce in the initrd file. Resulted initrd is 10x larger now and it has to be fully loaded before anything can be done. Result is a really slow boot, system takes nearly 10 times compared to the same non-remastered system. Practically it is useless.

Desired way of operation would be to look for /opt/tce or any other directory with special signature on a similar way as /tce is found and process this directory as /tce. Much better just to check it on the partition used for booting. With this, remastered version would boot as fast as non-remastered with the benefit of easy remastering.


Béla
Ham Radio callsign: HA5DI

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

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: /opt/tce - how does it work?
« Reply #3 on: May 08, 2010, 02:53:25 PM »
BTW, in SLAX there is a directory where you can drop modules (extensions) which will be added to the system during boot. Its all module concept is less capable and and less matured compared to TC, but it works.

Also, in SLAX you have the information whatw as the boot media and you can use it later at user level to access it.
Béla
Ham Radio callsign: HA5DI

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

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: /opt/tce - how does it work?
« Reply #4 on: May 08, 2010, 09:37:56 PM »
I'm with bmarkus here that it would be nice to have a "special" directory on the ISO which could hold the extensions and behave similar to a hard disk or USB drive. There are a few issues I can anticipate with this:
  • Using a boot CD-ROM the same way as a hard disk or USB drive would require for the CD-ROM to be permanently mounted on the system. That is not how TC/MC operates right now and might not be acceptable for the majority of users. One way around it might be to copy the whole "stuff" (e.g. '.../tce/optional/*', '.../tce/*.lst', '.../tce/*.flg') from the CD-ROM to '/tmp' and proceed from there.
  • Another problem might be the possible "clash" between extensions (and their respective "treatment" controlled by '*.lst' and '*.flg' files) that are on the CD-ROM vs. the ones on hard disk or USB drive. Ideally it should not be a one or the other approach but maybe process the CD-ROM extensions first and then continue as now with the detection and processing of extensions from a hard disk or USB drive.
I'm not sure if the approach of copying files off the CD-ROM to '/tmp' is faster than extracting a (large) cpio-archive, but at least it might allow for a kind of "ondemand" treatment.

Note: I have not really done any research in the forum to which degree this has been discussed earlier, I just could not resist to put in my 2cents ...

Offline sandras

  • Jr. Member
  • **
  • Posts: 53
Re: /opt/tce - how does it work?
« Reply #5 on: May 09, 2010, 06:59:36 AM »
I think that what you are looking for can be achieved by simply making a tce directory in your iso along the boot directory. TC will automatically find it if I'm nor mistaken. As for copy vs mount... Well, you make the CD and you get to choose whether to make them all loaded to the file system or be mounted from the CD.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: /opt/tce - how does it work?
« Reply #6 on: May 09, 2010, 07:31:31 AM »
I think that what you are looking for can be achieved by simply making a tce directory in your iso along the boot directory. TC will automatically find it if I'm nor mistaken. As for copy vs mount... Well, you make the CD and you get to choose whether to make them all loaded to the file system or be mounted from the CD.

Not really.

It is not for remastering especially not on CD. If /tce is found on the CD it will be used but also recorded in /etc/sysconfig/tce.mount and blocks using user's real /tce. Or if user has a /tce on for example /dev/hda, tce used for remastering on CD which is for example /dev/hdc will not be used.

Lets be more specific. If I put together an easy to use out of box variant, requested for example using LXDE with most of the basic applications in to start working like Firefox, WICD for WIFI connectivity, ALSA for sound, etc. It is also configured with backup, startup sound (you will like it), etc. It works fine. Now I can't create an ISO which works on the same way as TC but with the .tcz's preinstalled, where user can have the 'normal' /tce to add his applications, save backup, etc.
Béla
Ham Radio callsign: HA5DI

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

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: /opt/tce - how does it work?
« Reply #7 on: May 09, 2010, 06:27:40 PM »
I wonder if a new feature could be introduced:

Just as one is able to set mirrors for downloading extensions, it would be very convenient if instead of a mirror, a directory could be pointed to for "downloading" extensions. Not as in running a some server but simply a local directory. This could be an added button for appbrowser just like the 'local' button, but doing the full download protocol instead. This way, any directory on a cd or other local drive can house the extensions as only downloading is done from that location.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: /opt/tce - how does it work?
« Reply #8 on: May 10, 2010, 01:33:23 AM »
Quote
Lets be more specific. If I put together an easy to use out of box variant, requested for example using LXDE with most of the basic applications in to start working like Firefox, WICD for WIFI connectivity, ALSA for sound, etc. It is also configured with backup, startup sound (you will like it), etc. It works fine. Now I can't create an ISO which works on the same way as TC but with the .tcz's preinstalled, where user can have the 'normal' /tce to add his applications, save backup, etc.

I can and just did with v2.11. A basic LXDE install using /opt/tce using LXDE.tcz and all of its dependent tczs.  It turned out to be 24MB. I still have all the features of the tce boot code. In fact, with this LXDE iso, I used tce=hdb1 and downloaded and installed xchat2.tcz. xchat2.tcz went to /mnt/hdb1/tce/optional as would be expected. It appeared in LXDE start menu. Did a backup, which went to hdb2/tce as would be expected. Rebooted and there is LXDE with xchat. This is why is it called /opt/tce not to interfere with normal /tce. /opt/tce is only supported for easy remastering, i.e., a collection of tczs and it is considered read-only and therefore not maintained by appsaudit, et al.
10+ Years Contributing to Linux Open Source Projects.