1 |
On 26/12/2011 18:03, Joakim Tjernlund wrote: |
2 |
> I am contemplating a greater problem too. Our system require we can install |
3 |
> multiple versions of our SW and switch between them. This is easy to do when it |
4 |
> comes to our own app but not when one want to upgrade core parts of the system, like |
5 |
> libc etc. |
6 |
> |
7 |
> So I am thinking one could use --bind mounts and switch_root to solve that. Basically |
8 |
> one has a skeleton root FS with /bin, /lib, /usr /opt etc. |
9 |
> Each upgrade goes into dirs like: |
10 |
> bin_1.x.y/ usr_1.x.y/ lib_1.x.y/ opt_1.x.y/ sbin_1.x.y/ |
11 |
> Then, from an initramfs, one selects which of xxx_1.x.y dir one wants to use |
12 |
> and --bind mounts them under the corresponding skeleton dir. |
13 |
> |
14 |
|
15 |
I'm doing something like this using aufs. The performance seems "not |
16 |
bad", but you get a couple MB or so memory hit. (I'm using squashfs as |
17 |
well, so unsure which causes the main memory increase). |
18 |
|
19 |
I think if the device is reasonably beefy then you should have no |
20 |
problem with aufs or some similar overlay filesystem (I think some new |
21 |
one got added to kernel recently?). Failing that, what about good old |
22 |
"cp -a" to merge all the input dirs? Takes some time and disk space, |
23 |
but nice and simple? |
24 |
|
25 |
Good luck |
26 |
|
27 |
Ed W |