WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: What CLI command to download and load?  (Read 2974 times)

Offline bkm

  • Jr. Member
  • **
  • Posts: 72
What CLI command to download and load?
« on: April 06, 2015, 05:10:53 PM »
Greetings everyone. I have been busy reading the Core book trying to figure out how to accomplish something and I have hit a dead end.

I have a PiCore system that needed an extra large MMCBLK0P1 partition. (The FAT32 partition)
In order to do this I created a 3rd partition at the end of my SD card so I can copy all of the contents of the 1st partition to it before I resize it and copy it all back.

Sounds simple, right?  Well, not so much...

I am only using the command line interface and I need to bring in the dosfstools.tce extension in order to format the 3rd partition to FAT32 before copying the contents of partition #1 into it. The problem here is that I don't want to install the dosfstools extension. I only want it to download and load up into the memory for this session so that I can do my work and reboot. When I reboot I don't want the extension to be anywhere in my system any longer. I am trying to keep the rest of the total system relatively lean and having unneeded extensions around would be a problem.

It appears that tce-load has only a very limited set of command line switches from which to choose and none of them appear to be a download and load like would be available in the GUI version.
-i  loads a local extension (but I don't want to save anything so I wouldnt have any local extensions)
-w will download the extension but will not load it so I can use it this session
-wi will download and install the extension, but then I am stuck with the extension forever.

Since I only want to download the extension to the filesystem in memory and load it for immediate use, I would think there is another command I am missing.

Can anyone point me to a better reference than the Core book. Of does anyone know off the top of their head how to accomplish this download and load from the CLI?

Thanks,

BKM

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: What CLI command to download and load?
« Reply #1 on: April 06, 2015, 05:21:17 PM »
Hi bkm
Just install it. When you are done with it, remove it from your  tce/onboot.lst  file and reboot. You can then delete it from your
tce/optional  directory if it really bothers you.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: What CLI command to download and load?
« Reply #2 on: April 06, 2015, 05:37:50 PM »
Without a persistent tce directory, tce-load -iw will download to ram and load.  On shutdown it will be gone.
You also will have no backup.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: What CLI command to download and load?
« Reply #3 on: April 07, 2015, 01:03:37 AM »
..the -l (lower-case L) is the "don't add to onboot.lst" flag, so "tce-load -wil dosfstools" is correct. It should be in tce-load --help output.
The only barriers that can stop you are the ones you create yourself.

Offline bkm

  • Jr. Member
  • **
  • Posts: 72
Re: What CLI command to download and load?
« Reply #4 on: April 07, 2015, 06:15:12 AM »
..the -l (lower-case L) is the "don't add to onboot.lst" flag, so "tce-load -wil dosfstools" is correct. It should be in tce-load --help output.

Umm.... That didn't work.

Using the -wil switch downloaded the extension and let it run, but it also kept it around. After a reboot, I attempted to use the same command to bring it back again as a temporary extension but was met with a message indicating the extension was already downloaded!!!

So now when I reboot, the extension is already in place and I can use tce-load -i dosfstools to load it in to the active system. This is NOT what I was looking for. I don't want the dosfstools extension to be hanging around after a reboot.

I did read the -h help listing and it was no better at explaining the switches than the Core book. I know it is possible to do this because I have done it many times under the GUI app manager and never had this problem. This time I am stuck using the CLI app manager and it appears there is still some missing command that will let me download and load the extension into memory without keeping it around after reboot.

BKM
« Last Edit: April 07, 2015, 06:20:49 AM by bkm »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: What CLI command to download and load?
« Reply #5 on: April 07, 2015, 06:43:53 AM »
Install as any other extension and just remove .tcz from /tce/optional and delete in /tce/onboot.lst when you do not need it anymore.
Béla
Ham Radio callsign: HA5DI

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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: What CLI command to download and load?
« Reply #6 on: April 07, 2015, 07:58:15 AM »
There is no difference between Apps "Download + load" and "tce-load -wil" - if you check the source, that is exactly what Apps calls. No switch exists for the functionality you want, to remove it after use.
The only barriers that can stop you are the ones you create yourself.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: What CLI command to download and load?
« Reply #7 on: April 07, 2015, 09:35:14 AM »
Just a wild guess, but I think this should work(?).:
Code: [Select]
touch /etc/sysconfig/tcedir/copy2fs.lst
echo foobar.tcz >> /etc/sysconfig/tcedir/copy2fs.lst
tce-load -w foobar.tcz && tce-load -i foobar.tcz && rm /etc/sysconfig/tcedir/optional/foobar.tcz*
(I think the  -wil  switches will add the extension to onboot.lst.)
So the contend of the extension is loaded into RAM and the extension itself can be safely removed.
Download a copy and keep it handy: Core book ;)