Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: theYinYeti on March 04, 2012, 10:46:04 AM
-
Hi! I use an old laptop with 32MB RAM; I thought it was 48 but no, it is 32… I wish to use TinyCore instead of the current DSL.
I am aware that I’ll need to do things that are not standard. But I’m willing to do this as long as the method is reproducible and still based on upstream releases.
I’m thinking of two things:
1º— For a start, I’d like to remove as much in-RAM loading as possible. So what are the things that are loaded? vmlinuz then core.gz, I suppose, and then what?
2º— Is there any existing module, so that RAM is compressed with a fast and light-on-CPU algorithm? That way, I’d have a bit more than 32MB…
Thanks for any pointers. Yves.
-
2) Yes, zram, and we already enable it by default ;)
-
Good! So 2º is done with :)
With a closer look, I already have a couple of more specific questions:
3º— I see that / is rootfs. I assume this “partition” is loaded in memory from core.gz. And I see that df reports this “partition” as being 24MB and only 44% full. Shouldn’t it be close to 100% full instead, as all software is loop-mounted? Could I reclaim some RAM on those 24MB?
4º— I also see that /tmp is tmpfs. As I have my own /tmp on disk, is there a method, as for home and opt, to tell TC to use a given partition for /tmp storage?
Well… now that I think about it, I have one more question:
5º— Late boot is just a series of “No space left on device”. Yet, as noted above, rootfs is only 44% full. The only “partitions” that are 100% full are the /dev/loop*, as should be I guess. So what is considered full on boot, to give me the messages I get?
-
Quoted from http://forum.tinycorelinux.net/index.php/topic,12714.0/topicseen.html#lastPost (http://forum.tinycorelinux.net/index.php/topic,12714.0/topicseen.html#lastPost)
4. Use the nozswap boot code
This may be counterproductive, especially on a low-ram system as this.
I'll continue this here since a new thread was created. I meant for the nozswap boot code to be used together
with a swap file. While not as fast, he won't be consuming RAM for swap storage, of which he does not have
much to begin with.
@theYinYeti: Using a persistent /home and /opt will keep them from using up RAM.
-
I meant for the nozswap boot code to be used together
with a swap file. While not as fast, he won't be consuming RAM for swap storage, of which he does not have
much to begin with.
Do I have to use a swap file, even when I already have a /dev/sda1 swap partition?
When I run with persistent opt and home, but without any swap-related option, I still have memory-related errors, for /var/run/… and /tmp/…
-
Hi theYinYeti
If you have a swap partition you don't need a swap file. You can use the boot code swap=sda1
-
You can use the boot code swap=sda1
There's no such bootcode, as far as I know?
-
Actually, the swap partition is seen: at some point of the boot process, there is a message telling that available swap partition(s) are enabled, and free shows it. I just hope this swap is seen soon enough so that no RAM is lost because of a temporary lack of swap. If I understand correctly, I might gain a bit of RAM by using nozswap along with my swap partition. Thank you curaga and Rich :)
I’m still interested in answers to my questions 1, 3, 4 and 5 ;)
-
Hi curaga
Your right, guess I'll remove that boot code from my systems. I must have copied that from somewhere without
checking the facts.
3. If the rootfs is full, there won't be any space to write to, so no, it should not be 100% full.
-
4) no.
3, 5) You're likely out of inodes even if there is space left. But still it is very low on ram, close to the limits.
-
I did my home-work, and I found some answers :)
1º: All I need is there:
http://wiki.tinycorelinux.net/wiki:the_boot_process (http://wiki.tinycorelinux.net/wiki:the_boot_process)
http://wiki.tinycorelinux.net/wiki:custom_kernel (http://wiki.tinycorelinux.net/wiki:custom_kernel)
http://wiki.tinycorelinux.net/wiki:remastering (http://wiki.tinycorelinux.net/wiki:remastering)
3º: I see that core.gz:/init remounts / with size 90% (maximum), without setting the default value. I may try and set instead an absolute value based on the result of the “du” command…
For 4º and 5º, I’m still in the dark :(
I don’t see anywhere in the core.gz file, where /tmp is mounted, much less where it is set to tmpfs. And while curaga may be right about the cause for the seemingly cause-less “no space left”, I don’t know how to enable more inodes.
Oh, and while I’m at it, let me add a sixth question:
6º— What is the purpose of the “noembed” boot option? I see in core.gz:/init, that when set, it duplicates / inside /mnt, and then switch_root to it; what is the point? / is in memory, and /mnt is also in memory… so, what is gained by this noembed option?
-
While you can set the number of tmpfs inodes with the nr_inodes mount option, it's too late to do that in /init; the limit has already been met at that point and some files are missing.
noembed is useful for proprietary installers etc that need to see the free space on /.