How should I write an install script?
The Slackware installer works very well. However, if you want to install Slackware on several PCs it requires the same manual interaction for each system. Is there a guide on how to automate the install process? And is there an easy way to include such a script in the iso, so that it is directly available?
|
These characteristics are never part of the distributions
You must have IT skills in deployment and automation to perform such actions |
I don't know of any guide, but I have done this customization of Slackware. My steps have been:
regards Henrik |
It should not be that hard.
Everything that you need is to know how to configure a system manually. If you have configured parts of a system that you needed by using a text editor then you are probably ready. Here are some key points that you need to follow: * Custom initrd * Create a custom image * Boot up the installation image * Create partitions * Install packages * Configure the system Custom initrd: Creating an initrd could be the hard part for a beginner but do not be afraid. You only need to extract the contents of it, put what you want in it, and compress it again. Creating custom ISO: You put your custom initrd and your custom Slackware Tree and create and custom ISO from it. The instructions to create the iso are in a README in the isonlinux folder of the Slackware Tree. Creating partitions: I think you can create partitions by using fdisk without giving any input, just pass in a set of instructions from standard input. Installing packages: You can use installpkg and loop over the packages in order to install them, it is pretty easy, there is even a flag called --root. Configuring the system: Here is where a lot of work is done, or so little, it depends of the system's administrator. Setting up the hostname, network, service files (rc), users, locale, etc, certificates, etc. You can use only: fdisk, cp, echo, cat, and installpkg in order to set up an entire installation automatically. You just need to know about standard input and output in order to manipulate the necessary files and programs that you need for the installation. Because most of the things that you need to configure a Slackware system are just files. |
Quote:
Quote:
However, doing this kind of work takes time. If you are going to install less than 10 machines with your custom installation media you might save time by instead keeping a log of all the answers you are going to give during installation. regards Henrik |
Something missing in the original question and discussion is whether the "several PCs" means several identical PCs, or several each-is-different PCs.
If all PCs are identical, there are options of disk cloning followed by individual modification for specific systems. If the PCs are different, then changing hardware, changing drivers, etc. may mean the setup either has to be customized or has to be very generic. But as Henrik says, if "several" is a small number, it might be easier to bite the bullet and do it manually. https://xkcd.com/1445/ |
Quote:
Once an initial clone is up and running a few additional custom packages can be added for things like network configuration and graphics drivers. The drawback of a cloning strategy is that you will be rather lost the day you need to reinstall from scratch (how did I create that master clone X years ago?). You will also get an increasing number of patch packages that you will need to apply to all installations after the initial cloning has been done. Maybe you want to update your master clone every now and then, but then, are you really sure that your master clone is pristine? Sometimes you might want to do a reinstall from scratch to get to a well known status. regards Henrik |
All times are GMT -5. The time now is 04:04 PM. |