WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Load extensions into RAM?  (Read 5896 times)

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Load extensions into RAM?
« on: March 23, 2010, 05:58:30 AM »
Probably a trivial question, but I just downloaded TC 2.10, modified the ISO to include a /tce folder next to /boot, dumped my extensions into /tce/optional and created an onboot.lst file.  From what I understand, this does not load extensions into memory, but calls it from CD to memory as needed.  I'm looking to have everything loaded on boot, so the user can then pull out the CD any time after it loads.  Is remastering the tinycore.gz file the way to go here?  If so, how does that work?  Just create a /tce folder on / ?  I ask because I realize some tutorials are out of date.  Thank you in advance.  I'm hoping not to have to go back to the older *.tce extensions.
« Last Edit: March 23, 2010, 06:10:22 AM by nim108 »

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Load extensions into RAM?
« Reply #1 on: March 23, 2010, 06:25:30 AM »
Use appsaudit, Install Options, Toggle Default Copy Install.
Or manually touch copy2fs.flg in your tce directory.
10+ Years Contributing to Linux Open Source Projects.

Offline sandras

  • Jr. Member
  • **
  • Posts: 53
Re: Load extensions into RAM?
« Reply #2 on: March 23, 2010, 06:27:17 AM »
Extensions listed in tce/onboot.lst are mounted to the filesystem. Extensions listed in tce/copy2fs.lst are copied to the filesystem. In your case it should only take to rename onboot.lst to copy2fs.lst to reach your goal.

Edit:  It seems Roberts answered the question while I was still posting. :)
« Last Edit: March 23, 2010, 06:30:28 AM by Sandras »

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Load extensions into RAM?
« Reply #3 on: March 23, 2010, 06:34:56 AM »
Thanks guys! I didn't realize it was so easy ... going to try that now :)
« Last Edit: March 23, 2010, 06:50:11 AM by nim108 »

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Load extensions into RAM?
« Reply #4 on: March 23, 2010, 06:55:35 AM »
Erm, doesn't seem to be working, I tried both copy2fs.lst and copy2fs.flg and extensions don't seem to load now (at least in VMware, where I'm testing before burning CDs, EDIT: tried it on CD too with either file and still no go).  I have all my extensions in /tce/optional on CD root and inside /tce I renamed onboot.lst to copy2fs.lst.  After this didn't work, I got rid of copy2fs.lst and created an empty copy2fs.flg file in /tce, still no go.  Does something have to be specified as a boot line parameter? Am I putting the extensions in the right place? Thanks.

My goal is to basically just set it up properly so that the user can pop in the CD, everything is copied to memory at boot-time, and bootlocal.sh automates whatever I need to do with setting up TFTP / DHCP servers.  So boot up and don't touch anything, so I rather not do it through apps audit.

EDIT: Works now with roberts suggestion of just creating a copy2fs.flg file in the /tce directory.  The only way this works though is if it sits alongside onboot.lst, this is basically contradicting each other though is it not?  I want to set this up correctly.  Anyway, it seems to be working as I do not see the extensions mounted anymore, and the fact I can unmount properly now without it saying "Device is busy" but from my understanding, this was supposed to work solely with a copy2fs.flg OR copy2fs.lst file ALONE.
« Last Edit: March 23, 2010, 07:32:37 AM by nim108 »

Offline sandras

  • Jr. Member
  • **
  • Posts: 53
Re: Load extensions into RAM?
« Reply #5 on: March 23, 2010, 08:09:52 AM »
The onboot.lst is there so that TC would know which extensions to load. Not every extension in your tce directory must be loaded at boot time. I think the copy2fs.flg makes TC copy every extension listed in onboot.lst to the root file system. I'll have to check what I know about copy2fs.lst though. Hope I didn't state anything missleading about it.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Load extensions into RAM?
« Reply #6 on: March 23, 2010, 08:22:22 AM »
The onboot.lst is there so that TC would know which extensions to load. Not every extension in your tce directory must be loaded at boot time. I think the copy2fs.flg makes TC copy every extension listed in onboot.lst to the root file system. I'll have to check what I know about copy2fs.lst though. Hope I didn't state anything missleading about it.
Thanks a lot Sandras, you weren't misleading at all.  If that is truly the case, then it makes sense why I would need both onboot.lst and copy2fs.flg there.  Appreciate the help.

Offline sandras

  • Jr. Member
  • **
  • Posts: 53
Re: Load extensions into RAM?
« Reply #7 on: March 23, 2010, 09:17:25 AM »
No biggie.  ;)

