Carsten Aulbert wrote: > maybe I'm a bit rusty in my FAI knowledge and it's hidden somewhere in > the wiki and I have not found it. > > What are the standard procedures to ensure that I can FAIify an existing > machine, i.e. to make sure the exact packages will be installed? > > Simple idea would be to query dpkg and put all those packages into the > class, but that looks awkward: > > dpkg --get-selections |grep -v deinstall | awk '{print $1;}' > packages
in many cases, you can also exclude stuff starting lib*, cause the actual aplications you use will pull the libs they need automatically. > Are there better (not too manual) ways to do it? Take the changelog of packages you installed on that machine and manual changes ypou did sinc e the base install, (which every responsible admin has ;) ) and put these into the right classes? O.K., that's a bit provocative, but the motto of FAI is: "Plan your installation, and FAI installs your plan." If you don't have a correct plan, but a system, that's grown "historically" and you never did any logging of what exactly you did with the system since the first base install, then you have two ways: You can either do what you proposed (and copy the complete /etc) - this will make sure no single package and config will be missing, and you have the same config. But you have everything in one single class. That's not a proper plan, that's more a config backup. The other way is create the installation plan for your system: Go through the list of installed packages and config options of the services used, and assign each package to the classes you create (e.g. for each single function of a system, you have a class, like WEBSERVER, LDAP-AUTHENTIFICATION, MAILSERVER, stuff like that. This must be done manually, always: no machine can tell you, to which class which package should belong, and which config change belongs to which class. This is hard work, and you will probably need many test installs, and test if the services run as you want, but starting to make a decent FAI config for the system will increase your knowledge about it a lot, and you have it documented very well. Henning BTW: once you have this, you can start writing a changelog for your systems (and log apt installs, and changes in /etc ) or, if your disciplined, you stop making changes manually, but only with fai softupdates!