Tiny Core Linux

Tiny Core Base => Corepure64 => Topic started by: minux on July 24, 2020, 09:45:58 PM

Title: [Solved] How to modify the operation mode of TCL/CP64
Post by: minux on July 24, 2020, 09:45:58 PM
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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Sashank999 on July 24, 2020, 10:26:39 PM
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 :
Disadvantages :

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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Juanito on July 24, 2020, 10:36:55 PM
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
Title: Re: How to modify the operation mode of TCL/CP64
Post by: minux on July 25, 2020, 03: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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Juanito on July 25, 2020, 04:04:55 AM
Have you read the tinycore faq and book - they might help give you an overview of how things work?
Title: Re: How to modify the operation mode of TCL/CP64
Post by: minux on July 25, 2020, 04:43:45 AM
Yeah.But I didn't find on the FAQ how to set bootcode from a configuration file.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Sashank999 on July 25, 2020, 04:44:55 AM
Which bootloader are you using ? syslinux or grub2 ?
Title: Re: How to modify the operation mode of TCL/CP64
Post by: minux on July 25, 2020, 04:53:11 AM
Which bootloader are you using ? syslinux or grub2 ?
Sorry, I'm not sure.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Sashank999 on July 25, 2020, 04: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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: minux on July 25, 2020, 06: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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Sashank999 on July 25, 2020, 06: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 .
Title: Re: How to modify the operation mode of TCL/CP64
Post by: minux on July 25, 2020, 07: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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Juanito on July 25, 2020, 07: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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: minux on July 25, 2020, 08: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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Sashank999 on July 25, 2020, 08: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.
Title: Re: How to modify the operation mode of TCL/CP64
Post by: Rich on July 25, 2020, 08:30:45 PM
Hi NOOB
... So why do I install more applications with less memory? I'm not running it. I'm just loading it.
So how are you measuring memory usage? Like this:
Code: [Select]
tc@box:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          2015       1430        584          0         74        332
-/+ buffers/cache:       1023        991
Swap:         1001        148        853
tc@box:~$

Or did you clear the cache first:
Code: [Select]
tc@box:~$ sudo cache-clear
tc@box:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          2015       1029        985          0          0        178
-/+ buffers/cache:        850       1165
Swap:         1001        148        853
tc@box:~$
Title: [Solved] Re: How to modify the operation mode of TCL/CP64
Post by: aus9 on July 25, 2020, 09:14:07 PM
Hi NOOB

I may be jumping to conclusions but if you have time, what information helped you to decide to
download CorePure64*iso in preference to TinyCorePure64*iso.

Extra question, being of course ....what was your thoughts on which would suit you better?

I observe a number of links above this forum tend to be TC32-centric.

And I am wondering, if you got confused with TC32 CorePlus which could also be abbreviated as CP?

cheers

Title: Re: [Solved] How to modify the operation mode of TCL/CP64
Post by: PDP-8 on August 02, 2020, 03:10:16 PM
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...


REAL NOOBS try to understand what a project is all about first, before demanding changes to act like other systems.

You have demonstrated that you are NOT in fact a real NOOB, and are besmirching the character of those who truly are and are seeking help.

The ONLY thing you are seeking is demanding that we answer all your questions, and carefully avoiding those we ask in return to better understand your mission.

What we know now based on other posts, is that either you don't understand what a community of give-and-take is, or are simply wasting our time on purpose.

Your posted actions demonstrate that you are not interested in learning, and in fact, give real NOOBs a bad name.  We, or at least I, am not falling for it.