* [gentoo-user] creating an image of the system
@ 2013-09-08 18:51 Benjamin Block
2013-09-08 19:19 ` Mick
2013-09-09 6:30 ` Michael Hampicke
0 siblings, 2 replies; 12+ messages in thread
From: Benjamin Block @ 2013-09-08 18:51 UTC (permalink / raw
To: gentoo-user
Hej folks,
I wonder what is a good way to create an image of a gentoo-system, so
that one can apply it later to the same or other computers.
In my case it is a rather simple setup: one partition, no encryption or
lvm. Its a debug-setup, so its only used for certain programming-tasks
and not for daily work, so no need for something fancy. The time I setup
that system I also used only conservative compilation-flags and
optimisation, so that it can be used on other CPUs (well, they have to
be x86_64 and have to have mmx/sse[23] - but I think every setup that I
intend to use this on will have these properties).
So I reckon that one could just use tar with permission-preservation and
some excludes like dev/sys/proc/tmp. But is this a good idea or is there
a better way to do this? I never cloned a gentoo-system, so thats why I
would like to be at least somewhat sure about it, so that I don't have
to reconfigure it later again, because I messed it up :D
best regards,
- Ben
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-08 18:51 [gentoo-user] creating an image of the system Benjamin Block
@ 2013-09-08 19:19 ` Mick
2013-09-08 22:07 ` Dale
2013-09-09 6:30 ` Michael Hampicke
1 sibling, 1 reply; 12+ messages in thread
From: Mick @ 2013-09-08 19:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1338 bytes --]
On Sunday 08 Sep 2013 19:51:25 Benjamin Block wrote:
> Hej folks,
>
> I wonder what is a good way to create an image of a gentoo-system, so
> that one can apply it later to the same or other computers.
>
> In my case it is a rather simple setup: one partition, no encryption or
> lvm. Its a debug-setup, so its only used for certain programming-tasks
> and not for daily work, so no need for something fancy. The time I setup
> that system I also used only conservative compilation-flags and
> optimisation, so that it can be used on other CPUs (well, they have to
> be x86_64 and have to have mmx/sse[23] - but I think every setup that I
> intend to use this on will have these properties).
>
> So I reckon that one could just use tar with permission-preservation and
> some excludes like dev/sys/proc/tmp. But is this a good idea or is there
> a better way to do this? I never cloned a gentoo-system, so thats why I
> would like to be at least somewhat sure about it, so that I don't have
> to reconfigure it later again, because I messed it up :D
>
> best regards,
> - Ben
You're referring to a 'stage 4' iso. Have a look at this M/L perhaps 5 years
back when I recall someone posting a thread about it.
There may also be a thread in the forums and potentially the (old) wiki.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-08 19:19 ` Mick
@ 2013-09-08 22:07 ` Dale
2013-09-09 18:50 ` Benjamin Block
0 siblings, 1 reply; 12+ messages in thread
From: Dale @ 2013-09-08 22:07 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]
Mick wrote:
> On Sunday 08 Sep 2013 19:51:25 Benjamin Block wrote:
>> Hej folks,
>>
>> I wonder what is a good way to create an image of a gentoo-system, so
>> that one can apply it later to the same or other computers.
>>
>> In my case it is a rather simple setup: one partition, no encryption or
>> lvm. Its a debug-setup, so its only used for certain programming-tasks
>> and not for daily work, so no need for something fancy. The time I setup
>> that system I also used only conservative compilation-flags and
>> optimisation, so that it can be used on other CPUs (well, they have to
>> be x86_64 and have to have mmx/sse[23] - but I think every setup that I
>> intend to use this on will have these properties).
>>
>> So I reckon that one could just use tar with permission-preservation and
>> some excludes like dev/sys/proc/tmp. But is this a good idea or is there
>> a better way to do this? I never cloned a gentoo-system, so thats why I
>> would like to be at least somewhat sure about it, so that I don't have
>> to reconfigure it later again, because I messed it up :D
>>
>> best regards,
>> - Ben
>
> You're referring to a 'stage 4' iso. Have a look at this M/L perhaps
5 years
> back when I recall someone posting a thread about it.
>
> There may also be a thread in the forums and potentially the (old) wiki.
>
http://www.gentoo-wiki.info/HOWTO_Custom_Stage4
http://wiki.gentoo.org/wiki/Backup
One of those should help. If not, Google for "Gentoo starge4" without
the quotes of course.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!
[-- Attachment #2: Type: text/html, Size: 2650 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-08 18:51 [gentoo-user] creating an image of the system Benjamin Block
2013-09-08 19:19 ` Mick
@ 2013-09-09 6:30 ` Michael Hampicke
2013-09-09 19:05 ` Benjamin Block
` (2 more replies)
1 sibling, 3 replies; 12+ messages in thread
From: Michael Hampicke @ 2013-09-09 6:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1542 bytes --]
Am 08.09.2013 20:51, schrieb Benjamin Block:
> Hej folks,
>
> I wonder what is a good way to create an image of a gentoo-system, so
> that one can apply it later to the same or other computers.
>
> In my case it is a rather simple setup: one partition, no encryption or
> lvm. Its a debug-setup, so its only used for certain programming-tasks
> and not for daily work, so no need for something fancy. The time I setup
> that system I also used only conservative compilation-flags and
> optimisation, so that it can be used on other CPUs (well, they have to
> be x86_64 and have to have mmx/sse[23] - but I think every setup that I
> intend to use this on will have these properties).
>
> So I reckon that one could just use tar with permission-preservation and
> some excludes like dev/sys/proc/tmp. But is this a good idea or is there
> a better way to do this? I never cloned a gentoo-system, so thats why I
> would like to be at least somewhat sure about it, so that I don't have
> to reconfigure it later again, because I messed it up :D
>
Tar with permission preservation is fine. Just exlude everything in
dev/sys/proc/tmp as you said. But make sure, that these directories are
in your tar file, it does not matter if they are empty, but they have to
exist in order to boot proplery.
One special case. To boot you most likely will need /dev/console and
/dev/null. Just inlcude those two device nodes in your tar file.
Optionally use compression (gz, bz2, xz, ...) on your tar to safe some
space.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-08 22:07 ` Dale
@ 2013-09-09 18:50 ` Benjamin Block
2013-09-09 19:38 ` Dale
0 siblings, 1 reply; 12+ messages in thread
From: Benjamin Block @ 2013-09-09 18:50 UTC (permalink / raw
To: gentoo-user
On 17:07 Sun 08 Sep , Dale wrote:
> Mick wrote:
> > On Sunday 08 Sep 2013 19:51:25 Benjamin Block wrote:
> >> Hej folks,
> >>
> >> I wonder what is a good way to create an image of a gentoo-system, so
> >> that one can apply it later to the same or other computers.
> >>
> >> In my case it is a rather simple setup: one partition, no encryption or
> >> lvm. Its a debug-setup, so its only used for certain programming-tasks
> >> and not for daily work, so no need for something fancy. The time I setup
> >> that system I also used only conservative compilation-flags and
> >> optimisation, so that it can be used on other CPUs (well, they have to
> >> be x86_64 and have to have mmx/sse[23] - but I think every setup that I
> >> intend to use this on will have these properties).
> >>
> >> So I reckon that one could just use tar with permission-preservation and
> >> some excludes like dev/sys/proc/tmp. But is this a good idea or is there
> >> a better way to do this? I never cloned a gentoo-system, so thats why I
> >> would like to be at least somewhat sure about it, so that I don't have
> >> to reconfigure it later again, because I messed it up :D
> >>
> >> best regards,
> >> - Ben
> >
> > You're referring to a 'stage 4' iso. Have a look at this M/L perhaps
> 5 years
> > back when I recall someone posting a thread about it.
> >
> > There may also be a thread in the forums and potentially the (old) wiki.
> >
>
> http://www.gentoo-wiki.info/HOWTO_Custom_Stage4
>
> http://wiki.gentoo.org/wiki/Backup
>
> One of those should help. If not, Google for "Gentoo starge4" without
> the quotes of course.
>
ok, thank you both for pointing out how this is called and the links.
Could have thought of "stage 4" myself, it's somewhat logic ;)
- Ben
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-09 6:30 ` Michael Hampicke
@ 2013-09-09 19:05 ` Benjamin Block
2013-09-09 19:21 ` Michael Hampicke
2013-09-11 11:01 ` Neil Bothwick
2013-09-11 11:55 ` Stefan G. Weichinger
2 siblings, 1 reply; 12+ messages in thread
From: Benjamin Block @ 2013-09-09 19:05 UTC (permalink / raw
To: gentoo-user
On 08:30 Mon 09 Sep , Michael Hampicke wrote:
> Am 08.09.2013 20:51, schrieb Benjamin Block:
> > Hej folks,
> >
> > I wonder what is a good way to create an image of a gentoo-system, so
> > that one can apply it later to the same or other computers.
> >
> > In my case it is a rather simple setup: one partition, no encryption or
> > lvm. Its a debug-setup, so its only used for certain programming-tasks
> > and not for daily work, so no need for something fancy. The time I setup
> > that system I also used only conservative compilation-flags and
> > optimisation, so that it can be used on other CPUs (well, they have to
> > be x86_64 and have to have mmx/sse[23] - but I think every setup that I
> > intend to use this on will have these properties).
> >
> > So I reckon that one could just use tar with permission-preservation and
> > some excludes like dev/sys/proc/tmp. But is this a good idea or is there
> > a better way to do this? I never cloned a gentoo-system, so thats why I
> > would like to be at least somewhat sure about it, so that I don't have
> > to reconfigure it later again, because I messed it up :D
> >
>
> Tar with permission preservation is fine. Just exlude everything in
> dev/sys/proc/tmp as you said. But make sure, that these directories are
> in your tar file, it does not matter if they are empty, but they have to
> exist in order to boot proplery.
>
> One special case. To boot you most likely will need /dev/console and
> /dev/null. Just inlcude those two device nodes in your tar file.
>
Thanks for pointing that out, but why are these both special? Seems to
me like these are also (char)device-nodes and shouldn't they also be
generated by the kernel with DEVTMPFS and then udev at a very early
init-stage?
> Optionally use compression (gz, bz2, xz, ...) on your tar to safe some
> space.
>
- Ben
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-09 19:05 ` Benjamin Block
@ 2013-09-09 19:21 ` Michael Hampicke
2013-09-09 19:39 ` Dale
0 siblings, 1 reply; 12+ messages in thread
From: Michael Hampicke @ 2013-09-09 19:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1969 bytes --]
Am 09.09.2013 21:05, schrieb Benjamin Block:
> On 08:30 Mon 09 Sep , Michael Hampicke wrote:
>> Am 08.09.2013 20:51, schrieb Benjamin Block:
>>> Hej folks,
>>>
>>> I wonder what is a good way to create an image of a gentoo-system, so
>>> that one can apply it later to the same or other computers.
>>>
>>> In my case it is a rather simple setup: one partition, no encryption or
>>> lvm. Its a debug-setup, so its only used for certain programming-tasks
>>> and not for daily work, so no need for something fancy. The time I setup
>>> that system I also used only conservative compilation-flags and
>>> optimisation, so that it can be used on other CPUs (well, they have to
>>> be x86_64 and have to have mmx/sse[23] - but I think every setup that I
>>> intend to use this on will have these properties).
>>>
>>> So I reckon that one could just use tar with permission-preservation and
>>> some excludes like dev/sys/proc/tmp. But is this a good idea or is there
>>> a better way to do this? I never cloned a gentoo-system, so thats why I
>>> would like to be at least somewhat sure about it, so that I don't have
>>> to reconfigure it later again, because I messed it up :D
>>>
>>
>> Tar with permission preservation is fine. Just exlude everything in
>> dev/sys/proc/tmp as you said. But make sure, that these directories are
>> in your tar file, it does not matter if they are empty, but they have to
>> exist in order to boot proplery.
>>
>> One special case. To boot you most likely will need /dev/console and
>> /dev/null. Just inlcude those two device nodes in your tar file.
>>
>
> Thanks for pointing that out, but why are these both special? Seems to
> me like these are also (char)device-nodes and shouldn't they also be
> generated by the kernel with DEVTMPFS and then udev at a very early
> init-stage?
If you have DEVTMPFS enabled you should be fine. But not everybody has
that enabled, or even uses udev :-)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-09 18:50 ` Benjamin Block
@ 2013-09-09 19:38 ` Dale
0 siblings, 0 replies; 12+ messages in thread
From: Dale @ 2013-09-09 19:38 UTC (permalink / raw
To: gentoo-user
Benjamin Block wrote:
> On 17:07 Sun 08 Sep , Dale wrote:
>>
>> http://www.gentoo-wiki.info/HOWTO_Custom_Stage4
>>
>> http://wiki.gentoo.org/wiki/Backup
>>
>> One of those should help. If not, Google for "Gentoo starge4" without
>> the quotes of course.
>>
> ok, thank you both for pointing out how this is called and the links.
> Could have thought of "stage 4" myself, it's somewhat logic ;)
>
>
> - Ben
>
>
Only once you know it. I'm not going to tell how many times I have
posted a question because I don't know what to search for. It happens
to us all. Heck, just when I get used to something being called one
thing, they change the name to something else. :/
Hope that gets you just what you want tho. It should be a start at
least. I saw lots of other hits on Google too.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-09 19:21 ` Michael Hampicke
@ 2013-09-09 19:39 ` Dale
0 siblings, 0 replies; 12+ messages in thread
From: Dale @ 2013-09-09 19:39 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]
Michael Hampicke wrote:
> Am 09.09.2013 21:05, schrieb Benjamin Block:
>> On 08:30 Mon 09 Sep , Michael Hampicke wrote:
>>> Am 08.09.2013 20:51, schrieb Benjamin Block:
>>>> Hej folks,
>>>>
>>>> I wonder what is a good way to create an image of a gentoo-system, so
>>>> that one can apply it later to the same or other computers.
>>>>
>>>> In my case it is a rather simple setup: one partition, no encryption or
>>>> lvm. Its a debug-setup, so its only used for certain programming-tasks
>>>> and not for daily work, so no need for something fancy. The time I
setup
>>>> that system I also used only conservative compilation-flags and
>>>> optimisation, so that it can be used on other CPUs (well, they have to
>>>> be x86_64 and have to have mmx/sse[23] - but I think every setup that I
>>>> intend to use this on will have these properties).
>>>>
>>>> So I reckon that one could just use tar with
permission-preservation and
>>>> some excludes like dev/sys/proc/tmp. But is this a good idea or is
there
>>>> a better way to do this? I never cloned a gentoo-system, so thats why I
>>>> would like to be at least somewhat sure about it, so that I don't have
>>>> to reconfigure it later again, because I messed it up :D
>>>>
>>>
>>> Tar with permission preservation is fine. Just exlude everything in
>>> dev/sys/proc/tmp as you said. But make sure, that these directories are
>>> in your tar file, it does not matter if they are empty, but they have to
>>> exist in order to boot proplery.
>>>
>>> One special case. To boot you most likely will need /dev/console and
>>> /dev/null. Just inlcude those two device nodes in your tar file.
>>>
>>
>> Thanks for pointing that out, but why are these both special? Seems to
>> me like these are also (char)device-nodes and shouldn't they also be
>> generated by the kernel with DEVTMPFS and then udev at a very early
>> init-stage?
>
> If you have DEVTMPFS enabled you should be fine. But not everybody has
> that enabled, or even uses udev :-)
>
I would include them just in case. Why take the chance that it fails
for whatever reason.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!
[-- Attachment #2: Type: text/html, Size: 3460 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-09 6:30 ` Michael Hampicke
2013-09-09 19:05 ` Benjamin Block
@ 2013-09-11 11:01 ` Neil Bothwick
2013-09-11 11:55 ` Stefan G. Weichinger
2 siblings, 0 replies; 12+ messages in thread
From: Neil Bothwick @ 2013-09-11 11:01 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
On Mon, 09 Sep 2013 08:30:24 +0200, Michael Hampicke wrote:
> Tar with permission preservation is fine. Just exlude everything in
> dev/sys/proc/tmp as you said. But make sure, that these directories are
> in your tar file, it does not matter if they are empty, but they have to
> exist in order to boot proplery.
>
> One special case. To boot you most likely will need /dev/console and
> /dev/null. Just inlcude those two device nodes in your tar file.
Instead of all that, you could bind-mount / somewhere and just make a
tarball of that. That way you exclude any other filesystems (which can
also be done with --one-filesystem) and include any device nodes in the
underlying /dev directory.
--
Neil Bothwick
It may be that your sole purpose in life is simply to serve as a
warning to others.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-09 6:30 ` Michael Hampicke
2013-09-09 19:05 ` Benjamin Block
2013-09-11 11:01 ` Neil Bothwick
@ 2013-09-11 11:55 ` Stefan G. Weichinger
2013-09-11 14:11 ` thegeezer
2 siblings, 1 reply; 12+ messages in thread
From: Stefan G. Weichinger @ 2013-09-11 11:55 UTC (permalink / raw
To: gentoo-user
Am 09.09.2013 08:30, schrieb Michael Hampicke:
> Tar with permission preservation is fine. Just exlude everything
> in dev/sys/proc/tmp as you said. But make sure, that these
> directories are in your tar file, it does not matter if they are
> empty, but they have to exist in order to boot proplery.
Sorry if I am maybe a bit OT (am I?):
I often cloned systems from or into VMs by booting both systems with
live-CDs, mounting their disks and "rsync -av" the root-fs over ...
sure, taking care of dev/sys/proc/tmp does not hurt ...
After the rsync maybe some fstab-editing, checking grub-config ... but
that worked several times already ... (OK, not automated ... but
sufficient if I prepare a server inside a VM and then apply that image
once).
S
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] creating an image of the system
2013-09-11 11:55 ` Stefan G. Weichinger
@ 2013-09-11 14:11 ` thegeezer
0 siblings, 0 replies; 12+ messages in thread
From: thegeezer @ 2013-09-11 14:11 UTC (permalink / raw
To: gentoo-user
On 09/11/2013 12:55 PM, Stefan G. Weichinger wrote:
> Am 09.09.2013 08:30, schrieb Michael Hampicke:
>
>> Tar with permission preservation is fine. Just exlude everything
>> in dev/sys/proc/tmp as you said. But make sure, that these
>> directories are in your tar file, it does not matter if they are
>> empty, but they have to exist in order to boot proplery.
> Sorry if I am maybe a bit OT (am I?):
>
> I often cloned systems from or into VMs by booting both systems with
> live-CDs, mounting their disks and "rsync -av" the root-fs over ...
> sure, taking care of dev/sys/proc/tmp does not hurt ...
>
> After the rsync maybe some fstab-editing, checking grub-config ... but
> that worked several times already ... (OK, not automated ... but
> sufficient if I prepare a server inside a VM and then apply that image
> once).
>
> S
>
>
personally i like to add the clone-to disk as a mirror into my lvm, then
once it is synced, i stop service such as databases, split the mirror
and then start databases again.
this lets me import the lvm to the new location practically identical,
of course fstab etc need changing at the other end
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-09-11 14:11 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-08 18:51 [gentoo-user] creating an image of the system Benjamin Block
2013-09-08 19:19 ` Mick
2013-09-08 22:07 ` Dale
2013-09-09 18:50 ` Benjamin Block
2013-09-09 19:38 ` Dale
2013-09-09 6:30 ` Michael Hampicke
2013-09-09 19:05 ` Benjamin Block
2013-09-09 19:21 ` Michael Hampicke
2013-09-09 19:39 ` Dale
2013-09-11 11:01 ` Neil Bothwick
2013-09-11 11:55 ` Stefan G. Weichinger
2013-09-11 14:11 ` thegeezer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox