Autoyast Guide Autoyast Guide Opensuse Leap 15.3
Total Page:16
File Type:pdf, Size:1020Kb
openSUSE Leap 15.3 AutoYaST Guide AutoYaST Guide openSUSE Leap 15.3 AutoYaST is a system for unattended mass deployment of openSUSE Leap systems. It uses an AutoYaST prole that contains installation and conguration data. The book guides you through the basic steps of auto-installation: preparation, installation, and conguration. Publication Date: June 22, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents Preface ix 1 Available documentation ix 2 Improving the documentation ix 3 Documentation conventions x 1 Introduction to AutoYaST 1 1.1 Motivation 1 1.2 Overview and concept 1 I UNDERSTANDING AND CREATING THE AUTOYAST CONTROL FILE 3 2 The AutoYaST control file 4 2.1 Introduction 4 2.2 Format 4 2.3 Structure 5 Resources and properties 6 • Nested resources 6 • Attributes 7 3 Creating an AutoYaST control file 9 3.1 Collecting information 9 3.2 Using the configuration management system (CMS) 9 Creating a new control file 10 3.3 Creating/editing a control file manually 11 3.4 Creating a control file via script with XSLT 12 3.5 Checking a control file 14 Basic checks 14 • Running pre-scripts 15 • Importing the profile 15 iii AutoYaST Guide II AUTOYAST CONFIGURATION EXAMPLES 16 4 Configuration and installation options 17 4.1 General options 17 The mode section 18 • Configuring the installation settings screen 22 • The self-update section 22 • The semi-automatic section 24 • The signature handling section 24 • The wait section 26 • Examples for the general section 27 4.2 Reporting 29 4.3 The boot loader 30 Loader type 31 • Globals 32 • Device map 35 4.4 Partitioning 36 Automatic partitioning 36 • Guided partitioning 36 • Expert partitioning 38 • Advanced partitioning features 51 • Logical volume manager (LVM) 56 • Software RAID 58 • Multipath support 63 • bcache configuration 64 • Multi-device Btrfs configuration 67 • NFS configuration 68 • tmpfs configuration 69 4.5 iSCSI initiator overview 69 4.6 Fibre channel over Ethernet configuration (FCoE) 71 4.7 Country settings 72 4.8 Software 73 Package selection with patterns and packages sections 73 • Deploying images 74 • Installing additional/customized packages or products 74 • Kernel packages 79 • Removing automatically selected packages 80 • Installing recommended packages/ patterns 80 • Installing packages in stage 2 81 • Installing patterns in stage 2 81 • Online update in stage 2 81 4.9 Upgrade 82 4.10 Services and targets 83 iv AutoYaST Guide 4.11 Network configuration 84 Configuration Workflow 84 • The Network Resource 85 • Interfaces 88 • Persistent names of network interfaces 92 • Domain name system 93 • Routing 94 • s390 options 94 4.12 Proxy 95 4.13 NIS client and server 96 4.14 NIS server 96 4.15 Hosts definition 99 4.16 Windows domain membership 99 4.17 Samba server 100 4.18 Authentication client 102 4.19 NFS client and server 102 4.20 NTP client 103 4.21 Mail server configuration 105 4.22 Apache HTTP server configuration 106 4.23 Squid server 115 4.24 FTP server 122 4.25 TFTP server 126 4.26 Firstboot workflow 126 4.27 Security settings 126 Password settings options 127 • Boot settings 128 • Login settings 128 • New user settings (useradd settings) 128 • SELinux settings 128 4.28 Linux audit framework (LAF) 128 4.29 Users and groups 130 Users 130 • User defaults 135 • Groups 136 • Login settings 137 v AutoYaST Guide 4.30 Custom user scripts 138 Pre-install scripts 138 • Post-partitioning scripts 139 • Chroot environment scripts 140 • Post-install scripts 140 • Init scripts 140 • Script XML representation 142 • Script example 145 4.31 System variables (sysconfig) 147 4.32 Adding complete configurations 147 4.33 Ask the user for values during installation 149 Default value scripts 154 • Scripts 155 4.34 Kernel dumps 159 Memory reservation 160 • Dump saving 162 • E-mail notification 164 • Kdump kernel settings 165 • Expert settings 166 4.35 DNS server 167 4.36 DHCP server 169 4.37 Firewall configuration 172 General firewall configuration 173 • Firewall zones configuration 174 • Installation stages when the firewalld profile is applied 175 • A full example 176 4.38 Miscellaneous hardware and system components 177 Printer 177 • Sound devices 178 4.39 Importing SSH keys and configuration 179 4.40 Configuration management 180 Connecting to a configuration management server 180 • Running in stand- alone mode 182 • SUSE Manager Salt formulas support 183 vi AutoYaST Guide III MANAGING MASS INSTALLATIONS WITH DYNAMIC PROFILES 184 5 Supported approaches to dynamic profiles 185 6 Rules and classes 186 6.1 Rule-based automatic installation 186 Rules file explained 187 • Custom rules 190 • Match types for rules 190 • Combine attributes 191 • Rules file structure 191 • Predefined system attributes 192 • Rules with dialogs 194 6.2 Classes 197 6.3 Mixing rules and classes 199 6.4 Merging of rules and classes 199 7 ERB templates 202 7.1 What is ERB? 202 7.2 Template helpers 202 disks 202 • network_cards 203 • os_release 204 8 Combining ERB templates and scripts 206 8.1 Embedding ERB in your scripts 206 8.2 Accessing ERB helpers from Ruby scripts 206 IV UNDERSTANDING THE AUTO-INSTALLATION PROCESS 208 9 The auto-installation process 209 9.1 Introduction 209 X11 interface (graphical) 209 • Serial console 209 • Text-based YaST installation 209 9.2 Choosing the right boot medium 210 Booting from a flash disk (for example, a USB stick) 210 • Booting from the SUSE Linux Enterprise installation medium 211 • Booting via PXE over the network 211 vii AutoYaST Guide 9.3 Invoking the auto-installation process 212 Command line options 212 • Auto-installing a single system 218 • Combining the linuxrc info file with the AutoYaST control file 219 9.4 System configuration 219 Post-install and system configuration 220 • System customization 220 V USES FOR AUTOYAST ON INSTALLED SYSTEMS 221 10 Running AutoYaST in an installed system 222 VI APPENDIXES 224 A Handling rules 225 B AutoYaST FAQ—frequently asked questions 226 C Advanced linuxrc options 230 C.1 Passing parameters to linuxrc 230 C.2 info file format 231 C.3 Advanced network setup 233 D GNU licenses 235 viii AutoYaST Guide Preface 1 Available documentation Online documentation The online documentation for this product is available at http://doc.opensuse.org/ . Browse or download the documentation in various formats. Note: Latest updates The latest documentation updates are usually available in the English version of the documentation. In your system For oine use, nd documentation in your installed system under /usr/share/doc . Many commands are also described in detail in their manual pages. To view them, run man , followed by a specic command name. If the man command is not installed on your system, install it with sudo zypper install man . 2 Improving the documentation Your feedback and contributions to this documentation are welcome! Several channels are available: Bug reports Report issues with the documentation at https://bugzilla.opensuse.org/ . To simplify this process, you can use the Report Documentation Bug links next to headlines in the HTML version of this document. These preselect the right product and category in Bugzilla and add a link to the current section. You can start typing your bug report right away. A Bugzilla account is required. Contributions To contribute to this documentation, use the Edit Source links next to headlines in the HTML version of this document. They take you to the source code on GitHub, where you can open a pull request. A GitHub account is required. ix Available documentation openSUSE Leap 15.3 For more information about the documentation environment used for this documentation, see the repository's README (https://github.com/SUSE/doc-sle/blob/master/ README.adoc) . Mail Alternatively, you can report errors and send feedback concerning the documentation to [email protected] . Make sure to include the document title, the product version and the publication date of the documentation. Refer to the relevant section number and title (or include the URL) and provide a concise description of the problem. Help If you need further help on openSUSE Leap, see https://en.opensuse.org/Portal:Support . 3 Documentation conventions The following notices and typographical conventions are used in this documentation: /etc/passwd : directory names and le names PLACEHOLDER : replace PLACEHOLDER with the actual value PATH : the environment variable PATH ls , --help : commands, options, and parameters user : users or groups package name : name of a package Alt , Alt – F1 : a key to press or a key combination; keys are shown in uppercase as on a keyboard File, File Save As: menu items, buttons Dancing Penguins (Chapter Penguins, ↑Another Manual): This is a reference to a chapter in another manual. Commands that must be run with root privileges. Often you can also prex these commands with the sudo command to run them as non-privileged user.