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