Objectives
Upon completion of this unit, you should be able to:
1) Know important command line swithes
2) Understand different installation methods
3) Create advanced partition layouts
4) Understand Kickstart’s role
5) Create Kickstart files
Anaconda, the Red Hat Enterprise Linux Installer
1) supports different modes
- Kickstart offers automated installation
- Upgrade performs an update of an existing Red Hat Enterprise Linux installation
- Rescue mode allows troubleshooting of unbootable systems
2) Consists of two stages
- First stage starts the installation
- Second stage performs the installation
First Stage: Starting the Installation
1) The first stage consists of a installation kernel and an initrd.img
2) Can be started with any supported boot loader
3) Tasks of the First Stage:
- Initializes the Installer
- Parses command line arguments
- Autodetects hardware
- Loads additional drivers
- Select language, keyboard layout and installtion method
- Sets up networking if required for installation
First Stage: Boot Media
1) Supported boot media:
- boot.iso or Installation CD/DVD
- USB driver containing bootimg.img
- Network boot with PXE
- Other bootloader such as GRUB
- Boot floppies no longer supported
2) Boot media can be modified for custom installations
Accessing the Installer
1) Graphical Installation
- Default installation type
- Useful switches: lowers, resolution, skipddc
2) VNC based Installation
- Activate with vnc and protect the session with vncpassword=password
- Set network parameters with ip=IP Address and netmask=Network Mask
3) Text based Installation
- Started with the text switch
- Menu-based terminal interface
4) Serial Installation
- Used automatically when no graphic card is detected
- Enable with: serial=device
First Stage: Installation Method
1) Available Installation Methods:
- Local CDROM
- Hard Drive
- NFS p_w_picpath
- FTP
- HTTP
2) Media sets:
- Two sets available: Client and server
- Can be downloaed from Red Hat Network
- May contain packages from additional layered products
- An “Installation Key” must be entered to unlock additional content
- Extra packages can also be installed after installation through RHN
Network Installation Server
1) Necessary for network-based installs
2) Often faster than CDROM-based installation methods
3) Provides an easy distribution platform for the enterprise
4) Shares the RedHat directory via NFS, FTP and/or HTTP
5) Can be used as a yum repository
Second Stage: Installtion Overview
1) Language and keyboard selection
2) Installation Key
3) Disk partitioning
4) Bootloader configuration
5) Network and time zone configuration
6) Package selection
Configuring File Systems
1) Must select mount points, partion sizes, and file system types in the installer
- can set up manually or automatically
2) There are many layouts which may be used
- / must include /etc, /lib, /bin, /sbin
- Swap space is typically 2x physical RAM
- Typical mount points: /boot, /home/, /usr, /var, /tmp, /usr/local, /opt
Advanced Partioning
1) Software RAID
- Create new partitions and select software RAID as “filesystem” type
- Combine RAID partitions into a RAID device with RAID
2) LVM
- Select physical volumes to create physical volumes
- LVM creates a volume group
- Add creates new logical volumes
Package Selection
1) A default set of packages is automatically installed
2) Select Customize now to change the default set of packages
3) Customizing is necessary to add support for additional languages
4) Anaconda automatically resolves package dependencies
5) Package set can easily customized after install with yum or system-config-packages
First Boot: Post-Install Configuration
1) Configure X Window System if necessary
2) Firewall and SELinux setup
3) Kdump setup
4) Set date and time
5) Register with Red Hat Network and get updated RPMs
6) Setup users
7) Configure sound card
8) Install additional RPMs or Red Hat documentation from CDROM
Kickstart
1) Scripted Installation method
2) Supports all Anaconda features
3) /root/anaconda-ks.cfg is automatically created during Install
4) Configuration utility: system-config-kickstart
5) Syntax-checker: ksvalidator
Starting a Kickstart Installation
1) Anaconda enters Kickstart mode, when the ks boot option is specified
2) ks queries DHCP for the kickstart location
3) ks=url gets the file via http, ftp or NFS
4) From a local media: ks=floppy, ks=cdrom, or ks=hd:device:/path/to/file
Anatomy of a kickstart file
1) Commands section
- Configure the system
- Omitted directive are prompted to the user
2) %packages Section
- Select packages and groups for installation
- Dependcies are always resolved
3) Scripts section(s)
- Optional section to customize the system
- %pre scripts are run before installation
- %post scripts are run after installation
Kickstart: Commands Section – Starting the Installation
1) Installation Mode
- install performs a fresh install
- upgrade upgrades an existing installation
2) Installation Method
cdrom
url –url url
nfs –server host –path directory
harddrive --partition=device --dir=/path/to/install_tree
Kickstart: Commands section – Important Directives
1) Required Directives
- Must be specified, otherwise the installer configures them interactively
- Localization option: keyboard, lang, timezone
- Authentication: rootpw, authconfig
- Bootloader: bootloader
2) Optional Directives
- Network: network [options]
- Security: firewall, selinux, services
- Installer behaviour: firstboot, poweroff | reboot, interactive, text
Kickstart: Package Section
1) Add single packages with package_name without any version number
2) Add package groups with @package_group
3) Remove packages from the list: –package_name
4) Use wildcards to specify multiple packages
5) Depencies are always resolved
6) Add support for additional languages with @lang-support
7) Packages from layered products can be installed when an installation key in specified by with the key directive in the command section
Kickstart: %pre, %post
1) %pre gives you the first word
- executes as a bash shell script
- executes after kickstart file is parsed
2) %post gives you the final word
- Can specify interpreter (bash is default)
- chrooted by default, but may be run without chroot
End of Unit 9
1) Questions and Answers.
2) Summary
- Steps of the installation
- Important Anaconda swithes
- system-config-kickstart
- ksvalidator