Tried loading extensions to RAM and and the method with onboot.lst and copy2fs.flg worked, but the one with onboot.lst and copy2fs.lst didn't. So my first post must have been misleading. The second one is ok. I'll try to figure things about copy2fs.lst though.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Load extensions into RAM?
« Reply #8 on: March 23, 2010, 11:06:04 AM »
If you want all extensions loaded to ram, use copy2fs.flg.

If you want just some extensions loaded to ram, list them in copy2fs.lst.
Many people see what is. Some people see what can be, and make a difference.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Load extensions into RAM?
« Reply #9 on: March 25, 2010, 07:44:57 AM »
Thanks guys, it works with onboot.lst and the copy2fs.flg off CD.

Now what if I wanted to pxe boot TC and have it autoload my extensions to RAM? I do not want to use an NFS server as listed in the wiki under the netbooting article. I was following this method: http://forum.tinycorelinux.net/index.php?topic=3937.msg21761#msg21761 of chainloading the cpio compressed gz file after tinycore is sent over (I have a /opt/tce folder with all my tcz files in there cpio compressed). However, extensions don't autoload, they simply sit in /opt/tce. Where should the extensions go directly in TC for TC to autoload them? This is analogous to remastering, the only dif. is that I'm not touching the original tinycore.gz file.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Load extensions into RAM?
« Reply #10 on: March 25, 2010, 10:50:33 AM »
/opt/tce in current releases works similarly to the main tce dir, ie optional and onboot.lst.

However, if you PXE boot an initrd like that, there's not much advantage in specifying a copy2fs.flg there, as they are already in ram.
The only barriers that can stop you are the ones you create yourself.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Load extensions into RAM?
« Reply #11 on: March 25, 2010, 11:05:27 AM »
Thanks curaga. So you're saying that the method I mentioned of pxe chainloading the extensions straight into /opt/tce should work?  I see that the files are there, but the problem is that they do not auto-load on bootup (so I'm stuck doing a "tce-load -i *.tcz" on them currently which mounts them and should not be required).  Am I missing a tce=xxx boot arg or anything? (although this would prob. be meaningless, since PXE loading implies there is no physical device containing extensions)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Load extensions into RAM?
« Reply #12 on: March 25, 2010, 11:34:13 AM »
I meant that they should be in /opt/tce/optional instead of /opt/tce, and there should be a /opt/tce/onboot.lst containing the names of extensions to be loaded.
The only barriers that can stop you are the ones you create yourself.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Load extensions into RAM?
« Reply #13 on: March 25, 2010, 02:49:19 PM »
Please read http://wiki.tinycorelinux.com/tiki-index.php?page=Netbooting

You can pxe boot and have an nfs exported directory full of extensions.
These extensions can be loop mounted over nfs just like a physical drive.

Offline ipmeel

  • Jr. Member
  • **
  • Posts: 59
Re: Load extensions into RAM?
« Reply #14 on: June 13, 2018, 01:15:51 PM »
Modified core.gz using core-remarter for PXE-boot, but unable to auto load aria2.tcz module in client systems (only CLI).
Copied “aria2.tcz” and its dependencies to /tmp/core_extract/opt/tce/optional/
Added an empty 'copy2fs.flg' and a 'onboot.lst' to /tmp/core_extract/opt/tce/
The content of 'onboot.lst' is just
Quote
aria2.tcz
Re-Package the core.gz using core-remarter.
Tinycore version 9.0
Please help me to figure-out that where I am doing mistake.