Re: Mass install / Autoinstall (Was: Re: Debian vs Red Hat??? I need info.)
Hello All
There is definitately some scope for development in this area.
Debian is one of the best distro's to maintain but it is one of the
worst to install. These advantages and disadvantages are
multiplied when you have many machines to maintain.
On 17 May 00, at 21:55, Karl M. Hegbloom wrote:
> You can make a copy of the system like this... it will create a
> `cpio' archive... substitute `ustar' for `crc' to make a `tar'
> compatible archive. RTFM's... you're on your own.
>
> 8<-------------------------------------------->8
> #!/bin/bash
> find / -print0 |
> grep --invert-match --extended-regexp --null-data --file=/root/make-tarball.exclude-patterns |
> cpio --create --format=crc --null --reset-access-time --block-size=10 |
> gzip --best > /tmp/system-snapshot_$(date +%Y.%m.%d).cpio.crc.gz
> 8<-------------------------------------------->8
I tried this to create a custom "base2_2.tzg" with reasonable results.
First problem is that we need a tar file and not a cpio one. Cpio's
"tar" format does not support block devices so the whole /dev/
directory gets broken. Then I tried "ustar". This worked better but
still has some limitation on file name length. A few files in
/var/state/apt/lists/* were too long - not a major trainsmash.
I wasted a few hours trying "tar" instead of cpio. It seems not to be
able to backup a directory, without backing up the contents of that
directory, this is a problem with things like /var/cache/apt/archives.
Maybe a real find/grep/tar guru could get it right but I went back to
Karl's script :-)
I still have some bugs. After the base install lilo would not run
(something broken with vmlinuz softlink). Then when the new
system is rebooted it went into a loop asking about shadow
passwords etc. I eventually replaced the /etc/inittab. Bug
squashing is a slow process ... a full test cycle requires a backup
and a new installation.
This seems a viable method of setting up a mass install system.
After I got things going I used Midnight Commander to do some
global searches and replaces in /etc to sort out things like domain
names and ppp accounts etc and then I had a system ready to run
with exim, squid, dns ,ppp, diald, mgetty, calamaris, dhcp, apache,
ftp, ipchains, samba, uucp, fetchmail etc all working! Best of all it is
a fully compliant Debian system, so apt-get update| apt-get
upgrade also works!
Next step may be to modify the dinstall program.
Question: Is'nt there a deb package with scripts for creating boot
disks? I feel I should not be reinventing the wheel.
Another question: Which list should we be discussing this? Karl's
original messages was sent to a whole bunch of lists?
My modified scripts are as follows (mind the line wrapping):
#! /bin/bash
find / -print0 |
grep --invert-match --extended-regexp --null-data --
file=/root/config/exclude-pattern |
cpio --create --format=ustar --null --reset-access-time --block-
size=10 |
gzip --best > /tmp/base2_2-$(date +%Y.%m.%d).tgz
^/proc/.*
^/tmp/.*
/lost+found
^/boot/lost+found
^/var/cache/apache/.*
^/var/cache/apt/.*\.deb
^/var/log/.*\.log
^/var/log/\(amanda\|apache\|gdm\|ksymoops\|mailman\|news\|sendfil
e\|wu-ftpd\)/.*
^/var/log/\(syslog\|smb\|nmb\|messages\|mail\|lpr\|debug\|dmesg\).*
^/var/lock/.*
^/var/run/.*\.pid
^/var/run/\(ndc\|utmp\)
^/var/samba/.*
^/var/spool/squid/.*/.*/.*
\.bash_history
\.gnome-errors
.*~
/\.saves-.*
/\.#.*
/\.netscape/cache/.*
^/etc/modules
^/etc/hostname
^/etc/hosts
^/etc/networks
^/etc/resolv.conf
^/etc/modutils/
^/etc/apm/event.d/pcmcia
^/etc/init.d/pcmcia
^/etc/pcmcia/
^/etc/network/interfaces
^/tmp/
Ian Forbes
---------------------------------------------------------------------
Ian Forbes ZSD
http://www.zsd.co.za
Office: +27 +21 683-1388 Fax: +27 +21 64-1106
Snail Mail: P.O. Box 46827, Glosderry, 7702, South Africa
---------------------------------------------------------------------
Reply to: