WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] How to modify the operation mode of TCL/CP64  (Read 7976 times)

minux

  • Guest
[Solved] How to modify the operation mode of TCL/CP64
« on: July 25, 2020, 12:45:58 AM »
Hello friends!Thank you again .... again ... again ...

I have thought about this title and text for a long time, because I really don't know how to express the question I want to ask, because I am a real noob, so please forgive me.Thank you.

How to make TCL/CP64 like other systems, the system does not load the program into memory until it needs to run the program, and then recovers the memory when it exits the program.
instead of loading the program into memory all at once and recovering the memory until the shutdown...

As I installed more and more programs, I found that the mydata.tgz file got bigger and bigger, which consumed a lot of time performing backup and restore every time.

 Unfortunately, it seems like my mydata.tgz is also loaded into memory every time I boot up, so the amount of space of my mydata.tgz file takes up affects the overall performance of the system.
« Last Edit: August 01, 2020, 11:17:45 AM by Rich »

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 400
Re: How to modify the operation mode of TCL/CP64
« Reply #1 on: July 25, 2020, 01:26:39 AM »
I think you are asking to replace mydata.tgz. Instead of mydata.tgz, we can use persistence.

Persistence means we would have home and opt as folders inside the current partition rather than restoring them at boot. But persistence has some advantages and disadvantages (these are said to me by aus9).

Adavntages :
  • Lesser Boot Time
Disadvantages :
  • Direct Writes => No way to undo data deletions

Persistent "home" directory can be set by using "home bootcode". Add option "home=sdXY" (XY are a part of the device name - like sda1to the kernel parameters and you will have persistent home.

I suggest you to copy the /home folder on tinycore to the partition and then use the home bootcode. You can also set persistent opt directory.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14826
Re: How to modify the operation mode of TCL/CP64
« Reply #2 on: July 25, 2020, 01:36:55 AM »
As I installed more and more programs, I found that the mydata.tgz file got bigger and bigger, which consumed a lot of time performing backup and restore every time.

You can use the control panel "System Stats"/"bigHomeFiles" tab to see what is taking up space in your backup - typically it is browser cache files, which can be excluded from your backup using /opt/.xfiletool.lst

minux

  • Guest
Re: How to modify the operation mode of TCL/CP64
« Reply #3 on: July 25, 2020, 06:47:48 AM »

Persistent "home" directory can be set by using "home bootcode". Add option "home=sdXY" (XY are a part of the device name - like sda1to the kernel parameters and you will have persistent home.
Where do you configure bootcode? Will this not generate the mydata.tgz file in the after?

Why is it that so much of my configuration information, such as screen brightness and Swapoff, is reset after a reboot?

What can I do to make the TCL/CP64 completely persistent like other systems? After all, it reduces the amount of memory available.
« Last Edit: July 25, 2020, 07:08:42 AM by NOOB »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14826
Re: How to modify the operation mode of TCL/CP64
« Reply #4 on: July 25, 2020, 07:04:55 AM »
Have you read the tinycore faq and book - they might help give you an overview of how things work?

minux

  • Guest
Re: How to modify the operation mode of TCL/CP64
« Reply #5 on: July 25, 2020, 07:43:45 AM »
Yeah.But I didn't find on the FAQ how to set bootcode from a configuration file.
« Last Edit: July 25, 2020, 07:45:43 AM by NOOB »

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 400
Re: How to modify the operation mode of TCL/CP64
« Reply #6 on: July 25, 2020, 07:44:55 AM »
Which bootloader are you using ? syslinux or grub2 ?

minux

  • Guest
Re: How to modify the operation mode of TCL/CP64
« Reply #7 on: July 25, 2020, 07:53:11 AM »
Which bootloader are you using ? syslinux or grub2 ?
Sorry, I'm not sure.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 400
Re: How to modify the operation mode of TCL/CP64
« Reply #8 on: July 25, 2020, 07:54:56 AM »
Did you just ran tc-install and then rebooted ?

In that case, it would actually be syslinux or extlinux. Look for something like extlinux.conf or syslinux.conf.

minux

  • Guest
Re: How to modify the operation mode of TCL/CP64
« Reply #9 on: July 25, 2020, 09:03:57 AM »
Did you just ran tc-install and then rebooted ?

In that case, it would actually be syslinux or extlinux. Look for something like extlinux.conf or syslinux.conf.
Hi Sashank999! I can only find the extlinux.conf under /mnt/sda1/tce/boot/extlinux.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 400
Re: How to modify the operation mode of TCL/CP64
« Reply #10 on: July 25, 2020, 09:37:45 AM »
Great. Now you have extlinux bootloader.
If you proceed for persistence, boot into TCL and copy the/home folder as it is to the partition root.
As yours is sda1, do this in a terminal :
Code: [Select]
mount /dev/sda1 # if not mounted
cp -r /home /mnt/sda1/ # add sudo if required
Now find the line in the extlinux.conf starting with "APPEND"(or "append"). Add "boot=sda1" at the last of it.
Done  :D .

minux

  • Guest
Re: How to modify the operation mode of TCL/CP64
« Reply #11 on: July 25, 2020, 10:31:37 AM »
Great. Now you have extlinux bootloader.
If you proceed for persistence, boot into TCL and copy the/home folder as it is to the partition root.
As yours is sda1, do this in a terminal :
Code: [Select]
mount /dev/sda1 # if not mounted
cp -r /home /mnt/sda1/ # add sudo if required
Now find the line in the extlinux.conf starting with "APPEND"(or "append"). Add "boot=sda1" at the last of it.
Done  :D .
Now mydata.tgz is not generated.But some configuration information, such as screen brightness, Swapoff, and so on, is not persisted and the entire program (*.tcz) is still loaded into memory when a program is run, rather than just a portion of the program's files as needed.
« Last Edit: July 25, 2020, 10:36:46 AM by NOOB »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14826
Re: How to modify the operation mode of TCL/CP64
« Reply #12 on: July 25, 2020, 10:49:26 AM »
But some configuration information, such as screen brightness, Swapoff, and so on, is not persisted
Use the "noswap" boot code

Quote
and the entire program (*.tcz) is still loaded into memory when a program is run, rather than just a portion of the program's files as needed.
Unless you have the copy2fs flag set, the extensions are not loaded into ram.

minux

  • Guest
Re: How to modify the operation mode of TCL/CP64
« Reply #13 on: July 25, 2020, 11:08:25 AM »
Use the "noswap" boot code
It doesn't work. The memory management tool still shows that the swap file still exists and can be used.

Quote
Unless you have the copy2fs flag set, the extensions are not loaded into ram.
So why do I install more applications with less memory? I'm not running it. I'm just loading it.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 400
Re: How to modify the operation mode of TCL/CP64
« Reply #14 on: July 25, 2020, 11:00:27 PM »
      Well, loading means making the tcz available to run. Even when you are not running, it will be loaded if it is on onboot.lst.
      Looks like you don't need some extensions. Using the Apps browser, when you download, click on "OnBoot" and change it into "Download + Load". This makes the extension to stay on HDD but it doesn't load them. OnBoot means they will be loaded at the boot of TCL thus consuming more time and more memory.
      If you want a shortcut to load that extension with just a click, you can change that "OnBoot" to "OnDemand". That makes that particular extension available in the OnDemand menu.

... such as screen brightness ...
For screen brightness, you can install lxrandr packages - lxrandr-locale.tcz(for different languages), lxrandr.tcz and lxrandr-doc.tcz(only if necessary).
This is some complicated. But if you don't want to install them, test this and if it works, you can add this as it is into "bootlocal.sh" :
Code: [Select]
MONITOR=$(xrandr | grep " connected" | cut -f1 -d " ") # Get the monitor name
xrandr --output "$MONITOR" --brightness [brightness-level]
The brightness level should be set between 0.5 to 1 for better visibility. You can edit brightness for next boot by editing bootlocal.sh without any GUI tools.