1 |
Rich Freeman posted on Sun, 15 Jul 2012 14:48:55 -0400 as excerpted: |
2 |
|
3 |
> Giving it a little thought, the simplest tmpfs-based root would be one |
4 |
> that defines a tarball as a the root. The system would create a tmpfs, |
5 |
> extract the tarball to it, and then use the existing fstab-sys module to |
6 |
> mount stuff on top of that. This gives you the option of actually |
7 |
> putting some content in the tarball, or just storing an empty directory |
8 |
> structure in it. A tarball would let you set permissions/etc and be a |
9 |
> bit more generic than writing a custom script. If you wrote a module to |
10 |
> do this I wouldn't be suprised if upstream let you merge it. You'd just |
11 |
> need to define some kind of sane syntax for it |
12 |
> (root=TAR=path...to...tarball - though how a path works with nothing |
13 |
> mounted you'd have to define). Maybe you define the tarball at |
14 |
> initramfs creation (as is done with fstab.sys and mdadm.conf). |
15 |
|
16 |
Tarball is an interesting idea I hadn't considered. At first blush I |
17 |
like it. =:^) |
18 |
|
19 |
Thinking in that direction does stimulate yet another idea, tho. What |
20 |
about a squashfs root? AFAIK squashfs is read-only at use time, thus |
21 |
enforcing actually mounting something else to write anything, eliminating |
22 |
many of the down sides of sticking with the initial ramfs root, but it |
23 |
would allow the same flexibility in terms of sticking whatever into it at |
24 |
create-time, while only taking the memory necessary for what's actually |
25 |
stuck in it at create-time. I /think/ it's swappable, too, which would |
26 |
give me some flexibility in terms of letting more stuff be added at |
27 |
create-time without having to worry about it being locked in memory. And |
28 |
I think squashfs is reasonably tested territory for this sort of thing, |
29 |
given its use for live-media, etc. And it's in mainline now, too, which |
30 |
is nice. =:^) I'll have to do some research and think about that a bit |
31 |
more... |
32 |
|
33 |
Definitely thanks for the tarball idea, as otherwise I'd probably have |
34 |
not got out of my "box" and thought about squashfs. I'm probably missing |
35 |
its downsides ATM, but you still broke my thinking out of the box! |
36 |
|
37 |
-- |
38 |
Duncan - List replies preferred. No HTML msgs. |
39 |
"Every nonfree program has a lord, a master -- |
40 |
and if you use the program, he is your master." Richard Stallman |