I run the following command to re-install or upgrade a machine. "rekickstart <mdkversion>". For example, to install mandrake 8.1 on a machine I just type (as root) "rekickstart mdk8.1" or for 9.0 "rekickstart mdk9.0".
This is the script:
#!/bin/sh
umask=077
timestamp="`date +%Y%m%d`"
serv="servername"
location="/net/$serv/export/jumpstart/$1/install"
mountdir="/network.img-$timestamp"
if [ ! -d $location ]; then
echo "Sorry, bad kickstart version."
echo "Try ./rekickstart mdk8.1"
exit;
fi
# copy network.img to /var/tmp.
rm -rf /var/tmp/network.img
cp -f $location/images/network.img /var/tmp
# create a directory to mount the image too.
mkdir $mountdir
# mount image to directory
mount -o loop -t auto /var/tmp/network.img $mountdir
# copy the kernel and initrd files to /boot
cp -f $mountdir/vmlinuz /boot/vmlinuz-jump
cp -f $mountdir/network.rdz /boot/network-jump.rdz
#umount image and rmove directory
umount $mountdir
rmdir $mountdir
#add entry to lilo
cat >> /etc/lilo.conf <<EOF
# rejumpstart stuff
image=/boot/vmlinuz-jump
label=jump
read-only
append="kickstart=/tmp/image/auto_inst.cfg automatic=method:nfs,server:<serverip>,directory:/export/jumpstart/$1/install,interface:eth0,network:dhcp, ramdisk_size=32000 vga=788"
initrd=/boot/network-jump.rdz
EOF
# modify lilo.conf to have default=vmlinuz-jump-$timestamp
cat /etc/lilo.conf | sed "s/default=.*/default=jump/" > /var/tmp/lilo.conf
cp -f /var/tmp/lilo.conf /etc/lilo.conf
rm -f /var/tmp/lilo.conf
chmod 600 /etc/lilo.conf
#run lilo
lilo
# run sync several times so when we do a forced reboot everything
# works
sync
sync
sync
# reboot instantly
reboot -n -f -i
There is no need to get up from your desk to "reinstall" the OS.
Obviously this will require a working kickstart auto_inst.cfg file for Mandrake kickstart... but those are easy to make.
Lieven Van Acker wrote:
Thanks Dianne,
I also came to this idea, but it is quite a hassle to disassemble
harddisks from about a 100 workstations and then reassemble them.
I got some feedback from Jack Coates, on how to create a network boot
CD. This is a lot easier to roll-out.
Here's my complete setup:
I have 1 image-server, containing images of the different computer types
(hardware + software config)
Each workstation has a dual boot config, defaulting to W2K - needed for
some course specific applications. The second boot option is linux,
password protected from lilo.
I also have an extra partition which stores a local copy of the image of
the W2K partition.
A normal boot from harddisk defaults to W2K, except when an
administrator chooses to boot linux (provided the password), to perform
some maintenance tasks (updating images, ..)
All workstations are equiped with a bootrom. De boot sequence of a
workstations is network, harddisk. CDROM and floppy boot are disabled in
the password protected BIOS-setup.
The image server is also a dhcp+bootp-server, in which workstations -
identified by networkcard MAC-address - can be selectively enabled to
boot from network. When network booted, an automatic restore is
performed: the network booted linux system finishes init by a script
that first checks if the local image is identical to the image stored on
the server (using MD5-SUMS), if the local image needs to be updated, the
local image is rsynced with the server image, and the up to date local
image is copied to the W2K partition. The script finishes up by
disabling the network boot entry in the bootp-server en shutting down
the workstation.
The next time the workstations starts, it's in sync with the image on
the imageserver.
I'm currently tweaking this setup for performance and do some
fine-tuning; also have to deal with domain members that share images;
...
But currently, the system is stable and is a great help in maintaining a
lot of workstations.
Regards,
Lieven
On Fri, 2002-10-25 at 17:08, Dianne Marie Montesa wrote:
hi lieven
if the workstations have same configurations like
make/model, hard disk, memory, etc ... you can install
linux on one system only, then 'dd' the hard disk to
the other disks. well you will have to collect the
hard disks from all the workstations though.
just adding to your ideas
dianne
--- Lieven Van Acker <[EMAIL PROTECTED]> wrote:
Hi,
is there a way to create an iso9660 equivalent of
the network.img
bootable install disk?
We have quite a number of workstations to install in
our school, but a
lot of floppydrives suffer from wear.
This is how I want to rollout:
0. Create a bootable CD from network install floppy
image
1. Install from network from a bootable CD
containing the network
install image.
2. Generate an autoinstall floppy
3. Generate a second iso image containing
auto-install info
4. Use the second CD to automate installation on
other workstations.
The only question remaining is how to convert a
bootable floppy image to
a bootable cd image.
Any ideas?
Thanks,
Lieven
Want to buy your Pack or Services fromMandrakeSoft?Go to http://www.mandrakestore.com__________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ ----Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
------------------------------------------------------------------------
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
-- Bryan Whitehead SysAdmin - JPL - Interferometry Systems and Technology Phone: 818 354 2903 [EMAIL PROTECTED]
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
