Mithilfe von Kickstart-Installationen kann der Installationsvorgang gänzlich oder teilweise automatisiert werden. Kickstart-Dateien enthalten Antworten auf alle Fragen, die normalerweise vom Installationsprogramm gestellt werden, beispielsweise welche Zeitzone für das System eingestellt werden soll, wie die Festplatten partitioniert werden sollen und welche Pakete installiert werden sollen. Eine derart vorbereitete Kickstart-Datei ermöglicht es dem Installationsprogramm sogar, die Installation automatisch und ohne Benutzereingriff durchzuführen.
Beschreibung | Externer Link |
---|---|
RedHat Dokumentation | Chapter 23. Kickstart Installations |
Ab hier werden zur Ausführung nachfolgender Befehle root
-Rechte benötigt. Um der Benutzer root
zu werden, melden Sie sich bitte als root
-Benutzer am System an, oder wechseln mit nachfolgendem Befehl zum Benutzer root
:
$ su - Password:
Bei der Kickstart-Datei handelt es sich um eine einfache Textdatei. Sie enthält die im Kickstart-Syntax definierten Parameter als Schlüsselwörter, die als Anweisungen für die Installation dienen.
Bei der Erstellung einer Kickstart-Datei, kann z.B. als Vorlage eine Datei in nachfolgendem Verzeichnis mit ebenfalls nachfolgendem Namen
/root/anaconda-ks.cfg
welche von einem herkömmlich installierten System stammt, verwendet werden.
Nachfolgende Informationen sind zu beachten, wenn eine Kickstart-Datei erstellt wird.
%packages
folgt zuerst.%pre
und %post
können in jeder beliebigen Reihenfolge angeordnet werden, sind nicht unbedingt erforderlich.%packages
, %pre
und %post
, müssen mit %end
beendet werden, andernfalls wird das Installationsprogramm die Kickstart-Datei ablehnen.#
(Rautezeichen).
Damit nach dem Erstellen oder Anpassen einer Kickstart-Datei, deren Gültigkeit überprüft werden kann bevor sie für eine Installation eingesetzt wird, ist es empfehlenswert nachfolgende zusätzliches rpm
-Paket zu installieren, um eine Überprüfung durchführen zu können.
Mit nachfolgendem Befehl, werden die benötigten Pakete installiert:
# yum install pykickstart Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package pykickstart.noarch 0:1.99.43.10-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: pykickstart noarch 1.99.43.10-1.el7 base 384 k Transaction Summary ================================================================================ Install 1 Package Total download size: 384 k Installed size: 1.6 M Is this ok [y/d/N]: y Downloading packages: pykickstart-1.99.43.10-1.el7.noarch.rpm | 384 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : pykickstart-1.99.43.10-1.el7.noarch 1/1 Verifying : pykickstart-1.99.43.10-1.el7.noarch 1/1 Installed: pykickstart.noarch 0:1.99.43.10-1.el7 Complete!
Mit nachfolgendem Befehl kann überprüft werden, welcher Inhalt mit dem Paket installiert wurde.
Paket pykickstart:
# rpm -qil pykickstart Name : pykickstart Version : 1.99.43.10 Release : 1.el7 Architecture: noarch Install Date: Mon 15 Sep 2014 02:42:09 PM CEST Group : System Environment/Libraries Size : 1674818 License : GPLv2 Signature : RSA/SHA256, Fri 04 Jul 2014 06:37:04 AM CEST, Key ID 24c6a8a7f4a80eb5 Source RPM : pykickstart-1.99.43.10-1.el7.src.rpm Build Date : Tue 10 Jun 2014 07:36:22 AM CEST Build Host : worker1.bsys.centos.org Relocations : (not relocatable) Packager : CentOS BuildSystem <http://bugs.centos.org> Vendor : CentOS URL : http://fedoraproject.org/wiki/pykickstart Summary : A python library for manipulating kickstart files Description : The pykickstart package is a python library for manipulating kickstart files. /usr/bin/ksflatten /usr/bin/ksshell /usr/bin/ksvalidator /usr/bin/ksverdiff /usr/lib/python2.7/site-packages/pykickstart /usr/lib/python2.7/site-packages/pykickstart-1.99.43.10-py2.7.egg-info /usr/lib/python2.7/site-packages/pykickstart/__init__.py /usr/lib/python2.7/site-packages/pykickstart/__init__.pyc /usr/lib/python2.7/site-packages/pykickstart/__init__.pyo /usr/lib/python2.7/site-packages/pykickstart/base.py /usr/lib/python2.7/site-packages/pykickstart/base.pyc /usr/lib/python2.7/site-packages/pykickstart/base.pyo /usr/lib/python2.7/site-packages/pykickstart/commands /usr/lib/python2.7/site-packages/pykickstart/commands/__init__.py /usr/lib/python2.7/site-packages/pykickstart/commands/__init__.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/__init__.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/authconfig.py /usr/lib/python2.7/site-packages/pykickstart/commands/authconfig.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/authconfig.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/autopart.py /usr/lib/python2.7/site-packages/pykickstart/commands/autopart.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/autopart.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/autostep.py /usr/lib/python2.7/site-packages/pykickstart/commands/autostep.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/autostep.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/bootloader.py /usr/lib/python2.7/site-packages/pykickstart/commands/bootloader.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/bootloader.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/btrfs.py /usr/lib/python2.7/site-packages/pykickstart/commands/btrfs.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/btrfs.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/cdrom.py /usr/lib/python2.7/site-packages/pykickstart/commands/cdrom.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/cdrom.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/clearpart.py /usr/lib/python2.7/site-packages/pykickstart/commands/clearpart.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/clearpart.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/device.py /usr/lib/python2.7/site-packages/pykickstart/commands/device.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/device.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/deviceprobe.py /usr/lib/python2.7/site-packages/pykickstart/commands/deviceprobe.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/deviceprobe.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/displaymode.py /usr/lib/python2.7/site-packages/pykickstart/commands/displaymode.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/displaymode.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/dmraid.py /usr/lib/python2.7/site-packages/pykickstart/commands/dmraid.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/dmraid.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/driverdisk.py /usr/lib/python2.7/site-packages/pykickstart/commands/driverdisk.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/driverdisk.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/eula.py /usr/lib/python2.7/site-packages/pykickstart/commands/eula.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/eula.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/fcoe.py /usr/lib/python2.7/site-packages/pykickstart/commands/fcoe.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/fcoe.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/firewall.py /usr/lib/python2.7/site-packages/pykickstart/commands/firewall.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/firewall.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/firstboot.py /usr/lib/python2.7/site-packages/pykickstart/commands/firstboot.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/firstboot.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/group.py /usr/lib/python2.7/site-packages/pykickstart/commands/group.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/group.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/harddrive.py /usr/lib/python2.7/site-packages/pykickstart/commands/harddrive.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/harddrive.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/ignoredisk.py /usr/lib/python2.7/site-packages/pykickstart/commands/ignoredisk.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/ignoredisk.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/interactive.py /usr/lib/python2.7/site-packages/pykickstart/commands/interactive.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/interactive.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/iscsi.py /usr/lib/python2.7/site-packages/pykickstart/commands/iscsi.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/iscsi.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/iscsiname.py /usr/lib/python2.7/site-packages/pykickstart/commands/iscsiname.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/iscsiname.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/key.py /usr/lib/python2.7/site-packages/pykickstart/commands/key.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/key.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/keyboard.py /usr/lib/python2.7/site-packages/pykickstart/commands/keyboard.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/keyboard.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/lang.py /usr/lib/python2.7/site-packages/pykickstart/commands/lang.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/lang.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/langsupport.py /usr/lib/python2.7/site-packages/pykickstart/commands/langsupport.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/langsupport.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/lilocheck.py /usr/lib/python2.7/site-packages/pykickstart/commands/lilocheck.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/lilocheck.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/liveimg.py /usr/lib/python2.7/site-packages/pykickstart/commands/liveimg.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/liveimg.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/logging.py /usr/lib/python2.7/site-packages/pykickstart/commands/logging.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/logging.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/logvol.py /usr/lib/python2.7/site-packages/pykickstart/commands/logvol.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/logvol.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/mediacheck.py /usr/lib/python2.7/site-packages/pykickstart/commands/mediacheck.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/mediacheck.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/method.py /usr/lib/python2.7/site-packages/pykickstart/commands/method.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/method.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/monitor.py /usr/lib/python2.7/site-packages/pykickstart/commands/monitor.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/monitor.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/mouse.py /usr/lib/python2.7/site-packages/pykickstart/commands/mouse.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/mouse.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/multipath.py /usr/lib/python2.7/site-packages/pykickstart/commands/multipath.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/multipath.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/network.py /usr/lib/python2.7/site-packages/pykickstart/commands/network.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/network.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/nfs.py /usr/lib/python2.7/site-packages/pykickstart/commands/nfs.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/nfs.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/partition.py /usr/lib/python2.7/site-packages/pykickstart/commands/partition.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/partition.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/raid.py /usr/lib/python2.7/site-packages/pykickstart/commands/raid.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/raid.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/realm.py /usr/lib/python2.7/site-packages/pykickstart/commands/realm.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/realm.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/reboot.py /usr/lib/python2.7/site-packages/pykickstart/commands/reboot.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/reboot.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/repo.py /usr/lib/python2.7/site-packages/pykickstart/commands/repo.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/repo.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/rescue.py /usr/lib/python2.7/site-packages/pykickstart/commands/rescue.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/rescue.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/rootpw.py /usr/lib/python2.7/site-packages/pykickstart/commands/rootpw.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/rootpw.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/selinux.py /usr/lib/python2.7/site-packages/pykickstart/commands/selinux.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/selinux.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/services.py /usr/lib/python2.7/site-packages/pykickstart/commands/services.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/services.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/skipx.py /usr/lib/python2.7/site-packages/pykickstart/commands/skipx.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/skipx.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/sshpw.py /usr/lib/python2.7/site-packages/pykickstart/commands/sshpw.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/sshpw.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/timezone.py /usr/lib/python2.7/site-packages/pykickstart/commands/timezone.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/timezone.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/unsupported_hardware.py /usr/lib/python2.7/site-packages/pykickstart/commands/unsupported_hardware.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/unsupported_hardware.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/updates.py /usr/lib/python2.7/site-packages/pykickstart/commands/updates.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/updates.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/upgrade.py /usr/lib/python2.7/site-packages/pykickstart/commands/upgrade.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/upgrade.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/url.py /usr/lib/python2.7/site-packages/pykickstart/commands/url.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/url.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/user.py /usr/lib/python2.7/site-packages/pykickstart/commands/user.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/user.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/vnc.py /usr/lib/python2.7/site-packages/pykickstart/commands/vnc.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/vnc.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/volgroup.py /usr/lib/python2.7/site-packages/pykickstart/commands/volgroup.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/volgroup.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/xconfig.py /usr/lib/python2.7/site-packages/pykickstart/commands/xconfig.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/xconfig.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/zerombr.py /usr/lib/python2.7/site-packages/pykickstart/commands/zerombr.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/zerombr.pyo /usr/lib/python2.7/site-packages/pykickstart/commands/zfcp.py /usr/lib/python2.7/site-packages/pykickstart/commands/zfcp.pyc /usr/lib/python2.7/site-packages/pykickstart/commands/zfcp.pyo /usr/lib/python2.7/site-packages/pykickstart/constants.py /usr/lib/python2.7/site-packages/pykickstart/constants.pyc /usr/lib/python2.7/site-packages/pykickstart/constants.pyo /usr/lib/python2.7/site-packages/pykickstart/errors.py /usr/lib/python2.7/site-packages/pykickstart/errors.pyc /usr/lib/python2.7/site-packages/pykickstart/errors.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers /usr/lib/python2.7/site-packages/pykickstart/handlers/__init__.py /usr/lib/python2.7/site-packages/pykickstart/handlers/__init__.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/__init__.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/control.py /usr/lib/python2.7/site-packages/pykickstart/handlers/control.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/control.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f10.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f10.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f10.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f11.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f11.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f11.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f12.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f12.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f12.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f13.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f13.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f13.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f14.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f14.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f14.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f15.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f15.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f15.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f16.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f16.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f16.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f17.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f17.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f17.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f18.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f18.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f18.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f19.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f19.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f19.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f20.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f20.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f20.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f7.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f7.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f7.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f8.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f8.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f8.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/f9.py /usr/lib/python2.7/site-packages/pykickstart/handlers/f9.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/f9.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/fc3.py /usr/lib/python2.7/site-packages/pykickstart/handlers/fc3.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/fc3.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/fc4.py /usr/lib/python2.7/site-packages/pykickstart/handlers/fc4.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/fc4.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/fc5.py /usr/lib/python2.7/site-packages/pykickstart/handlers/fc5.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/fc5.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/fc6.py /usr/lib/python2.7/site-packages/pykickstart/handlers/fc6.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/fc6.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel3.py /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel3.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel3.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel4.py /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel4.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel4.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel5.py /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel5.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel5.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel6.py /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel6.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel6.pyo /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel7.py /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel7.pyc /usr/lib/python2.7/site-packages/pykickstart/handlers/rhel7.pyo /usr/lib/python2.7/site-packages/pykickstart/ko.py /usr/lib/python2.7/site-packages/pykickstart/ko.pyc /usr/lib/python2.7/site-packages/pykickstart/ko.pyo /usr/lib/python2.7/site-packages/pykickstart/options.py /usr/lib/python2.7/site-packages/pykickstart/options.pyc /usr/lib/python2.7/site-packages/pykickstart/options.pyo /usr/lib/python2.7/site-packages/pykickstart/parser.py /usr/lib/python2.7/site-packages/pykickstart/parser.pyc /usr/lib/python2.7/site-packages/pykickstart/parser.pyo /usr/lib/python2.7/site-packages/pykickstart/sections.py /usr/lib/python2.7/site-packages/pykickstart/sections.pyc /usr/lib/python2.7/site-packages/pykickstart/sections.pyo /usr/lib/python2.7/site-packages/pykickstart/version.py /usr/lib/python2.7/site-packages/pykickstart/version.pyc /usr/lib/python2.7/site-packages/pykickstart/version.pyo /usr/share/doc/pykickstart-1.99.43.10 /usr/share/doc/pykickstart-1.99.43.10/COPYING /usr/share/doc/pykickstart-1.99.43.10/ChangeLog /usr/share/doc/pykickstart-1.99.43.10/README /usr/share/doc/pykickstart-1.99.43.10/kickstart-docs.txt /usr/share/doc/pykickstart-1.99.43.10/programmers-guide /usr/share/locale/af/LC_MESSAGES/pykickstart.mo /usr/share/locale/af_ZA/LC_MESSAGES/pykickstart.mo /usr/share/locale/aln/LC_MESSAGES/pykickstart.mo /usr/share/locale/am/LC_MESSAGES/pykickstart.mo /usr/share/locale/ar/LC_MESSAGES/pykickstart.mo /usr/share/locale/as/LC_MESSAGES/pykickstart.mo /usr/share/locale/ast/LC_MESSAGES/pykickstart.mo /usr/share/locale/az/LC_MESSAGES/pykickstart.mo /usr/share/locale/bal/LC_MESSAGES/pykickstart.mo /usr/share/locale/be/LC_MESSAGES/pykickstart.mo /usr/share/locale/bg/LC_MESSAGES/pykickstart.mo /usr/share/locale/bn/LC_MESSAGES/pykickstart.mo /usr/share/locale/bn_IN/LC_MESSAGES/pykickstart.mo /usr/share/locale/bo/LC_MESSAGES/pykickstart.mo /usr/share/locale/br/LC_MESSAGES/pykickstart.mo /usr/share/locale/brx/LC_MESSAGES/pykickstart.mo /usr/share/locale/bs/LC_MESSAGES/pykickstart.mo /usr/share/locale/ca/LC_MESSAGES/pykickstart.mo /usr/share/locale/cs/LC_MESSAGES/pykickstart.mo /usr/share/locale/cs_CZ/LC_MESSAGES/pykickstart.mo /usr/share/locale/cy/LC_MESSAGES/pykickstart.mo /usr/share/locale/da/LC_MESSAGES/pykickstart.mo /usr/share/locale/de/LC_MESSAGES/pykickstart.mo /usr/share/locale/de_CH/LC_MESSAGES/pykickstart.mo /usr/share/locale/dz/LC_MESSAGES/pykickstart.mo /usr/share/locale/el/LC_MESSAGES/pykickstart.mo /usr/share/locale/en_GB/LC_MESSAGES/pykickstart.mo /usr/share/locale/en_US/LC_MESSAGES/pykickstart.mo /usr/share/locale/eo/LC_MESSAGES/pykickstart.mo /usr/share/locale/es/LC_MESSAGES/pykickstart.mo /usr/share/locale/es_ES/LC_MESSAGES/pykickstart.mo /usr/share/locale/et/LC_MESSAGES/pykickstart.mo /usr/share/locale/eu/LC_MESSAGES/pykickstart.mo /usr/share/locale/eu_ES/LC_MESSAGES/pykickstart.mo /usr/share/locale/fa/LC_MESSAGES/pykickstart.mo /usr/share/locale/fa_IR/LC_MESSAGES/pykickstart.mo /usr/share/locale/fi/LC_MESSAGES/pykickstart.mo /usr/share/locale/fr/LC_MESSAGES/pykickstart.mo /usr/share/locale/ga/LC_MESSAGES/pykickstart.mo /usr/share/locale/gl/LC_MESSAGES/pykickstart.mo /usr/share/locale/gu/LC_MESSAGES/pykickstart.mo /usr/share/locale/he/LC_MESSAGES/pykickstart.mo /usr/share/locale/hi/LC_MESSAGES/pykickstart.mo /usr/share/locale/hr/LC_MESSAGES/pykickstart.mo /usr/share/locale/hr_HR/LC_MESSAGES/pykickstart.mo /usr/share/locale/hu/LC_MESSAGES/pykickstart.mo /usr/share/locale/hy/LC_MESSAGES/pykickstart.mo /usr/share/locale/ia/LC_MESSAGES/pykickstart.mo /usr/share/locale/id/LC_MESSAGES/pykickstart.mo /usr/share/locale/ilo/LC_MESSAGES/pykickstart.mo /usr/share/locale/is/LC_MESSAGES/pykickstart.mo /usr/share/locale/it/LC_MESSAGES/pykickstart.mo /usr/share/locale/it_IT/LC_MESSAGES/pykickstart.mo /usr/share/locale/ja/LC_MESSAGES/pykickstart.mo /usr/share/locale/ja_JP/LC_MESSAGES/pykickstart.mo /usr/share/locale/ka/LC_MESSAGES/pykickstart.mo /usr/share/locale/kk/LC_MESSAGES/pykickstart.mo /usr/share/locale/km/LC_MESSAGES/pykickstart.mo /usr/share/locale/kn/LC_MESSAGES/pykickstart.mo /usr/share/locale/ko/LC_MESSAGES/pykickstart.mo /usr/share/locale/ks/LC_MESSAGES/pykickstart.mo /usr/share/locale/ku/LC_MESSAGES/pykickstart.mo /usr/share/locale/ky/LC_MESSAGES/pykickstart.mo /usr/share/locale/la/LC_MESSAGES/pykickstart.mo /usr/share/locale/lo/LC_MESSAGES/pykickstart.mo /usr/share/locale/lt/LC_MESSAGES/pykickstart.mo /usr/share/locale/lv/LC_MESSAGES/pykickstart.mo /usr/share/locale/mai/LC_MESSAGES/pykickstart.mo /usr/share/locale/mg/LC_MESSAGES/pykickstart.mo /usr/share/locale/mk/LC_MESSAGES/pykickstart.mo /usr/share/locale/ml/LC_MESSAGES/pykickstart.mo /usr/share/locale/mn/LC_MESSAGES/pykickstart.mo /usr/share/locale/mr/LC_MESSAGES/pykickstart.mo /usr/share/locale/ms/LC_MESSAGES/pykickstart.mo /usr/share/locale/ms_MY/LC_MESSAGES/pykickstart.mo /usr/share/locale/my/LC_MESSAGES/pykickstart.mo /usr/share/locale/nb/LC_MESSAGES/pykickstart.mo /usr/share/locale/nds/LC_MESSAGES/pykickstart.mo /usr/share/locale/ne/LC_MESSAGES/pykickstart.mo /usr/share/locale/nl/LC_MESSAGES/pykickstart.mo /usr/share/locale/nn/LC_MESSAGES/pykickstart.mo /usr/share/locale/no/LC_MESSAGES/pykickstart.mo /usr/share/locale/nso/LC_MESSAGES/pykickstart.mo /usr/share/locale/or/LC_MESSAGES/pykickstart.mo /usr/share/locale/pa/LC_MESSAGES/pykickstart.mo /usr/share/locale/pl/LC_MESSAGES/pykickstart.mo /usr/share/locale/pt/LC_MESSAGES/pykickstart.mo /usr/share/locale/pt_BR/LC_MESSAGES/pykickstart.mo /usr/share/locale/ro/LC_MESSAGES/pykickstart.mo /usr/share/locale/ru/LC_MESSAGES/pykickstart.mo /usr/share/locale/ru_RU/LC_MESSAGES/pykickstart.mo /usr/share/locale/si/LC_MESSAGES/pykickstart.mo /usr/share/locale/sk/LC_MESSAGES/pykickstart.mo /usr/share/locale/sl/LC_MESSAGES/pykickstart.mo /usr/share/locale/sq/LC_MESSAGES/pykickstart.mo /usr/share/locale/sr/LC_MESSAGES/pykickstart.mo /usr/share/locale/sr@latin/LC_MESSAGES/pykickstart.mo /usr/share/locale/sv/LC_MESSAGES/pykickstart.mo /usr/share/locale/ta/LC_MESSAGES/pykickstart.mo /usr/share/locale/ta_IN/LC_MESSAGES/pykickstart.mo /usr/share/locale/te/LC_MESSAGES/pykickstart.mo /usr/share/locale/tg/LC_MESSAGES/pykickstart.mo /usr/share/locale/th/LC_MESSAGES/pykickstart.mo /usr/share/locale/tl/LC_MESSAGES/pykickstart.mo /usr/share/locale/tr/LC_MESSAGES/pykickstart.mo /usr/share/locale/uk/LC_MESSAGES/pykickstart.mo /usr/share/locale/uk_UA/LC_MESSAGES/pykickstart.mo /usr/share/locale/ur/LC_MESSAGES/pykickstart.mo /usr/share/locale/vi/LC_MESSAGES/pykickstart.mo /usr/share/locale/wo/LC_MESSAGES/pykickstart.mo /usr/share/locale/xh/LC_MESSAGES/pykickstart.mo /usr/share/locale/zh_CN/LC_MESSAGES/pykickstart.mo /usr/share/locale/zh_HK/LC_MESSAGES/pykickstart.mo /usr/share/locale/zh_TW/LC_MESSAGES/pykickstart.mo /usr/share/locale/zu/LC_MESSAGES/pykickstart.mo /usr/share/man/man1/ksflatten.1.gz /usr/share/man/man1/ksshell.1.gz /usr/share/man/man1/ksvalidator.1.gz /usr/share/man/man1/ksverdiff.1.gz
Nachfolgende werden die aktuellen Befehle/Optionen aufgelistet. Die Auflistung erfolgt nach
Beschreibung | Externer Link |
---|---|
RedHat Dokumentation | 23.3.2. Kickstart Commands and Options |
Nachfolgende werden die aktuellen Befehle/Optionen aufgelistet. Die Auflistung erfolgt nach
(erforderlich)
(erforderlich)
(erforderlich)
(erforderlich)
(erforderlich)
password
-Arguments fest. (erforderlich)
timezone
fest.Nachfolgende werden die aktuellen Befehle/Optionen aufgelistet. Die Auflistung erfolgt nach
authconfig
können die Authentifizierungsoptionen für das System festgelegt werden. device
, weist das Installationsprogramm zur Installation zusätzlicher Module an.rpm
-Paket initial-setup
muss installiert sein, um diese Option aktivieren zu können. shutdown -h
. iscsi
verwenden, müssen Sie dem iSCSI-Knoten mithilfe des Befehls iscsiname
zudem einen Namen zuweisen. Der Befehl iscsiname
muss in der Kickstart-Datei vor dem Befehl iscsi
stehen!shutdown -p
.shutdown -r
. yum
-Repositorys, die als Quelle für Paketinstallationen verwendet werden können.systemd
-Ziel laufen.shutdown
. sshpw
zur Erstellung temporärer Benutzerkonten, über die die Anmeldung erfolgt. %include /path/to/file
, um die Inhalte einer anderen Datei in die Kickstart-Datei einzubeziehen, als seien diese direkt an der Stelle des Befehls %include
in der Kickstart-Datei enthalten.
Der Befehl/Abschnitt %packages
wird in der Kickstart-Datei verwendet, um die Paketauswahl zu beginnen, in dem die zu installierenden Softwarepakete beschrieben werden.
Es können Pakete anhand ihrer Umgebung, Gruppe oder anhand ihrer Paketnamen angeben werden.
WICHTIG - Der Abschnitt %packages
muss mit dem Befehl %end
abschließen!
Beschreibung | Externer Link |
---|---|
RedHat Dokumentation | 23.3.3. Package Selection |
Um die Installation einer ganzen Umgebung zu installieren, kann nachfolgende Konfiguration durchgeführt werden:
(Nur relevanter Ausschnitt):
%packages @^Minimal Install %end
Um die Installation einer Gruppe von rpm
-Paketen zu installieren, kann nachfolgende Konfiguration durchgeführt werden:
(Nur relevanter Ausschnitt):
%packages @X Window System @Fonts %end
Ebenso, kann auch ein Ausschluss einer Gruppe von rpm
-Paketen, mit nachfolgende Konfiguration durchgeführt werden:
(Nur relevanter Ausschnitt):
%packages -@Graphical Internet %end
Um die Installation eines rpm
-Pakets durchzuführen, kann nachfolgende Konfiguration genutzt werden:
(Nur relevanter Ausschnitt):
%packages vim man %end
Ebenso, kann auch ein Ausschluss eines rpm
-Pakets, mit nachfolgende Konfiguration durchgeführt werden:
(Nur relevanter Ausschnitt):
%packages -man -selinux-policy* %end
Es können Befehle zur Kickstart-Datei hinzufügt werden, die auf dem System unmittelbar nach der Analyse der Kickstart-Datei ausgeführt werden, jedoch noch vor Beginn der Installation.
WICHTIG - Dieser Abschnitt muss am Ende der Kickstart-Datei nach den Kickstart-Syntax beschriebenen Befehlen/Optionen eingefügt werden und muss mit %pre beginnen und mit %end abschließen.
HINWEIS - Falls die Kickstart-Datei auch den Abschnitt %post enthält, so ist die Reihenfolge der Abschnitt %pre und %post unerheblich.
HINWEIS - Es kann im Abschnitt %pre auf das Netzwerk zugegriffen werden; allerdings ist der Namensdienst an diesem Punkt noch nicht konfiguriert, so dass nur IP-Adressen funktionieren.
Beschreibung | Externer Link |
---|---|
RedHat Dokumentation | 23.3.4. Pre-installation Script |
Ein Beispiel für eine Definition eines %pre-Abschnittes, kann wie nachfolgend dargestellt aussehen:
(Nur relevanter Ausschnitt):
... %pre #!/bin/bash ... ... ... %end ...
Es können Befehle hinzufügen, die auf dem System ausgeführt werden, nachdem die Installation abgeschlossen wurde, jedoch bevor das System zum ersten Mal neu gestartet wird.
Dieser Abschnitt ist hilfreich für Aufgaben wie die Installation zusätzlicher Software oder die Konfiguration eines zusätzlichen Nameservers.
WICHTIG - Dieser Abschnitt muss am Ende der Kickstart-Datei nach den Kickstart-Syntax beschriebenen Befehlen/Optionen eingefügt werden und muss mit %post beginnen und mit %end abschließen.
HINWEIS - Falls die Kickstart-Datei auch den Abschnitt %pre enthält, so ist die Reihenfolge der Abschnitt %pre und %post unerheblich.
HINWEIS - Das Post-Installationsskript wird in einer chroot
-Umgebung ausgeführt, weshalb Aufgaben wie das Kopieren von Skripten oder rpm
-Paketen vom Installationsdatenträger nicht ohne Weiteres funktionieren. Sie können dieses Verhalten mithilfe der Option
–nochroot
ändern!
Beschreibung | Externer Link |
---|---|
RedHat Dokumentation | 23.3.5. Post-installation Script |
Ein Beispiel für eine Definition eines %post-Abschnittes, kann wie nachfolgend dargestellt aussehen:
(Nur relevanter Ausschnitt):
... %post #!/bin/bash cat <<ISSUENET >/etc/issue.net ############################################################################ # # # This is a private home server. # # # # Unauthorized access to this system is prohibited ! # # # # This system is actively monitored and all connections may be logged. # # By accessing this system, you consent to this monitoring. # # # ############################################################################ ISSUENET %end
Nachfolgende Konfigurationsdatei stellt eine Kickstart-Datei dar, welche die - erforderlichen - optionalen Einträge enthält.
############################################################################## # Kickstart install commands and options # ############################################################################## # +--------------------------------------------------------------------------+ # | Required Section | # +--------------------------------------------------------------------------+ # Install the boot loader into the master boot record (mbr) on first device. bootloader --location=mbr # Set the keyboard layout to de (nodeadkeys). keyboard --vckeymap=de --xlayouts='de (nodeadkeys)' # Set the system langauge to en_US.UTF-8 lang en_US.UTF-8 # Partitioning of the storage will not automatically accomplished! # part # Set the root password in encrypted form with following command variants: # 1. python -c 'import crypt; print(crypt.crypt("My Password", "$6$My Salt"))' # 2. grub-crypt --sha-512 rootpw --iscrypted $6$7UJE5kaQFcZRX1Vw$B71Kiw4ZhqOAnqE8.E2SN1.9ZXWItCKjXliBNaNTBDMiWWPgRt2ifJ6eQ9fsWJIw10BL/Qy3aQEkSxahGitvQ. # Set the system timezone to Europe/Berlin in UTC and specify no time servers. timezone Europe/Berlin --utc --nontp # +--------------------------------------------------------------------------+ # | Optional Section | # +--------------------------------------------------------------------------+ # Set system authorization information to /etc/shadow and SHA-512 algorithm. auth --enableshadow --passalgo=sha512 # Set partition clearing information to all devices and init standard types. clearpart --all --initlabel # Set the End User License Agreement (EULA) to aggreed, if required. eula --agreed # Set the firewall to disabled. firewall --disabled # Do not run the Setup Agent on first boot. firstboot --disabled # Create a new user group with name: klaus and group id: 1000. group --name=klaus --gid=1000 # Set the installation mode to graphical. graphical # Set the storage installation into interactive mode. ignoredisk --interactive # Install OS instead of upgrade, using NFS installation media. install nfs --server=10.0.0.40 --dir=/repository/centos/7.0.1406/os/x86_64 # Set logging level to info during the installation. logging --level=info # Set the network device eth0. network --device eth0 --bootproto=static --onboot=on --ip 192.168.0.10 --netmask 255.255.255.0 --gateway 192.168.0.1 --nameserver 192.168.0.1,192.168.0.20 --noipv6 --hostname rechner10.dmz.tachtler.net # Reboot after installation was finished. reboot # Embed updates while installation process. repo --name=installupdates --baseurl=http://installserver.tachtler.net/centos/7.0.1406/updates/x86_64/ # Set selinux to disabled. selinux --disabled # Enable and disable services from systemd after installation. services --disabled=bluetooth,kdump,firewalld --enabled=iptables # Create a new user with name: klaus and user id: 1000 and other paramaters. # 1. python -c 'import crypt; print(crypt.crypt("My Password", "$6$My Salt"))' # 2. grub-crypt --sha-512 --name=klaus --gecos="Klaus Tachtler" --homedir=/home/klaus --password=$6$Bs82qa82x4vi3v8w$YTUtkeQ9eguhKm52.yWmTzKnIBIjb4FwGrqjvJpsKdyQLampzKi2yDC1Q9qsAsMKttjfg0xjvkERf6/t.LOPya --iscrypted --shell/bin/bash --uid=1000 --gid=1000 # Delete all partition table entrys on devices. zerombr ############################################################################## # Include or Exclude package groups and packages # ############################################################################## %packages @core acpid bind-utils chrony iptables-services man net-tools telnet unzip vim wget xinetd yum-plugin-changelog yum-plugin-priorities %end ############################################################################## # Pre install commands and options # ############################################################################## %pre #!/bin/bash %end ############################################################################## # Post install commands and options # ############################################################################## %post --log=/root/anaconda-post.log #!/bin/bash %end
Alle Erklärungen der einzelnen Parameter stehen als Kommentar über dem jeweiligen Kommando bzw. der jeweiligen Option.
HINWEIS - Eine Besonderheit stellt jedoch die Hinterlegung der Passwörter für das
rootpw
unduser
dar.
Hierbei können zwei Varianten zur Generierung eines verschlüsselten Passwort verwendet werden.
Variante 1:
Nachfolgender Befehl generiert ein verschlüsseltes Passwort unter Zuhilfenahme der Programmierspreche python
und der direkten Ausgabe auf der shell
, was wie nachfolgend durchgeführt werden kann:
# python -c 'import crypt; print(crypt.crypt("My Password", "$6$My Salt"))' $6$My Salt$62hFKyGczP7lROpqCRmyw4GOtOYRWSRh2oUMAwJbhJMWSmFlLsby0WEiezGjfJ06xw8x19c4gmdmGoTyL5LkF.
Variante 2:
Nachfolgender Befehl generiert ein verschlüsseltes Passwort unter Zuhilfenahme des Befehls grub-crypt –sha-512
, welcher zur Eingabe eines Passwortes und zur Eingabe einer Passwortwiederholung auffordert und anschließend das generierte Passwort ebenfalls auf der shell
ausgibt, wie nachfolgender Aufruf zeigt:
# grub-crypt --sha-512 Password: Retype password: $6$UCTF/Mlu3QxBWSOC$g0myUt95Bf/06SojJz8kqX4DAZEf1aBvSAT7pl6tIFbI.l1BBBYhb2oVZQ.hU9E1/..MTYhNZla3HNOp7Kal.1
Nachfolgendes Beispiel zeigt, wie die Paketauswahl der während der Installation zu installierenden Pakete erstellt werden kann. Hierbei soll
@core
installiert werden.
(Nur relevanter Ausschnitt)
############################################################################## # Include or Exclude package groups and packages # ############################################################################## %packages @core acpid bind-utils chrony iptables-services man net-tools telnet unzip vim wget xinetd yum-plugin-changelog yum-plugin-priorities %end ...
Mit nachfolgender Konfiguration, kann dynamisch ermittelt werden, wie viele Netzwerkkarten auf dem Server vorhanden sind, um diese mit entsprechenden Parameter zur Laufzeit der Installation in eine Datei zu schreiben um dann die Datei Anstelle der Konfiguration im Abschnitt network… einzusetzen, wie nachfolgende Konfigurationsbeispiele zeigen:
(Nur relevanter Ausschnitt)
... # Set the network device eth0. # network --device eth0 --bootproto=static --onboot=on --ip 192.168.0.10 --netmask 255.255.255.0 --gateway 192.168.0.1 --nameserver 192.168.0.1,192.168.0.20 --noipv6 --hostname rechner10.dmz.tachtler.net # Set the network device as include file, generated in %pre. Additional changes will be made later. %include /tmp/anaconda-network.cfg ...
(Nur relevanter Ausschnitt)
... ############################################################################## # Pre install commands and options # ############################################################################## #!/bin/bash # Determine how much network devices are availiable and generate the kickstart definition 'network=...' from them. DEVICES=`cat /proc/net/dev | sed 's/:.*//g' | grep eth | sed 's/^\ *//'` for DEV in $DEVICES do echo "network --device ${DEV} --bootproto=static --onboot=on --ip 10.0.${DEV:3}.99 --netmask 255.255.255.0 --gateway 10.0.${DEV:3}.10 --nameserver 10.0.${DEV:3}.20,10.0.${DEV:3}.10 --noipv6 --hostname rechnerxx.tachtler.net" >> /tmp/anaconda-network.cfg done %end ...
Nachfolgendes Beispiel zeigt, wie mit Hilfe von bash
-Skripten die Konfiguration von GRUB 2 entsprechend angepasst werden kann, damit beim Starten eine Bildschirmauflösung von 1024×768 beim „booten“ beibehalten wird.
Dazu passt das bash
-Skript die Konfigurationsdateien
/etc/default/grub
an und/boot/grub2/grub.cfg
wird durch Umwandlung dieser mit dem entsprechenden Befehl, neu generiert.
... ############################################################################## # Post install commands and options # ############################################################################## %post --log=/root/anaconda-post.log #!/bin/bash # Source function library. . /etc/init.d/functions # Source variable declarations. VAR_DATE=$(date +"%Y-%m-%d") VAR_HOST=$(hostname -s) echo "+-------------------------------------------------------------------------+" echo "| GRUB2 |" echo "+-------------------------------------------------------------------------+" # Source variable declarations. FILE_GRUB="/etc/default/grub" FILE_GRUB2_CFG="/boot/grub2/grub.cfg" echo -n "Copy $FILE_GRUB to $FILE_GRUB.orig" cp -a $FILE_GRUB{,.orig} if [ "$?" != "0" ]; then failure; echo else success; echo fi cat <<ETCDEFAULTGRUB >>$FILE_GRUB # Tachtler: $VAR_DATE GRUB_CMDLINE_LINUX_DEFAULT="video=1024x768" GRUB_GFXMODE=1024x768 GRUB_GFXPAYLOAD_LINUX=keep ETCDEFAULTGRUB sed -i '/^GRUB_DISABLE_SUBMENU=true/ a# default: GRUB_TERMINAL_OUTPUT="console"' $FILE_GRUB sed -i '/^GRUB_DISABLE_SUBMENU=true/ a# Tachtler' $FILE_GRUB sed -i 's/^GRUB_TERMINAL_OUTPUT="console"/# GRUB_TERMINAL_OUTPUT="console"/' $FILE_GRUB sed -i 's/GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="net.ifnames=0 /' $FILE_GRUB sed -i 's/rhgb //g' $FILE_GRUB echo -n $"Configured $FILE_GRUB" success; echo echo -n "Copy $FILE_GRUB2_CFG to $FILE_GRUB2_CFG.orig" cp -a $FILE_GRUB2_CFG{,.orig} if [ "$?" != "0" ]; then failure; echo else success; echo fi grub2-mkconfig -o /boot/grub2/grub.cfg echo -n $"Generated file $FILE_GRUB2_CFG" success; echo %end
Die Angabe neben dem Befehl %post
, welche da lautet
–log=/root/anaconda-post.log
erstellt eine Log-Datei im Verzeichnis /root
mit dem Namen anaconda-post.log
, worin Informationen zur Ausführung protokolliert werden können und ggf. Fehler die durch Ausführung der Befehle zustande kommen, ersichtlich werden.