Tiny Core Base > TCB Talk
How does TC run from RAM?
(1/1)
nim108:
Hey guys,
I was hoping the TC team can help me with this (even though the question isn't entirely TC related). I'm currently building a kernel/OS from scratch using Buildroot (I'd love to use TC but I can't as we have to customize every little thing). Buildroot generates a rootfs.ext2 filesystem (or ext3 or ext4 or whatever the partition type may be) that can be dd'ed onto the target partition (which will put /bin, /etc, /tmp/ /usr all on the partition properly). However, I wanted to load this rootfs entirely from RAM so that I can store everything on the one boot partition. This also makes updates a breeze and corruption a non-issue. What are the steps I'd need to take to launch this gzipped file into memory (from the kernel perspective and Syslinux perspective)? I want to follow whatever approach TC took to do this. I will definitely look at TC sources but I wanted more of a general overview of what I'd have to do. Thanks. This is still by far my favorite tiny Linux distribution and we are using it on multiple projects here for a wide variety of applications.
Should my starting point be that I take the TC 3.8.x modified kernel and do a make oldconfig to use that for Buildroot's new kernel? That should have the proper config options set for initramfs correct? I would do this, but I'm looking to understand the process rather than hack it together.
gerald_clark:
There is plenty of information accessible from the Iinycorelinux home page.
http://distro.ibiblio.org/tinycorelinux/
Basically it loads the initfs the same way other Linux distributions do, but never pivot root to a disk based root file system.
nim108:
Nevermind, think I got it. Buildroot has an option to generate an initramfs for you and kernel is configured by default to enable initramfs and it seems to boot up fine. I'll have to play around with it to make sure I didn't break anything. Cool concept; didn't know the kernel / OS config makes it so easy to do now. Used to have to build it manually.
If anyone else was curious about this, here is a very good official reference: https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
Navigation
[0] Message Index
Go to full version