hoki
Usage
hoki
Description
This is a "hands off" kickstart installer for Red Hat Linux-like
systems. I've most recently used it for installing Fedora Core
1 on a roomful of PCs.
By "hands off," I mean: to install a new version of the operating
system you don't need to physically touch the machine at all. You just
run this script. No
floppy insertion, no CD insertion. No magic with PXE/TFTP/DHCP is
involved. About the only assumptions (I think) are that the target machine
is running some sort of Linux with grub as the boot loader, and
that there's some reliable network installation tree out there
for the kickstart to use. And the script uses curl to download
things from our webserver, so that needs to be installed.
The overall idea is to
-
copy the vmlinuz and initrd files from the
installation media the target system's hard disk (in our case, these
are downloaded from our server by the script);
-
generate and install a kickstart configuration file into the initrd
image;
-
modify the boot loader to boot from this vmlinuz/initrd combination
and use the kickstart configuration file;
-
reboot the system and wait.
Notes:
- This isn't a Red Hat-supported method. All I can
say is: works great for me, could break horribly for you.
- It's probably necessary to have a network installation tree
available beforehand. This isn't hard, and is adequately
documented in the Red Hat site. In this particular case,
we run a HTTP-based installation from okoboji.unh.edu.
If you adapt this script, you'll want to change that of course.
-
This particular script does a complete wipe of the system
and reinstallation, but this is just a function of the
kickstart configuration file. I've also used this method
to do a hands-off upgrade, for example.
- In our case, even though we're doing a from-scratch install,
we want to maintain the target machine's SSH
"identity" and its online login records.
So the script saves and restores the
target system's ssh host key files and wtmp file.
The save is done in the kickstart configuration file's
%pre section; the restoration is done in the %post
section. This is of course not super reliable. If the power
fails during an install, these files would be lost.
-
Considerable gymnastics are done in the script to come up
with various system parameters: device path for the root
partition, networking parameters, etc. There may be better
ways to do any or all of these things.
- Our kickstart configuration file also downloads and
runs a customization script in the %post section;
this does a lot of local stuff: installing missing packages,
different login and splash screens, replacing some commands
with our own, printer configuration, TeX configuration, etc.
Acknowledgement
This method was inspired by
this page.
Source
Back to
Hacks
Last modified: January 11 2004 12:08 EST
Paul A. Sand,
pas@unh.edu