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