3 Options for Installation
This chapter describes some of the options you have for installing Oracle Linux 7.
Installation Boot Options
You can specify options for an installation by editing the boot command line, for example to specify the network settings. You access the boot command line by selecting an installation option in the boot menu and then pressing either the E key (UEFI-based systems) or the Tab key (BIOS-based systems). A prompt is displayed, which enables you to edit the boot options that are already defined and add your own options.
Note:
On BIOS-based systems, you can press the Esc key instead of the
E key to display the boot:
prompt, which does
not contain any predefined boot options. You must enter
linux
to load the predefined boot options
before appending with your own options.
When you edit the boot command line, separate each boot option
with a space. Some options have parameters, which must be
specified with the
option=parameter
syntax.
To discard your changes and return to the boot menu, press Esc. To start the installation using the customized boot options, press either Ctrl+X (UEFI-based systems) or Return (BIOS-based systems).
In the following example, boot options are used to specify that the installation should use the full installation ISO image stored on an NFS share, that the installation should be automated using a kickstart file stored on an NFS share, and that the network interfaces should be configured using DHCP:
inst.repo=nfs:nfs.example.com:/ISOs/OL7/full_image.iso \ inst.ks=nfs:nfs.example.com:/kickstart/OL7/server-ks.cfg ip=dhcp
For a list of the available boot options, see the following:
-
Installation program boot options: https://rhinstaller.github.io/anaconda/boot-options.html.
-
Dracut kernel command line options: see the
dracut.cmdline(7)
manual page.
Note:
If you are upgrading from a previous release, check the above
documentation for removed and deprecated boot options. Starting
with the Oracle Linux 7 release, an inst.
prefix has
been added to the installation program boot options, but the
prefix is currently not enforced.
The following are some of the most commonly used boot options:
Boot Options for Specifying the Installation Type
-
inst.graphical
-
Specifies a graphical-based installation.
-
inst.text
-
Specifies a text-based installation, see Text-Based Installations.
Boot Options for Specifying the Installation Source
-
inst.repo=cdrom[:device]
-
Specifies a CD or DVD drive as the location that contains everything needed to install the software.
The installation program searches all the system's CD or DVD drives, unless a
device
is specified.If access to a network is required and no network boot options are specified, the installation program enables DHCP on all available network devices.
-
inst.repo=ftp://user : password@FTP_server/path
-
Specifies an FTP server as the location that contains everything needed to install the software.
If access to a network is required and no network boot options are specified, the installation program enables DHCP on all available network devices.
-
inst.repo=hd:device:path
-
Specifies a local disk as the location that contains everything needed to install the software.
You can specify the
device
by its device name (sdb2
), label (LABEL=label
), or UUID (UUID=uuid
). -
inst.repo=[http:|https:]//HTTP_server/path
-
Specifies a web server as the location that contains everything needed to install the software. If your system has access to the Internet, you can use the base repository on the Oracle Linux yum server for the Oracle Linux release that you are installing. For example, you could set this value to
https://yum.oracle.com/repo/OracleLinux/OL7/6/base/x86_64
-
inst.repo=nfs:[options:]NFS_server:path
-
Specifies an NFS share as the location that contains everything needed to install the software.
Use
options
to specify a comma-separated list of NFS mount options.The NFS share can be the path to an ISO image or a directory.
-
inst.stage2=[installation_source]
-
Specifies the location to fetch the installer runtime image; packages are ignored. If this option is not specified,
inst.repo
is used instead. The path specified for installation_source can match any of the protocol and path options used forinst.repo
.The directory path specified for the installation_source should contain a valid
.treeinfo
file that specifies the location of the runtime image. If a.treeinfo
file is not present at the source, the installer usesLiveOS/squashfs.img
as the default location at the specified source.Note that when specifying a remote runtime image using the
inst.stage2
option while performing a network boot using the Unbreakable Enterprise Kernel boot and installation ISO, you must use the same ISO for the installation repository. Do not attempt to use the standard Oracle Linux 7 ISO image for x86_64 (64 bit) as the installation repository when using the runtime image from the Oracle Linux 7 UEK Boot ISO image for x86_64 (64 bit) .
Boot Options for Configuring the Network
-
ip=[interface:]dhcp|dhcp6|auto6|ibft
-
Specifies a network automatic configuration method. If
interface
is not specified, all interfaces are configured. Useibft
to use the MAC address of the interface specified by the iSCSI Boot Firmware Table (iBFT) in the system BIOS or firmware. -
ip=ip::gateway:netmask:hostname:interface:none
-
Specifies a static IP configuration for
interface
. Enclose IPv6 addresses in square brackets, for example[2509:f0d0:1001::0004]
. -
nameserver=IP
-
Specifies the IP address of a DNS server to use during installation. Multiple
nameserver
options can be used. -
bootdev=interface
-
Specifies the primary network interface. Required if you use more than one
ip
option. -
inst.dhcpclass
-
Specifies a vendor class identifier to DHCP.
Boot Options for Kickstart Installations
-
inst.ks=cdrom[:device]/path
-
Specifies a kickstart file on a CD or DVD drive.
-
inst.ks=ftp://user : password@FTP_server/path
-
Specifies a kickstart file on an FTP server.
-
inst.ks=hd:device:path
-
Specifies a kickstart file a local disk.
You can specify the
device
by its device name (sdb2
), label (LABEL=label
) or UUID (UUID=uuid
). -
inst.ks=[http:|https:]//HTTP_server/path
-
Specifies a kickstart file on a web server.
-
inst.ks=nfs:[options:]NFS_server:path
-
Specifies a kickstart file on an NFS share.
Use
options
to specify a comma-separated list of NFS mount options.
Boot Options for Remote Installations
-
inst.vnc
-
Enables remote graphical-based installation by starting a VNC server.
A VNC client can connect by using a command such as vncviewer server:port , where server is the IP address of the system being installed.
After installation, the system starts in text mode even if a graphical desktop environment is selected as the base environment.
-
inst.vncconnect=client[:port]
-
Specifies the VNC client and optional port that is listening for connections from a VNC server (vncviewer -listen). The default port is 5900.
-
inst.vncpassword=password
-
Specifies the password for client connections using VNC.
Miscellaneous Boot Options
-
inst.keymap=layout
-
Specifies the keyboard layout for installation.
-
inst.lang=language
-
Specifies the language for installation.
-
loglevel=level
-
Specifies the logging level for installation:
critical
,debug
,error
,info
, orwarning
. The default level isinfo
.
Automated Installation Using Kickstart
This section describes how you can use kickstart to automate the installation of Oracle Linux.
Creating a Kickstart File
A kickstart configuration file contains all the information that
kickstart requires to perform an automated installation. Every
Oracle Linux installation creates a kickstart file,
/root/anaconda-ks.cfg
. You can use this file
to repeat an installation, or you can customize the settings in
this file for different system configurations. The file is also
useful for troubleshooting a boot-time problem with an installed
system.
The following sections describe the structure of a kickstart
file and demonstrate some of the available configuration
options. Documentation for kickstart is included in the
pykickstart
package and can be found at
/usr/share/doc/pykickstart-version/kickstart-docs.rst
.
If you are upgrading from a previous Oracle Linux release, use the
ksverdiff command (included in the
pykickstart
package) to check for removed and
deprecated kickstart options. Starting with Oracle Linux 7, network
interface device names have changed and are now based on
information that is derived from the system BIOS, from a
device's firmware, system path, or MAC address.
When you have prepared a kickstart configuration file, use the
ksvalidator utility, which is included in the
pykickstart
package, to check that the syntax
of the file is correct.
Installation Options Section
The first part of a kickstart file defines the installation options and their associated values, and it defines how to configure the system storage, for example:
#platform=x86, AMD64, or Intel EM64T #version=DEVEL # Firewall configuration firewall --enabled --service=ssh # Install OS instead of upgrade install # Use CDROM installation media cdrom # System authorization information auth --useshadow --passalgo=sha512 # Root password rootpw --iscrypted SHA512_password_hash # Use graphical install graphical firstboot --disable # System keyboard keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 # SELinux configuration selinux --enforcing # Installation logging level logging --level=info # System timezone timezone America/Los_Angeles # Network information network --bootproto=dhcp --device=em1 --onboot=yes --hostname=hostname # System bootloader configuration bootloader --append="rhgb crashkernel=auto quiet" --location=mbr --driveorder="sda" # Non-administrative user user --name=user --homedir=/home/user --password=SHA512_password_hash --iscrypted # Partition information clearpart --all --drives=sda part /boot --fstype=ext4 --size=500 part pv.008002 --grow --size=1 volgroup vg_hostname --pesize=4096 pv.008002 logvol / --fstype=ext4 --name=lv_root --vgname=vg_hostname --grow --size=1024 --maxsize=51200 logvol swap --name=lv_swap --vgname=vg_hostname --grow --size=2016 --maxsize=4032
Comments in the kickstart file begin with a
#
character.
PXE cannot bring up the network interface unless you include a line such as the following:
network --bootproto=dhcp --device=em1 --onboot=yes
Packages Section
The %packages
section defines the packages
to be installed on the system, for example:
%packages @base @core @desktop-debugging @dial-up @fonts @gnome-desktop @guest-agents @guest-desktop-agents @input-methods @internet-browser @multimedia @print-client @print-server @x11 mtools pax python-dmidecode oddjob wodim sgpio genisoimage device-mapper-persistent-data abrt-gui samba-winbind certmonger openldap-clients pam_krb5 krb5-workstation ldapjdk slapi-nis libXmu perl-DBD-SQLite perl-Mozilla-LDAP %end
Package group names start with a @
character. You can use the yum grouplist
command on an existing Oracle Linux server to display both the
installed package groups and the package groups that are
available to install.
Individual packages to be installed are named without the
@
prefix. The asterisk
(*
) wildcard character can be used to
specify multiple packages. If you specify a
-
character as a prefix to a package, the
package is not installed.
The %packages
keyword can take options, the
following are the most useful:
-
--ignoremissing
-
Installs the available packages without prompting about missing packages. By default, kickstart interrupts the installation and asks you whether you want to continue the installation.
-
--multilib
-
Sets the
multilib
policy in yum configuration toall
so that 32-bit packages can be installed on the system.
You can also use a package list that is available as a local file in kickstart's ramdisk file system or that is accessible on an HTTP server, for example:
%packages --ignoremissing %include /tmp/package-list %end
Pre-installation Configuration Section
The %pre
section defines any actions that
kickstart must perform before installation. This section is
optional.
For example, the following %pre
section
runs the script config-partitions
that is
stored on an HTTP server and downloads a list of packages for
use with a %include /tmp/package-list
statement in the %packages
section.
%pre %include http://192.168.1.100/scripts/config-partitions wget -q -O- http://192.168.1.100/scripts/package-list > /tmp/package-list %end
In this example, the wget command saves the package list in kickstart's file system, which exists as a ramdisk in memory.
An included script or file must be accessible at the specified path or URL.
As the name service is not available before installation, you
must use IP addresses instead of domain names in the
%pre
section or in any script that it
includes.
Post-installation Configuration Section
The %post
section defines any actions that
kickstart must perform after installation. This section is
optional.
By default, kickstart runs post-installation tasks in a
chroot
environment that is based on the
root file system of the newly installed system. If you need to
access any files that are outside the
chroot
environment, specify the
--nochroot
option to
%post
. You can then access files in the
kickstart file system with the newly installed system's root
file system being mounted at /mnt/sysimage
.
For example, the following %post
section
runs the script /tmp/post-config
in
kickstart's file system:
%post --nochroot %include /tmp/post-config %end
If you configure the installed system's network interface to
obtain its settings using DHCP, you must either use IP
addresses instead of domain names or set up a temporary
resolv.conf
file, for example:
%post wget -q -O- http://192.168.1.100/scripts/resolv.conf > /etc/resolv.conf %include http://instsvr.mydom.com/scripts/post-config . . . %end
Using a Kickstart File to Install a System
A kickstart installation requires access to the full installation media which can be on a local CD-ROM drive, USB drive or hard drive, or on a network installation server that is accessible using HTTP or NFS.
To use a kickstart file to install a system:
-
Boot the system using local boot media.
-
Selecting an installation option in the boot menu and then press either the E key (UEFI-based systems) or the Tab key (BIOS-based systems) to access the boot prompt.
-
Use the
inst.ks
boot option to specify the location of the kickstart file.If the kickstart file is located on an NFS server, you might use a boot command such as the following:
ip=em1:dhcp inst.ks=nfs:192.168.1.100:/ksfiles/ks.cfg
where
ip=em1:dhcp
specifies that DHCP should be used to configure theem1
network interface.If access to a network is required and no network configuration is specified either on the boot prompt or in the kickstart configuration, the installation program enables DHCP on all available network devices.
If a system has multiple network interfaces, use the
bootdev
option to specify the interface to be used for installation, otherwise you will prompted to choose an interface.For PXE clients, it is usual to specify the kickstart parameters in the boot loader configuration. For more information, see:
For more information about boot options, see Installation Boot Options.
Text-Based Installations
The installation program can also run in text mode. Text mode is used automatically, for example, if the system has insufficient memory or the video card is not supported. Alternatively, you can explicitly request text mode using a boot option or a kickstart option. When a text-based installation is used, a menu of options is displayed similar to the graphical installation.
Text-Based Installation
The text-based installation menu does not include all of the configuration options available in graphical installations. In particular, you can only use automatic disk partitioning and select a base environment. If you want more control over the installation, you can perform a remote graphical installation using VNC (see Installation Boot Options) or use a kickstart file (see Automated Installation Using Kickstart). After installation, the system starts in text mode even if a graphical desktop is selected as the base environment.
Installing a System With a Btrfs root
File System
root
file system:
-
Begin the installation by booting the system from the installation media.
-
On the Installation Summary screen, select Installation Destination. The Installation Destination screen is displayed.
-
Select the local disks and add any Specialized & Network disks you want to use for the installation.
-
(Optional) Select Encrypt my data.
The encryption is applied to the block devices that contain the btrfs subvolumes and file systems.
-
Select I will configure partitioning and click Done. The Manual Partitioning screen is displayed.
-
(Optional) Free disk space by removing existing partitions.
On the left-hand side, select a mount point and click the - button to remove it. Changes to partitioning are not applied until you click Begin Installation on the Installation Summary screen.
-
Create the mount points.
From the partitioning scheme list, select BTRFS.
To create the default mount points automatically, click Click here to create them automatically. By default, automatic partitioning creates the following layout:
-
A 500 MiB, or 1 GiB if you are running Oracle Linux 7.3 or later, partition for an XFS file system that contains
/boot
. -
A 200 MiB EFI system partition mounted at
/boot/efi
(UEFI-based systems only). -
A
btrfs
subvolume that contains theroot
file system (/
). -
A
btrfs
subvolume that contains the/home
file system. -
A
swap
partition.
To create mount points manually, click the + button. As a minimum, create mount points for
/
,/boot
,/home
, andswap
. Theswap
and/boot
partitions cannot be configured as btrfs file systems.Figure 3-* shows the results after automatic btrfs partitioning.
Mount Points After Automatic Partitioning
-
-
Configure the btrfs root file system.
Select the
/
mount point and click Modify. The Configure Volume window is displayed, as shown in Figure 3-*.Configure Volume
Specify a name for the volume, select the disks to use, the RAID level, and the size policy.
If you select the Encrypt check box, this enables encryption for the block device that contains the root file system because btrfs does not support encryption at the file-system level. The same applies, if you enable encryption on a different btrfs subvolume such as
/home
. -
Click Save. The Configure Volume screen is closed. Click Update Settings to refresh the screen with your configuration changes.
-
Click Done. If you enabled encryption, you are prompted to enter an encryption passphrase.
-
Proceed with the rest of the installation.
Using a Driver Update Disk
A Driver Update Disk (DUD) provides a mechanism for delivering updated device drivers during system installation. On some systems, hardware may not be fully supported for an Oracle Linux release. In these cases, a DUD may be released at a later date, to facilitate installation on newer hardware.
DUDs can be released by Oracle and made available on the Oracle Software Delivery Cloud or through Oracle Support, as modules become available for previously unsupported hardware. The DUD is usually released in the form of an ISO.
During installation, the installer can load the updated device driver kernel modules from the DUD so that it can access the devices and install the required RPM packages on the target system. The RPM packages also contain alternate device drivers. This process allows the installation to proceed smoothly on systems with hardware that might not have been initially supported at the time of the Oracle Linux release.
Preparing to use a Driver Update Disk image
Attention:
Writing the DUD ISO to the wrong device may result in data loss. Check that you reference the correct device node when you copy the image. Use the lsblk utility to help you to identify the different disks block devices on your system.
Use the dd command line utility to transfer the DUD image to an alternate storage device:
# dd if=/path/to/DUD.iso of=/dev/sdX
Replace /path/to/DUD.iso with the path to access the DUD ISO file. Replace /dev/sdX with the device node that belongs to the storage media that you intend to use for the DUD. Typically, you might use a USB disk for this purpose.
Using the Driver Update Disk during installation
To use the DUD during an installation, boot from the standard Oracle Linux installation media as you normally would, but also attach the media that contains the DUD image before the installer starts. The installer should automatically recognize the DUD and use it. You might be prompted to select which drivers to install.
Note:
Some versions of BIOS may fail to identify the installation media when multiple USB storage devices are connected. Therefore, it is recommended that you insert the DUD USB media once the boot process started. For example, attach the disk while the system is at the GRUB boot prompt.
The kernel used by the installer, may not include support for USB 3.0. When using the DUD on USB media, ensure that you use a USB 2.0 compatible port when connecting the USB media to the system.
It is also possible to manually specify the location of the DUD
before the installer actually boots. This makes it possible to
host the ISO at an alternate location, such as a web server or
an NFS server, and helps to facilitate kickstart installations
where the DUD may be required. To specify the location of the
DUD manually, edit the boot parameters to include
inst.dd=location
,
where location is the URL or path to
the device where the DUD can be accessed.
To access the boot parameters in the boot menu when you are running the installation manually, press either the E key (UEFI-based systems) or the Tab key (BIOS-based systems). A prompt is displayed which enables you to edit the boot options already defined and add your own options. See Installation Boot Options for more information.
If you intend to use a DUD during a kickstart installation, use
the driverdisk
installation option in your
kickstart file to specify the location of the disk. For example,
to install from an attached block device, use the following:
driverdisk /dev/sdb1
Alternately, to install from a network location, use the
--source
switch:
driverdisk --source=http://www.example.com/dd.iso
The installer supports the use of HTTP, FTP and NFS as sources for network hosted DUD images.