Tiny Core Linux
Tiny Core Base => CorePlus => Topic started by: Mike7 on April 18, 2014, 11:28:09 PM
-
Hi, all, and Happy Easter!
Everything I've read about running Linux on USB flash drives says not to use swap files as they seriously shorten the life of the drive. Yet after using the Installer app in CorePlus-5.1 to make a frugal install to a flash drive, I found this:
Control Panel>System Stats>mem:
SwapTotal: 248684 kB
Control Panel>System Stats>dmesg:
Adding 248684k swap on /dev/zram0. Priority:-1 extents:1 across:248684k SS
What gives here? Is this 248MB swap file being used? Is it necessary? Why was it created? What should I do about it?
My computer has 1GB of RAM. Isn' t that enough to run TCL without a swap file?
And if I must have a swap file, wouldn' t it be better to have a separate swap partition or even a separate flash drive just for swapping, so as not to endanger the OS?
Can someone help me solve this issue so I don't keep worrying about it?
Thanks.
Cheers!
Mike
-
That is zswap. It is not on the flash drive.
Google zswap for more information.
To turn it off use the nozswap boot option.
-
Hi, Gerald. Happy Easter!
That is zswap. It is not on the flash drive.
That's a relief.
Google zswap for more information.
Found these:
========================================
kernel.org:
"Zswap is a lightweight compressed cache for swap pages. It takes pages that are in the process of being swapped out and attempts to compress them into a dynamically allocated RAM-based memory pool. zswap basically trades CPU cycles for potentially reduced swap I/O.
Users with SSDs as swap devices can extend the life of the device by
drastically reducing life-shortening writes."
========================================
Wikipedia:
"As a result of reduced I/O, zswap offers advantages for various devices using flash-based storage, including embedded devices, netbooks and similar low-end hardware devices, as well as other devices using SSDs for storage. Flash memory has a limited lifespan due to its nature, so avoiding its usage for providing swap space prevents it from wearing out quickly."
========================================
It sounds like a very good thing, just the opposite of what I feared, so I won't be turning it off.
I guess it's enabled by default and being used?
Cheers.
Mike
-
Hi Mike7,
Yes, your'e right. The Corebook says:
10.33. nozswap - disable compressed swap in RAM
By default, Core uses a RAM compression technique allowing
you to use more RAM than you actually have. If you experience
problems with this, the nozswap bootcode lets you disable this.
Example:
• nozswap
As you don't experience any problems with this, there's no need for you to change anything. :)
Enjoy TC!
Volker
-
Volker-
You don't think zswap could be the cause of my problem watching videos in the browser?
M.
-
Volker-
You don't think zswap could be the cause of my problem watching videos in the browser?
M.
Don't ask. Disable and try. But for sure not.
-
Hi, Béla.
Don't ask.
That's the opposite of what my mother taught me <grin>. Remember the first time you put your finger in a flame to see what would happen?
I was thinking of putting nozswap into extlinux.conf to see if that would improve video playing in my browser. Then I thought: suppose it doesn't and I want to re-activate zswap? Does removing nozswap from extlinux.conf re-create the zswap file? If not, how will I do that?
In other words, better to ask than to get into a bunch of trouble.
Cheers!
Mike
-
zswap always gets enabled at boot if not explicitely disabled by the nozswap boot code.
You can safely add the nozswap to your boot loader and remove it to 're-enable' zswap.
Instead of editing your bootloaders config file, you can also just press TAB (for syslinux, extlinux, etc.) in the boot menu and edit the boot parameters without saving it to the config file.
-
Hi, Béla.
Don't ask.
That's the opposite of what my mother taught me <grin>. Remember the first time you put your finger in a flame to see what would happen?
Mike,
what I told:
Don't ask. Disable and try.
TC is all about learning and experimenting. What is better than to get hands on knowledge than reading books? At the end of the day you have to try anyhow to see wheter it helps or not.
:)
Bela
-
Hi, Béla.
You are right of course, in most situations, and I agree with you. For example, I have been reading the sections in Corebook about using Apps and tc-ab and tce-load, but no matter how many times I re-read them I still have to try to use them in order to understand how they work.
OTOH, there are many things that TCL does automatically, or by default, and unless I know how to un-do them I don't like to tamper with them. I just don't know enough yet.
Cheers!
Mike
-
The good thing about TCL is that, compared to traditionally installed OSes, it's quite difficult to 'destroy' it.
If you have made some more or less important customizations, they are probably stored in your mydata.tgz (or core.gz if you have remastered this one).
So, if you don't trust in the changes you've made, you can just create copy of your mydata.tgz file before rebooting (where the mydata.tgz file gets updated) - Or choose the "save"-option at the 'TC Exit Options' if you're sure everything is working correctly.
So you're almost always able to recreate an earlier/working configuration.
-
Hi, Misalf.
Thanks for the pep talk. I guess I needed it.
But I'm really not worried about making mistakes. The problems I'm having are built-in ones, like the use of Apps. For example, how come there are eight or so extensions (mostly dependencies) listed in "Load Apps Locally", when I never downloaded an extension except as onboot?
And why are almost all of the dependencies of applications that were pre-installed by CorePlus in onboot.lst, now forcing me to remove them one by one, a thankless task that Apps hasn't automated (so far as I can see)?
And how do I know which extensions to delete altogether, from over a hundred in the optional/ directory, probably half of which are unneeded?
Neither Corebook, nor the wikis, nor any here in the forum have been able or willing to explain to me how to do these things. Corebook passes over the Apps functions as if the people reading it already knew how to use them. Saying "Use the Dependencies and Deletions routines for managing dependencies" isn't any help at all.
Here are a few basic questions I need answers to before I can go any further with my TCL installation:
- Why were all extensions, including dependencies, put into onboot.lst by the CorePlus Installer?
- Why are some of these dependencies now no longer in onboot.lst (the ones appearing under "Load Apps Locally", I assume)? Are these dependencies of applications I deleted but which are also dependencies of other applications, so that when I deleted applications these dependencies were retained but are no longer in onboot.lst? (This is one possible explanation. The funny thing is that when I did "Fetch Missing dependencies" the list in "Load Apps Locally" didn't change. Apparently all the missing dependencies that were fetched went right back into onboot.lst, where they don' t belong.)
- How can I remove extensions (using Apps) that don't need to be in onboot.lst without writing them down by hand, one by one, and then removing them one by one?
- How do I know which extensions in the optional/ directory are not needed (firmware, libraries, dependencies of unused or deleted applications, etc.), so I can delete them?
My guess is that the people who wrote Apps don' t use it, using instead the terminal applications tce-ab and tce-load. For them, problems with the use or understanding of Apps don't matter. This is a cynical conclusion to come to, but after hassling with Apps for so long and getting no real help, it's the only conclusion I can come to.
I had similar problems with the Installer app when trying to install CorePlus to a USB flash drive. Everything about the Installer app gives the impression that it's not used by the people who wrote it. They don't use CorePlus, so why should they use the CorePlus Installer? It wasn't use-tested by a person like me who really needs it, so the problems with it never came out (Iike choosing between Frugal and USB-HDD, and the ambiguity of the boot code page).
In any case, I'll bear in mind that, like you kindly reminded me, there is a "Safe Backup" choice at shutdown, where I can save my unchanged mydata.tgz file. That does help a lot.
Cheers.
Mike
-
CorePlus installs a lot ov packages to support a lot of different hardware.
If you want a smaller installation use tthe TinyCore installer instead.
Core is not a normal distro. It is a toolkit. It is designed for experienced people who need to build small systems.
If this is too difficult for you, you should try puppy or one of the other user oriented distros.
-
Hi, Gerald.
CorePlus installs a lot of packages to support a lot of different hardware.
But why does it put application dependencies in onboot.lst when they will be loaded at boot anyway (supposedly) by the application they are dependencies of?
If you want a smaller installation use tthe TinyCore installer instead.
I probably would have done so, but I needed the wifi apps. I have no ethernet connection.
Core is not a normal distro. It is a toolkit. It is designed for experienced people who need to build small systems.
I can't claim to be experienced, but I do like small systems. However, TCL isn't all that small once the regular apps like file manager, browser, sound and media players, image and pdf viewers, etc. are installed. In fact it rapidly grows into a medium-size distro.
No, what attracted me to Core was the simplicity and elegance of the base apps like Editor, Wifi, Mount Tool, and the Control Panel utilities. Their austere look reminds me of the old xwindows in Unix, for which I have a lot of nostalgia, having worked at a Unix work station for five years in the early '90s.
I'm a minimalist at heart. I hate fancy gui's. For example, I've never really made the transition from B&W to color films <grin>, and I defend the artistic quality of B&W movies over color ones. Art was lost with the advent of color, IMO.
If this is too difficult for you, you should try puppy or one of the other user oriented distros.
I do have a Puppy distro on a pendrive (Puppeee4.4-atom). It has some nice apps, very well integrated, and a lovely clean desktop. But later versions of Puppy have gotten more and more fancy and unpleasant, and the nice simple apps were thrown out in favor of ones with bells and whistles that are of no interest to me. There is no longer any support for Puppeee, most regrettably. Progress killed it.
I'm very conservative in a lot of ways. I don't believe in constant updating. I believe applications should be perfected and then used for a long time. I like stability. I'm anti-consumerist and anti-modern.
So I kinda like TCL. Although I feel some dangerously progressive tendencies in it <grin>.
Mike
-
I suggest that you experiment more with Apps and the other utilities. Even if you make a major mistake, it only takes about 5 minutes to completely reinstall it.
CorePlus puts more than is necessary in the onboot.lst, but trying to analyze your system and decide what you might want would over complicate the installation.
Just because program2 is a dependency of program1, it does not follow that you might not want program2 even if you remove program1 from the onboot list.
Don't be afraid to play with it. As you become more familiar with it you will appreciate the utilities more.
-
Hi Mike7
But why does it put application dependencies in onboot.lst when they will be loaded at boot anyway (supposedly) by the application they are dependencies of?
Without a couple of examples of what you are referring to that would be difficult to answer.
However, TCL isn't all that small once the regular apps like file manager, browser, sound and media players, image and pdf viewers, etc. are installed. In fact it rapidly grows into a medium-size distro.
No distro will be small when when you load it up with lots of apps. What Tinycore gives you is a small base system to which you only add the
apps that interest you instead of coming preloaded with multiple editors, browsers, file managers, audio/video apps, etc.
-
If you want a smaller installation use tthe TinyCore installer instead.
I probably would have done so, but I needed the wifi apps. I have no ethernet connection.
It's recommended to use coreplus only to install, thereafter only copy extension which you need for your hardware. wifi as an example which only requires maybe one or two extensions at most, not multiple extensions to support a wide range of hardware you don't have..
-
Title of the thread:
CorePlus-5.1 Installer creates swap file on USB flash drive: Why?
gerald_clark wrote on April 19th:
That is zswap. It is not on the flash drive.
Herewith the problem was solved to my mind.
But discussion continued, drifted away and now deals with the usage of the Apps tool and advantages/disadvantages of CorePlus, TinyCore and so on.
Sure, Mike7 needs some help using the Apps Tool, which in my sight is an excellent tool. I'm ready to give Mike7 some fundamental help regarding this, only I doubt, if this is the most suitable thread to do this. Any suggestions? Or should I better contact Mike7 per PM?
-
Hi volkerp
You are absolutely right.
@Mike7: Please mark this thread solved and start a new thread.
-
Hi, Gerald.
I suggest that you experiment more with Apps and the other utilities. Even if you make a major mistake, it only takes about 5 minutes to completely reinstall it.
Maybe, but unless I can rescue mydata.gz I'd be starting from scratch. A lot of time lost.
CorePlus puts more than is necessary in the onboot.lst, but trying to analyze your system and decide what you might want would over complicate the installation.
What I don't understand is why any dependency tcz's are in onboot.lst, since they will supposedly get loaded when the app they are dependencies of is loaded. Won't they?
Just because program2 is a dependency of program1, it does not follow that you might not want program2 even if you remove program1 from the onboot list.
That I can see, perhaps. But so long as program 1 is onboot, what's the point in having program 2 onboot?
As a matter of fact, those eight-odd tcz's listed in "Load Apps Locally" are probably dependencies that got kicked out of onboot.lst somehow and weren't removed from tce/optional/ along with the program they were dependencies of (for some unknown reason), and are orphans. It's really very difficult to know what to do about them. They're not application tcz's.
M.
-
Rich and Volker-
I agree. This thread has gone far afield so I will mark it solved and move on.
Cheers.
Mike