Networking Forums

Networking Forums > Computer Networking > Linux Networking > disk image creation & restauration

Reply
Thread Tools Display Modes

disk image creation & restauration

 
 
Antoine Logean
Guest
Posts: n/a

 
      08-06-2003, 08:39 AM
Hi everybody,

How can I create and copy (with which program) a disk image of my /
partition to a /backup partition ? And more important how can I restore
it at the boot time ? The best solution whould be to have the different
images on a server and to restore them on each client.

What kind of solutions exist on Linux ?

thanks for your help

Antoine

 
Reply With Quote
 
 
 
 
Antoine Logean
Guest
Posts: n/a

 
      08-06-2003, 10:16 AM
the problem is that there are 12 clients that have to be reinstalled
every morning in a pretty simple way.

Now imagine you copy the huge tar file of the / partition on the backup
partition. Ok. But how can you restore it automatically if the /
partition is destroyed ? I can not boot manually each client with a
rescue disk, reformat the /, untar the think and copy it to /. I would
have to come at 5 AM every morning !

do you understand my problem ?

Antoine

 
Reply With Quote
 
Peter T. Breuer
Guest
Posts: n/a

 
      08-06-2003, 10:54 AM
In comp.os.linux.setup Antoine Logean <(E-Mail Removed)> wrote:
> the problem is that there are 12 clients that have to be reinstalled
> every morning in a pretty simple way.


> Now imagine you copy the huge tar file of the / partition on the backup
> partition. Ok. But how can you restore it automatically if the /
> partition is destroyed ? I can not boot manually each client with a


By making the partition first! Next silly question?

> rescue disk, reformat the /, untar the think and copy it to /. I would
> have to come at 5 AM every morning !


> do you understand my problem ?


No. You are an idiot. Have you ever heard of scripting? It appears
NOT. Here, have a free conslutancy:

sfdisk < sfdisk.save
mke2fs /dev/hda5
mkswap /dev/hda2
mount /dev/hda5 /mnt
tar xzvfC /image.tgz /mnt

Put it in /bin/rc on the live cdrom, and boot with init=/bin/rc.

That will be $0. Plus the cost of my education. Which makes up for
yours.


Peter
 
Reply With Quote
 
Nico Kadel-Garcia
Guest
Posts: n/a

 
      08-06-2003, 10:55 AM
Antoine Logean wrote:
> the problem is that there are 12 clients that have to be reinstalled
> every morning in a pretty simple way.
>
> Now imagine you copy the huge tar file of the / partition on the backup
> partition. Ok. But how can you restore it automatically if the /
> partition is destroyed ? I can not boot manually each client with a
> rescue disk, reformat the /, untar the think and copy it to /. I would
> have to come at 5 AM every morning !


Ooof. Dude, you need to learn how to use tftp to install disk images
online. And include the details when you ask for solutions, the devil is
in the details.

Also, geneerally ignore Peter. he cops a really hard attitude on the
newbies, and his answers often leave out critical bits.

 
Reply With Quote
 
Jean-David Beyer
Guest
Posts: n/a

 
      08-06-2003, 11:17 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Antoine Logean wrote:
| Hi everybody,
|
| How can I create and copy (with which program) a disk image of my /
| partition to a /backup partition ? And more important how can I restore
| it at the boot time ? The best solution whould be to have the different
| images on a server and to restore them on each client.
|
| What kind of solutions exist on Linux ?
|
| thanks for your help
|
| Antoine
|
You could use find and cpio (in -p mode) to do the copy from / to /backup.

You could use it the other way to restore.

Why would you want to restore at boot time? If your hardware is so bad
that a total restore is required every time you boot, you should spend
your time getting the hardware fixed.

As a user, I would find having my files all restored to some time in the
past quite intolerable. It would mean that nothing I did between reboots
would, in fact, have been done.

What is the real problem you are trying to solve?

- --
~ .~. Jean-David Beyer Registered Linux User 85642.
~ /V\ Registered Machine 73926.
~ /( )\ Shrewsbury, New Jersey http://counter.li.org
~ ^^-^^ 7:10am up 15 days, 12:03, 2 users, load average: 2.23, 1.98, 1.53
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/MOOxPtu2XpovyZoRAppIAJ9fy3XyInHYahZKfmLNQGL90jlQKg CcD6M7
2z9d2FlOMna2cw0ht+9KnA8=
=l6js
-----END PGP SIGNATURE-----

 
Reply With Quote
 
Nico Kadel-Garcia
Guest
Posts: n/a

 
      08-06-2003, 11:51 AM
Peter T. Breuer wrote:

> In comp.os.linux.setup Antoine Logean <(E-Mail Removed)> wrote:
>
>>the problem is that there are 12 clients that have to be reinstalled
>>every morning in a pretty simple way.

>
>
>>Now imagine you copy the huge tar file of the / partition on the backup
>>partition. Ok. But how can you restore it automatically if the /
>>partition is destroyed ? I can not boot manually each client with a

>
>
> By making the partition first! Next silly question?
>
>
>>rescue disk, reformat the /, untar the think and copy it to /. I would
>>have to come at 5 AM every morning !

>
>
>>do you understand my problem ?

>
>
> No. You are an idiot. Have you ever heard of scripting? It appears
> NOT. Here, have a free conslutancy:
>
> sfdisk < sfdisk.save
> mke2fs /dev/hda5
> mkswap /dev/hda2
> mount /dev/hda5 /mnt
> tar xzvfC /image.tgz /mnt
>
> Put it in /bin/rc on the live cdrom, and boot with init=/bin/rc.
>
> That will be $0. Plus the cost of my education. Which makes up for
> yours.


*Sigh*. The bit that Peter entirely left out, under the "pay no
attention to that man behind the curtain" approach to technical support,
is the part where the machine has to auto-reboot every morning at 5am
and load the scripting to do this.

There are a couple of ways. A locked down partition that has these tools
embedded in it and manipulates the LILO reboot arguments or grub.conf
arguments to reboot once and once only with the newly installed
partition is possible, and reload the whole mess every time after that,
is one trick. But this can be done more gracefully with tools such as
tftp and various auto-installation tools.

Another is to leave a spare partition to install the OS image into,
usually in scratch space or another disk, reboot to that partition, then
recopy *that* OS image back to the original partition. You can get away
with quite a lot of tweaking this way.

Keeping the tarball or other image up to date is its own problem. Either
designate a machine as "the source machine(tm)", or once you've made a
tarball, you can uncompress the tarball to a specific directory and
"chroot" to that directory to do all sorts of reconfiguration, update,
etc. without even requiring a dedicated machine to work from.

 
Reply With Quote
 
Nico Kadel-Garcia
Guest
Posts: n/a

 
      08-06-2003, 11:53 AM
Jean-David Beyer wrote:


> Why would you want to restore at boot time? If your hardware is so bad
> that a total restore is required every time you boot, you should spend
> your time getting the hardware fixed.
>
> As a user, I would find having my files all restored to some time in the
> past quite intolerable. It would mean that nothing I did between reboots
> would, in fact, have been done.
>
> What is the real problem you are trying to solve?


This is extremely common in computing cluster machines where user's do
not *have* local home directories, and all software should be
re-installed regularly to prevent people leaving littls packages or
messed up configurations for each other.

 
Reply With Quote
 
Jean-David Beyer
Guest
Posts: n/a

 
      08-06-2003, 12:04 PM
Nico Kadel-Garcia wrote:
> Jean-David Beyer wrote:
>
>
>> Why would you want to restore at boot time? If your hardware is so bad
>> that a total restore is required every time you boot, you should spend
>> your time getting the hardware fixed.
>>
>> As a user, I would find having my files all restored to some time in the
>> past quite intolerable. It would mean that nothing I did between reboots
>> would, in fact, have been done.
>>
>> What is the real problem you are trying to solve?

>
>
> This is extremely common in computing cluster machines where user's do
> not *have* local home directories, and all software should be
> re-installed regularly to prevent people leaving littls packages or
> messed up configurations for each other.
>

I never heard of such a thing. If a user has no local home directory,
how do people leave little packages for a user? Surely the ordinary
users are not in a position to create home directories on the local
machine for other users (or even themselves). If I understand the
situation you describe, I would assume you set it up so no local files
of any kind can be created (except by the super user), so local users
cannot cause any problems like this.

Anyone screwing around would have to do it on the remote file server,
and that should be set up so users can affect only their own files.

What am I missing?

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 73926.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 7:55am up 15 days, 12:48, 2 users, load average: 2.07, 2.08, 2.08

 
Reply With Quote
 
Antoine Logean
Guest
Posts: n/a

 
      08-06-2003, 12:48 PM
Thanks Nico,

I will need some time to digest and try what you propose.

here other solutions proposed by Erich Lerch and Felix Rauch:

Partition Image http://www.partimage.org/
mondo rescue: http://www.microwerks.net/~hugo/download/download.html
Dolly
http://rpmfind.net/linux/RPM/cooker/...mdk.alpha.html

 
Reply With Quote
 
Nico Kadel-Garcia
Guest
Posts: n/a

 
      08-06-2003, 12:52 PM
Jean-David Beyer wrote:

> Nico Kadel-Garcia wrote:


>> This is extremely common in computing cluster machines where user's do
>> not *have* local home directories, and all software should be
>> re-installed regularly to prevent people leaving littls packages or
>> messed up configurations for each other.
>>

> I never heard of such a thing. If a user has no local home directory,
> how do people leave little packages for a user? Surely the ordinary
> users are not in a position to create home directories on the local
> machine for other users (or even themselves). If I understand the
> situation you describe, I would assume you set it up so no local files
> of any kind can be created (except by the super user), so local users
> cannot cause any problems like this.


Home directories are AFS or NFS or SMB mounted from a local server.

> Anyone screwing around would have to do it on the remote file server,
> and that should be set up so users can affect only their own files.
>
> What am I missing?


Experience. If you leave machines up and running 24x7 with no flushing
of the OS, people *do* leave little love packages. And because
UNIX/Linux are such fun and powerful operating systems, and because if
you have shell or X windows access you can run programs out of "/tmp"
which absolutely must be read-write-execute for all, you can't really
prevent them from running installing and running programs locally.

It's often fairly trivial to set up a server for FTP, IRC, pirate
software web sites, etc. running on a port for your buddies to use as a
server from off-site, or given some time to play around you can run a
fake login interface that steals people's passwords, or lock the screen
on the machine so no one else can use it until you unlock it or the
machine is reboot it, etc., etc. Take a look at the David LaMacchia case
at MIT from a few years back for examples of what can happen.

Also, the "flush me every day completely" is a good way to make sure the
machines get *all* the upgrades and are in a configuration known to the
admins, without having to integrate a new set of patches on top of an
older running operating system and make sure you wound up with the same
expected state.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISO image creation problem using Revisor Application Niraj Linux Networking 1 04-21-2009 08:23 PM
Diskless: Howto create a root-disk image Andy Linux Networking 1 09-25-2006 08:47 PM
Wizard disk creation problems Smithereen Wireless Networks 3 04-23-2005 03:40 PM
RIS service: how to deploy SCSI disk drivers to work with RIS image? Andreja Martonja Windows Networking 0 09-19-2004 06:58 PM
create a disk image Hernán Castelo Windows Networking 3 05-31-2004 01:38 PM



1 2 3 4 5 6 7 8 9 10 11