[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Building an emergency repair CD



Hello!

I'm building an emergency repair CD for the servers we sell.  The idea is that
if the system ever goes so crazy it can't even boot, you put the CD in, reset
the computer and the CD boots and overwrites anything with a copy of the
working system.

I already managed to build the boot environment, with an initrd image whose
purpose is to mount a bigger media (eg. CD-Rom) where it could find a minix
image with the rest of the boot system, and mount it with loopback on /usr;
all of this seem to work fine.

Now I just have to write the barbarian overwriting bulldozer.  I would have
liked to do a zcat image.gz > /dev/sda, but the image should be on a CD-Rom,
that isn't big enough to store a complete disk image.

Until now, I always kept the base Linux system (without /var and /home) in a
single partition of about 600Mb, so that it can always fit on a CD, but to
restore the image of a single partition I have to restore the partition table
first.

How can I backup and restore the partition table?

I was thinking about using   dd if=/dev/sda of=saved.partition count=1   and
vice versa, but i wouldn't save logical partitions.
 
I then thought about using sfdisk -d > saved.partition   and
sfdisk < saved.partition, but I need to be sure that:
 1) It recreates a partition table exactly equals to the original
 2) It supports Mylex AcceleRAID logical disks

...so the two questions of this post are:

 1) Does  sfdisk -d | sfdisk  _always_ rewrite _exactly_ what was before?
 2) Does sfdisk support Mylex AcceleRAID logical disks?


As a side note, this system could evolve in a boot system to make partitions
dumps and restores, be network aware, be able to apply patches to the restored
partition (one of the goals is to have a single common CD dump of your Windows
95 clients that you stick in, type the name of the PC, and it restores the
clean system and appropriately sets the client IP address and system name).

Anybody who is interested in working on such a system please contact me; GNU
Public License, of course.

				Read you soon! Enrico

--
GPG public key available on finger -l zinie@cs.unibo.it


Reply to: