1 |
On 08:30 Mon 09 Sep , Michael Hampicke wrote: |
2 |
> Am 08.09.2013 20:51, schrieb Benjamin Block: |
3 |
> > Hej folks, |
4 |
> > |
5 |
> > I wonder what is a good way to create an image of a gentoo-system, so |
6 |
> > that one can apply it later to the same or other computers. |
7 |
> > |
8 |
> > In my case it is a rather simple setup: one partition, no encryption or |
9 |
> > lvm. Its a debug-setup, so its only used for certain programming-tasks |
10 |
> > and not for daily work, so no need for something fancy. The time I setup |
11 |
> > that system I also used only conservative compilation-flags and |
12 |
> > optimisation, so that it can be used on other CPUs (well, they have to |
13 |
> > be x86_64 and have to have mmx/sse[23] - but I think every setup that I |
14 |
> > intend to use this on will have these properties). |
15 |
> > |
16 |
> > So I reckon that one could just use tar with permission-preservation and |
17 |
> > some excludes like dev/sys/proc/tmp. But is this a good idea or is there |
18 |
> > a better way to do this? I never cloned a gentoo-system, so thats why I |
19 |
> > would like to be at least somewhat sure about it, so that I don't have |
20 |
> > to reconfigure it later again, because I messed it up :D |
21 |
> > |
22 |
> |
23 |
> Tar with permission preservation is fine. Just exlude everything in |
24 |
> dev/sys/proc/tmp as you said. But make sure, that these directories are |
25 |
> in your tar file, it does not matter if they are empty, but they have to |
26 |
> exist in order to boot proplery. |
27 |
> |
28 |
> One special case. To boot you most likely will need /dev/console and |
29 |
> /dev/null. Just inlcude those two device nodes in your tar file. |
30 |
> |
31 |
|
32 |
Thanks for pointing that out, but why are these both special? Seems to |
33 |
me like these are also (char)device-nodes and shouldn't they also be |
34 |
generated by the kernel with DEVTMPFS and then udev at a very early |
35 |
init-stage? |
36 |
|
37 |
> Optionally use compression (gz, bz2, xz, ...) on your tar to safe some |
38 |
> space. |
39 |
> |
40 |
|
41 |
|
42 |
- Ben |