WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: building cpio.gz's  (Read 2570 times)

Offline la11111

  • Newbie
  • *
  • Posts: 5
building cpio.gz's
« on: June 02, 2012, 06:43:19 PM »
Hey folks, I'm new here :)

I've been working with TC for a few weeks now, and I have to say, it's pretty sweet :) You guys rock.

So here's what I'm trying to do - I'm working on building an OS for a large number of diskless thin clients, and I'm building it off of tinycore. If I can get it working like I want it to, it's going to replace probably 100 or so thin clients running various versions of embedded windows - installed separately onto each one (the horror ...) I'm going to build a centralized management system for dissemination of OS images to the branches, which will be based on iPXE and HTTP.

Given this situation, I've decided that what I want to do is to use a variation of the dynamic remastering method to create initramfs images for various core parts of the OS (xorg, desktop environment, etc). This way, they can be downloaded via iPXE and unpacked by linux directly, pre-installed, without the overhead of running install scripts, mounting, etc. for each package on every boot. So i've started building modules such as Xorg-7.6-core.cpio.gz, Xorg-7.5-core.cpio.gz, etc etc ... with all of the base x.org stuff packed in. (xlibs, xorg-bin,lib,etc)

It's worked fairly well so far, from what i can tell - but i'm having some issues, so I was wondering if anyone else has tried to do this and found a good method for doing it.

The issue i'm having is - i want to run the tce.installed scripts before i pack everything into a cpio. I've been able to get it to work well enough inside of a chroot with the new core files going into a unionfs overlay on top of an unpacked core.gz, but the scripts don't always run properly, so I have to carry out their contents manually in some cases ... particularly when scripts assume that they're not running as root. (which, as far as i'm aware, you have to be root to chroot). or when they try to access /tmp/tcloop. Also, the fact that the init scripts haven't run on a pure unpacked core is probably going to be an issue at some point.

The next thing i'm going to try is to overlay a fuse unionfs on top of the running (base) rootfs (or some variation of this procedure) and see if i can get it to work without chroot - but i'm not sure how that's gonna go. If I still can't get it to work like i want, I may just make an extension with a script to run all of those tce.installed scripts. I'm hoping i don't have to do that though!

--

anyway, if anyone has suggestions, ideas, critiques, etc. I'm all ears. (as long as you're not telling me to pack tcz's into a cpio, because i'm not gonna do that ;) don't worry, though, i'm not doing this for everything - just the big stuff.) Anyway, i'll be back with updates if i make any progress. Looks like it's back to work!

thoughts?

-la

Offline la11111

  • Newbie
  • *
  • Posts: 5
Re: building cpio.gz's
« Reply #1 on: June 03, 2012, 01:46:23 AM »
I answered my own question on the scripts forum.

http://forum.tinycorelinux.net/index.php/topic,13392.0.html

-la

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: building cpio.gz's
« Reply #2 on: June 03, 2012, 05:05:17 AM »
Actually packing tcz's to the initrd would save RAM, though cost boot time. Please make sure your clients have sufficient RAM, if it runs short in the middle of extracting an initrd you get silent corruption, not even a warning.
« Last Edit: June 03, 2012, 05:07:39 AM by curaga »
The only barriers that can stop you are the ones you create yourself.