WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tiny Core runs as "scattered" files in ram?  (Read 2606 times)

Offline SunBurnt

  • Full Member
  • ***
  • Posts: 102
Tiny Core runs as "scattered" files in ram?
« on: August 07, 2011, 04:36:11 AM »
The file tinycore.gz is decompressed at boot into initramfs.
This makes it a scattered ( I call: Loose file ) file system.

A Squash file better than loose files and uses less ram.
Then the running TC core exists as a secure Squash file.
I know the file: mydata.tgz is copied over the initramfs.
But there`s other ways the OS can be writable ( no union ).

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Tiny Core runs as "scattered" files in ram?
« Reply #1 on: August 07, 2011, 08:22:24 AM »
Mhm, do we even use an initramfs?
What other ways are you refering to?

Offline SunBurnt

  • Full Member
  • ***
  • Posts: 102
Re: Tiny Core runs as "scattered" files in ram?
« Reply #2 on: August 07, 2011, 04:32:01 PM »
It use to be a ramdrive, but a initramfs is current tech. ( you know this already...)

As you said hiro, links, in this case to dirs. on the HD, not the file: mydata.tgz.
A very different setup than TC, the Squash file is linked into and not used directly.
Loose links and dirs. are made in ram or copied to ram from the Squash file.
/ dirs. in ram: /dev, /mnt, /proc, /sys, /tmp , the rest are links to the Squash and HD.
Config. files and the like are on the HD, apps. are in other Squash files same as TC.
Most OS files aren`t written to and some are, this setup puts the rw files on the HD.

This setup uses 1/3 the ram of TC`s all loose files in ram ( kernel not included ).
It`s only a savings of 17 MB or so. Not much. But running a Squash file is secure.

An item I neglected to mention, the Linux kernel won`t boot with a Squash file.
To my knowledge it only uses image files and cpio files for booting. ( wrong? )
So to make this idea complete would require modifying the kernel. No small task!

But a Squash file can be put inside an image or cpio file, and the tools to boot it.
Tools needed are the mount command and a dir. mount point, and it`s good to go.

NOTE: The kernel could mount a Squash file at bootup on it`s own.
It only needs internal boot code to do it, the kernel can mount and make dirs.,
and it has the Squash driver in it, I don`t think it needs any external libraries.
So a new bootup method should be added to the kernel`s existing 3. ( I think 3 )
« Last Edit: August 07, 2011, 05:41:39 PM by SunBurnt »

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Tiny Core runs as "scattered" files in ram?
« Reply #3 on: August 07, 2011, 05:44:46 PM »
I thought we were running an initrd, but this appears to be a false suggestion made by my bootloader config.

Our initramfs consists of a gz-compressed cpio and is pretty much basic. If I understand you correctly you want to put the drivers we need for accessing the squashfs files into a squashfs file. :D

If you want to save more space just remaster the files and remove unneded modules on each of your systems.

Offline SunBurnt

  • Full Member
  • ***
  • Posts: 102
Re: Tiny Core runs as "scattered" files in ram?
« Reply #4 on: August 07, 2011, 06:04:52 PM »
hiro; Saving space isn`t the point but a side benefit, reducing scattered files is the point.
I know the initramfs is made fresh each boot, but while running it`s vulnerable. Correct?
When all the read-only files are kept inside a Squash file, then they are in a secure file.
After all... If you don`t have to write to them, then why are they out loose and not secured?

If the Squash file is inside a cpio file, then mount and the mount dir. are in the cpio, not the Squash.
When the kernel extracts the cpio there`s 2 files and 1 dir., mount the Squash then delete mount.
« Last Edit: August 07, 2011, 06:36:22 PM by SunBurnt »

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Tiny Core runs as "scattered" files in ram?
« Reply #5 on: August 07, 2011, 06:25:43 PM »
I still don't get what you're trying to acchieve.

You can only be so secure.
The remarkable part of our security concept is that people can reboot to a secure, working state as long as nobody manipulates mydata or tce files.
But root is still able to compromise the system. With and without squashfs files in our cpio.

IIRC we support replacing files from initramfs with extension contents.

An other point against your proposal is simplicity. A compressed file inside a compressed file, why?

Offline SunBurnt

  • Full Member
  • ***
  • Posts: 102
Re: Tiny Core runs as "scattered" files in ram?
« Reply #6 on: August 07, 2011, 06:32:11 PM »
Yes TC is a very good setup, simple, functional, and reliable.

Just pointing out an alternative way to setup an OS.

Salutations... Terry

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Tiny Core runs as "scattered" files in ram?
« Reply #7 on: August 07, 2011, 06:36:59 PM »
We're mostly limited by linux kernel and it's complexity, but tinycore really made the best of it.

Offline SunBurnt

  • Full Member
  • ***
  • Posts: 102
Re: Tiny Core runs as "scattered" files in ram?
« Reply #8 on: August 07, 2011, 07:24:16 PM »
Yes... TC`s so close to the OS I`ve thought about for years now that it`s scary.
That`s what attracted me here, along with the fact that it`s the setup of an advanced OS.
Puppy and DSL were patterned after Knoppix, but using a union is old hat and soon gone.

As I said in another post, I`ve tried to get the Puppy folks to ditch the union file sys. for years.
Even suggested that it be an option on the setup GUI... Union or no union.