Oracle Linux Installation Guide For Release 7 PDF
Oracle Linux Installation Guide For Release 7 PDF
Oracle Linux Installation Guide For Release 7 PDF
E54695-10
January 2017
Oracle Legal Notices
Copyright 2014, 2017, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected
by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce,
translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them
to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then
the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware,
and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition
Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs,
including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license
terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for
use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware
in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its
safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous
applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are
trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or
registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third parties.
Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content,
products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not
be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set
forth in an applicable agreement between you and Oracle.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Abstract
This manual provides information about how to install and upgrade Oracle Linux 7 systems.
iii
iv
Preface
The Oracle Linux Installation Guide provides information about how to install and upgrade Oracle Linux 7
systems.
Audience
This document is intended for administrators who need to install and configure Oracle Linux 7. It
is assumed that readers are familiar with web technologies and have a general understanding of
administering the Linux operating system.
Document Organization
The document is organized as follows:
Chapter 1, Pre-installation Configuration describes the system requirements for Oracle Linux 7, how to
obtain the Oracle Linux 7 software, information that you require to install a system, and how to set up a
network installation server.
Chapter 2, Installing Oracle Linux Manually describes how to install Oracle Linux 7 manually from a boot
image that is available on a CD, DVD, USB memory stick, or hard drive. The packages used for the
installation can be available locally or hosted on a network installation server.
Chapter 3, Options for Installation describes some of the options you have for installing Oracle Linux 7
including the boot options that can be used to control the installation and how you can use Kickstart to
automate the installation of Oracle Linux.
Chapter 4, Upgrading an Oracle Linux System describes how you can upgrade from a previous Oracle
Linux release.
Chapter 5, Post-installation Configuration describes configuration changes that you might make to a
system after installation.
Chapter 6, Troubleshooting describes some options for troubleshooting Oracle Linux installations.
Related Documents
The documentation for this product is available at:
http://www.oracle.com/technetwork/server-storage/linux/documentation/index.html.
Conventions
The following text conventions are used in this document:
Convention Meaning
boldface Boldface type indicates graphical user interface elements associated with an
action, or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or placeholder variables for which
you supply particular values.
monospace Monospace type indicates commands within a paragraph, URLs, code in
examples, text that appears on the screen, or text that you enter.
v
vi
Chapter 1 Pre-installation Configuration
Table of Contents
1.1 System Requirements ................................................................................................................... 1
1.2 Obtaining and Preparing Installation Media .................................................................................... 1
1.2.1 Preparing CD or DVD Installation Media ............................................................................. 2
1.2.2 Preparing USB Installation Media ....................................................................................... 2
1.2.3 Extracting the Contents of the Full Installation ISO Image .................................................... 3
1.3 Configuring a Network Installation Server ...................................................................................... 3
1.3.1 Configuring an Existing NFS Server ................................................................................... 4
1.3.2 Configuring an Existing Apache HTTP Server ..................................................................... 5
1.3.3 Configuring DHCP and TFTP Services to Support PXE Clients ............................................ 6
1.3.4 Configuring Dnsmasq to Support PXE Clients ..................................................................... 9
1.3.5 Boot Loader Configuration for BIOS-Based PXE Clients .................................................... 13
1.3.6 Boot Loader Configuration for UEFI-Based PXE Clients ..................................................... 15
1.4 Planning an Installation ............................................................................................................... 16
This chapter describes the system requirements for Oracle Linux 7, how to obtain the software, how to set
up a network installation server, and some general guidelines to help prepare for an installation.
Oracle Linux 7 includes the Unbreakable Enterprise Kernel (UEK) and Red Hat Compatible Kernel
(RHCK). You should also check the release notes for the included UEK release for known issues.
Release note documents can be found in the Oracle Linux 7 documentation library at
http://docs.oracle.com/cd/E52668_01/index.html.
For details of x86-based servers certified with Oracle Linux with UEK, see the Hardware Certification List
for Oracle Linux and Oracle VM at http://linux.oracle.com/hardware-certifications.
You can download Oracle Linux installation media from the Oracle Software Delivery Cloud at
http://edelivery.oracle.com/linux. Once you have logged in, select the Linux/OVM/VMs check box, select
Oracle Linux as the Product and x86 64 bit as the Platform, and then click Continue to search. Select the
Media Pack for your Oracle Linux 7 release.
This ISO image contains everything needed to boot a system and install Oracle Linux.
1
Preparing CD or DVD Installation Media
This ISO image contains everything needed to boot a system and start an installation. However, to
complete the installation, you must specify the location of the packages, for example on a local disk
or an NFS share. The Red Hat Compatible Kernel (RHCK) is used during the installation. Both the
Unbreakable Enterprise Kernel (UEK) and the RHCK are installed. After installation, the system boots
the UEK kernel by default. For installations of releases prior to Oracle Linux 7 update 3, UEK Release 3
is used, but from Oracle Linux update 3 onward, the default kernel is UEK Release 4.
These ISO images contain the source code for the software packages in the release.
You can use the full installation ISO image or the boot ISO image to:
Create a bootable USB drive, see Section 1.2.2, Preparing USB Installation Media
The ISO images can be used in a virtual DVD-ROM drive to boot and install an Oracle VM or Oracle VM
VirtualBox virtual machine (guest).
You can use the full installation ISO image to prepare a network location, such as an NFS share or HTTP
server directory, for use during an installation. This is typically used when a boot image is used to start an
installation. See Section 1.3, Configuring a Network Installation Server.
After installation, you can obtain Oracle Linux packages from the Unbreakable Linux Network (ULN) and
the Oracle Public Yum server. For more information, see Chapter 5, Post-installation Configuration.
A recordable CD has enough storage capacity for the boot ISO image, but not for the full installation ISO
image.
To write an ISO image file to a CD or DVD, you can use a command such as cdrecord, for example:
You can use the cdrecord -scanbus command to display the SCSI subsystem and device that
corresponds to the CD or DVD writer.
To create a bootable USB drive, you can use the dd command, or a separate utility that can write an ISO
image to a USB drive. The following steps use the dd command.
Caution
2
Extracting the Contents of the Full Installation ISO Image
To avoid overwriting an existing hard disk partition, ensure that you specify the
correct device name for the USB drive. The following procedure assumes that the
USB drive is the /dev/sdb1 device, which might not be the case on your system.
If the operating system mounts any file systems on the device, unmount these file systems, for
example:
# df /media/USB
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 35346 35346 0 100% /media/USB
# umount /dev/sdb1
2. Use the dd command to write the contents of the ISO image file to the USB device.
# dd if=iso_file_name of=usb_device bs=bytes
For example:
# dd if=./full_image.iso of=/dev/sdb bs=512k
You can now remove the USB drive and use it to boot a system.
1. Mount the full installation ISO image on a suitable mount point, for example /mnt:
# mount -t iso9660 -o loop full_image.iso /mnt
Ensure that the command you use extracts the .treeinfo file at the root of the ISO image, for
example:
# cp -a -T mount_dir output_dir
For example, to extract the ISO image mounted on /mnt to an NFS share at /var/OSimage/OL7:
# cp -a -T /mnt /var/OSimage/OL7
For example, to extract the ISO image mounted on /mnt to a web server directory at /var/www/
html/OSimage/OL7:
# cp -a -T /mnt /var/www/html/OSimage/OL7
3
Configuring an Existing NFS Server
Instructions can be found in the Administrator's Guide for your Oracle Linux release:
If you want to support PXE client installation, configure the Dynamic Host Configuration Protocol
(DHCP) and Trivial File Transfer Protocol (TFTP) services. See Section 1.3.3, Configuring DHCP
and TFTP Services to Support PXE Clients or Section 1.3.4, Configuring Dnsmasq to Support PXE
Clients.
1. Create the directory you want to export as the NFS share, for example /var/OSimage/OL7:
# mkdir -p /var/OSimage/OL7
You can simply copy the full installation ISO image to the NFS share. The installation program is able to
detect that the installation source is the full installation ISO image and install from that file.
If you prefer, you can extract the contents of the full installation ISO image to the NFS share, see
Section 1.2.3, Extracting the Contents of the Full Installation ISO Image.
For example, to allow read-only access to the directory /var/OSimage/OL7 for any NFS client on the
192.168.1 subnet:
# exportfs -i -o ro 192.168.1.0/24:/var/OSimage/OL7
4
Configuring an Existing Apache HTTP Server
Alternatively, edit the /etc/exports configuration file and add an entry for the directory, for example:
/var/OSimage/OL7 192.168.1.0/24(ro)
Then use the exportfs -ra command to reload the NFS shares defined in the /etc/exports file.
1. Create the directory that will be used to store the contents of the full installation ISO image.
Create the directory under the DocumentRoot hierarchy that is defined in the HTTP server
configuration file (/etc/httpd/conf/httpd.conf), for example /var/www/html/OSimage/OL7.
# mkdir -p /var/www/html/OSimage/OL7
2. Extract the contents of the full installation ISO image to the HTTP directory.
See Section 1.2.3, Extracting the Contents of the Full Installation ISO Image.
3. Edit the HTTP server configuration file, /etc/httpd/conf/httpd.conf, and add a <Directory>
section.
For example:
<Directory "/var/www/html/OSimage/OL7">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
Place this section after the closing </Directory> statement for the <Directory DocumentRoot>
section.
The Indexes option is only required if you want to be able to browse the directory hierarchy, it is not
required for installation.
4. If SELinux is enabled in enforcing mode and you extracted the ISO image to a directory that is not
under /var/www/html, use the semanage and restorecon commands to restore the SELinux
security context on the extracted files.
The semanage and restorecon commands are provided by the policycoreutils-python and
policycoreutils packages.
a. Use the semanage command to define the default file type of the directory hierarchy as
httpd_sys_content_t:
# /usr/sbin/semanage fcontext -a -t httpd_sys_content_t "/var/OSimage(/.*)?"
b. Use the restorecon command to apply the file type to the entire directory hierarchy.
# /sbin/restorecon -R -v /var/OSimage
5
Configuring DHCP and TFTP Services to Support PXE Clients
The DHCP and TFTP servers do not have to host the installation packages, you can use a separate
network installation source. The TFTP server can define a network installation source from which a client
can obtain the installation packages.
To configure the DHCP service for PXE client installation requests:
2. Edit /etc/dhcp/dhcpd.conf and configure an entry for the PXE clients, for example:
set vendorclass = option vendor-class-identifier;
option pxe-system-type code 93 = unsigned integer 16;
set pxetype = option pxe-system-type;
host svr1 {
hardware ethernet 08:00:27:c6:a1:16;
fixed-address 10.0.0.253;
option host-name "svr1";
}
host svr2 {
hardware ethernet 08:00:27:24:0a:56;
fixed-address 10.0.0.254;
option host-name "svr2";
}
This example configures a pool of generally available IP addresses in the range 10.0.0.101 through
10.0.0.200 on the 10.0.0/24 subnet. Any PXE-booted system on the subnet uses the boot loader that
the filename parameter specifies for its PXE type. The boot loader file grubx64.efi for UEFI-
based clients is located in the efi subdirectory of the TFTP server directory. The boot loader file
pxelinux.0 for BIOS-based clients is located in the pxelinux subdirectory.
6
Configuring DHCP and TFTP Services to Support PXE Clients
The next-server statement specifies the IP address of the TFTP server from which a client can
download the boot loader file.
Note
You should include a next-server statement even if you use the same server
to host both DHCP and TFTP services. Otherwise, some boot loaders do not
know how to obtain their configuration files, which causes them to reboot the
client, to hang, or to display a prompt such as boot: or grub>.
The static IP addresses 10.0.0.253 and 10.0.0.254 are reserved for svr1 and svr2, which are
identified by their MAC addresses.
If the server has more that one network interface, the DHCP service uses the
/etc/dhcp/dhcpd.conf file to determine which interfaces to listen on.
2. Edit /etc/xinetd.d/tftp and modify the disable and server_args attributes to enable xinetd
to start the TFTP service (in.tftpd) and define the TFTP server directory, for example:
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
This example defines the TFTP server directory to be /var/lib/tftpboot, which is the default.
When xinetd receives a TFTP request, it starts in.tftpd and directs the request to it.
For more information about the configuration attributes, see the xinetd.conf(5) manual page.
PXE clients require a boot loader to load the Linux installation kernel (vmlinuz).
7
Configuring DHCP and TFTP Services to Support PXE Clients
For BIOS-based PXE clients, you can use the pxelinux.0 boot loader available in the syslinux
package. To install this package:
# yum install syslinux
For UEFI-based PXE clients, you can use the grubx64.efi boot loader available in the grub2efi
package. If you need to support Secure Boot on clients, you also need the first-stage boot loader
shim.efi, available in the shim package, so that the boot loader and kernel can be verified. Either
download these packages to a temporary location, or copy them from the full installation ISO image.
Then extract the contents of the packages:
# cd /tempdir
# rpm2cpio grub2-efi-version.rpm | cpio -idmv
# rpm2cpio shim-version.rpm | cpio -idmv
Note
If you need to support Secure Boot, make sure you specify shim.efi as the
boot loader in your DHCP configuration in /etc/dhcp/dhcpd.conf.
4. Create the directories used to contain the boot loaders and their configuration files as subdirectories of
the TFTP server directory.
5. Copy the boot loader files, the installation kernel (vmlinuz), and the ram-disk image file
(initrd.img) to the TFTP server subdirectories.
For BIOS-based clients, copy the BIOS boot loader file, the installation kernel, and the ram-disk image
file to the pxelinux directory:
# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux
# wget http://10.0.0.11/OSimage/OL7/isolinux/vmlinuz -O /var/lib/tftpboot/pxelinux/vmlinuz
# wget http://10.0.0.11/OSimage/OL7/isolinux/initrd.img -O /var/lib/tftpboot/pxelinux/initrd.img
For UEFI-based clients, copy the BIOS boot loader file, the installation kernel, and the ram-disk image
file to the efi directory:
# cp /tempdir/boot/efi/EFI/redhat/grubx64.efi /var/lib/tftpboot/efi
# cp /tempdir/boot/efi/EFI/redhat/shim.efi /var/lib/tftpboot/efi
# cp /tempdir/boot/efi/EFI/redhat/MokManager.efi /var/lib/tftpboot/efi
# wget http://10.0.0.11/OSimage/OL7/isolinux/vmlinuz -O /var/lib/tftpboot/efi/vmlinuz
# wget http://10.0.0.11/OSimage/OL7/isolinux/initrd.img /var/lib/tftpboot/efi/initrd.img
Note
You only need to copy the shim.efi and MokManager.efi files if you need
to support Secure Boot on clients. The MokManager.efi provides utilities for
managing the keys used to sign EFI binaries.
The above examples use HTTP to obtain the installation kernel and ram-disk images files from a
separate network installation server. You could use a local copy of the files if the TFTP server also
hosts the installation packages.
8
Configuring Dnsmasq to Support PXE Clients
To be able to install different operating system versions on PXE clients, you can rename the kernel and
ram-disk image files, for example to vmlinuz-ol7 and initrd-ol7.img. Alternatively, you could
copy the kernel and ram-disk image files to subdirectories such as efi/ol7 and pxelinux/ol7.
As a minimum, you should create the default boot loader configuration files:
pxelinux/pxelinux.cfg/default
efi/grub.cfg
You can create additional client-specific boot loader configuration files in either
pxelinux/pxelinux.cfg or efi, depending on whether the client is BIOS or UEFI-based. For more
information, see:
7. If SELinux is enabled in enforcing mode on your system and you configured a TFTP server directory
other than /var/lib/tftpboot, use the semanage command to define the default file type of the
TFTP server directory hierarchy as tftpdir_t and then use the restorecon command to apply the
file type to the entire directory hierarchy, for example:
Note
8. Enable the TFTP network socket, and configure it to start after a reboot.
You do not need to restart the TFTP service if you change the content of boot loader configuration files.
9
Configuring Dnsmasq to Support PXE Clients
The dnsmasq server does not have to host the installation packages, you can use a separate network
installation source.
2. Edit /etc/dnsmasq.conf and configure entries for PXE clients and other systems on the network, for
example:
interface=em1
dhcp-range=10.0.0.101,10.0.0.200,6h
dhcp-host=80:00:27:c6:a1:16,10.0.0.253,svr1,infinite
dhcp-boot=pxelinux/pxelinux.0
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,grubx64.efi
enable-tftp
tftp-root=/var/lib/tftpboot
interface=em1
dhcp-range=10.0.0.101,10.0.0.200,6h
Reserve a pool of generally available IP addresses in the range 10.0.0.101 through 10.0.0.200 on
the 10.0.0/24 subnet with a six-hour lease.
Note
dhcp-range=10.0.0.253,static,infinite
dhcp-host=80:00:27:c6:a1:16,10.0.0.253,svr1,infinite
Reserve the IP address 10.0.0.253 with infinite lease time for svr1, which is identified by the MAC
address 08:00:27:c6:a1:16.
dhcp-boot=pxelinux/pxelinux.0
Specify the location of the boot loader file, in this case for BIOS-based PXE clients.
If you want to use a separate TFTP server instead of dnsmasq, specify its IP address after the boot
loader path, for example:
dhcp-boot=pxelinux/pxelinux.0,10.0.0.11
dhcp-boot=tag:efi-x86_64,grubx64.efi
Specify the location of the boot loader file required by PXE clients identified with the tag
efix86_64, in this case UEFI-based PXE clients. The efix86_64 tag is defined by the
10
Configuring Dnsmasq to Support PXE Clients
This example specifies the grubx64.efi boot loader. If you need to support Secure Boot on UEFI
clients, specify shim.efi as the boot loader.
If you want to use a separate TFTP server instead of dnsmasq, specify its IP address after the boot
loader path, for example:
dhcp-boot=tag:efi-x86_64,grubx64.efi,10.0.0.11
enable-tftp
tftp-root=/var/lib/tftpboot
Specify the root directory for files served by TFTP. To prevent clients from accessing any file on the
host, dnsmasq rejects requests that specify .. as a path element.
For information on how to configure a separate TFTP server, see Section 1.3.3, Configuring DHCP
and TFTP Services to Support PXE Clients.
3. If you want dnsmasq to act as a caching-only name server, configure a name server entry for 127.0.0.1
that precedes other name server entries.
Dnsmasq ignores the 127.0.0.1 entry and forwards DNS queries to the other listed name servers. If the
NetworkManager service is enabled, you can configure name service entries by using the graphical
applet, the nm-connection-editor utility, or the nm-tui utility. Otherwise, you can configure name
server entries directly in /etc/resolv.conf, for example:
nameserver 127.0.0.1
nameserver 10.0.0.8
nameserver 10.0.0.4
If you make any changes to /etc/dnsmasq.conf, restart the dnsmasq service. You do not need to
restart the service if you change the content of boot loader configuration files.
If you enable the TFTP service in dnsmasq, configure the firewall to accept TFTP requests, for
example:
# firewall-cmd --zone=zone --add-service=tftp
# firewall-cmd --zone=zone --add-service=tftp --permanent
If you want dnsmasq to act as a caching-only name server, configure the firewall to accept DNS
requests:
# firewall-cmd --zone=zone --add-service=dns
11
Configuring Dnsmasq to Support PXE Clients
To configure the dnsmasq TFTP service for PXE client installation requests:
PXE clients require a boot loader to load the Linux installation kernel (vmlinuz).
For BIOS-based PXE clients, you can use the pxelinux.0 boot loader available in the syslinux
package. To install this package:
For UEFI-based PXE clients, you can use the grubx64.efi boot loader available in the grub2efi
package. If you need to support Secure Boot on clients, you also need the first-stage boot loader
shim.efi, available in the shim package, so that the boot loader and kernel can be verified. Either
download these packages to a temporary location, or copy them from the full installation ISO image.
Then extract the contents of the packages:
# cd /tempdir
# rpm2cpio grub2-efi-version.rpm | cpio -idmv
# rpm2cpio shim-version.rpm | cpio -idmv
Note
If you need to support Secure Boot, make sure you specify shim.efi as the
boot loader in your DHCP configuration in /etc/dnsmasq.conf.
2. Create the directories used to contain the boot loaders and their configuration files as subdirectories of
the TFTP server directory.
# mkdir -p /var/lib/tftpboot/pxelinux/pxelinux.cfg
For UEFI-based clients, the dnsmasq TFTP server expects the boot loaders and configuration files
to be in the root directory, for example /var/lib/tftpboot. You should ensure that this directory
exists.
3. Copy the boot loader files, the installation kernel (vmlinuz), and the ram-disk image file
(initrd.img) to the TFTP server subdirectories.
For BIOS-based clients, copy the BIOS boot loader file, the installation kernel, and the ram-disk image
file to the pxelinux directory:
# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux
# wget http://10.0.0.11/OSimage/OL7/isolinux/vmlinuz -O /var/lib/tftpboot/pxelinux/vmlinuz
# wget http://10.0.0.11/OSimage/OL7/isolinux/initrd.img -O /var/lib/tftpboot/pxelinux/initrd.img
For UEFI-based clients, copy the UEFI boot loader files, the installation kernel, and the ram-disk image
file to the root directory of the TFTP server:
# cp /tempdir/boot/efi/EFI/redhat/grubx64.efi /var/lib/tftpboot
# cp /tempdir/boot/efi/EFI/redhat/shim.efi /var/lib/tftpboot
# cp /tempdir/boot/efi/EFI/redhat/MokManager.efi /var/lib/tftpboot
# wget http://10.0.0.11/OSimage/OL7/isolinux/vmlinuz -O /var/lib/tftpboot/vmlinuz
# wget http://10.0.0.11/OSimage/OL7/isolinux/initrd.img /var/lib/tftpboot/initrd.img
12
Boot Loader Configuration for BIOS-Based PXE Clients
Note
You only need to copy the shim.efi and MokManager.efi files if you need
to support Secure Boot on clients. The MokManager.efi provides utilities
for managing the keys used to sign EFI binaries. Depending on your Grub 2
configuration, you could copy the installation kernel, and the ram-disk image file
to a subdirectory.
The above examples use HTTP to obtain the installation kernel and ram-disk images files from a
separate network installation server. You could use a local copy of the files if the dnsmasq server also
hosts the installation packages.
To be able to install different operating system versions on PXE clients, you can rename the kernel and
ram-disk image files, for example to vmlinuz-ol7 and initrd-ol7.img. Alternatively, you could
copy the kernel and ram-disk image files to subdirectories such as efi/ol7 and pxelinux/ol7.
As a minimum, you should create the default boot loader configuration files:
pxelinux/pxelinux.cfg/default
grub.cfg
You can create additional client-specific boot loader configuration files in either pxelinux/
pxelinux.cfg or to the root directory of the TFTP server, depending on whether the client is BIOS or
UEFI-based. For more information, see:
5. If SELinux is enabled in enforcing mode on your system and you configured a TFTP server directory
other than /var/lib/tftpboot, use the semanage command to define the default file type of the
TFTP server directory hierarchy as tftpdir_t and then use the restorecon command to apply the
file type to the entire directory hierarchy, for example:
# /usr/sbin/semanage fcontext -a -t tftpdir_t "/var/tftpboot(/.*)?"
# /sbin/restorecon -R -v /var/tftpboot
Note
13
Boot Loader Configuration for BIOS-Based PXE Clients
label ol7
kernel vmlinuz
append initrd=initrd.img inst.repo=http://10.0.0.11/OSimage/OL7 inst.ks.sendmac \
inst.ks=http://10.0.0.11/ksfiles/ol7_cfg.ks
To allow the boot: prompt to be displayed, change the value of prompt to 1. To display the prompt, press
Shift or Alt at the console.
The default directive identifies the default boot entry by its label value, ol7.
Pxelinux boots the client using the default boot entry after timeout/10 seconds.
The kernel directive defines the name of the kernel executable and the append directive defines any
parameters that should be appended when loading the kernel, such as the name of the ram-disk image
and the location of a Kickstart file.
The kernel and ram-disk image file paths are assumed to be relative to the subdirectory that contains the
boot loader, for example pxelinux. If you place the vmlinuz and initrd.img files in a subdirectory
such as pxelinux/OL7, ensure you have the correct relative paths.
If you want to display the boot loader configuration as a menu on the screen, you can use the menu.c32
module. To do this:
2. Edit the boot loader configuration to use the module, for example:
default menu.c32
timeout 0
To support different types of client, you can create a configuration file named for:
A client's MAC address prefixed by 01-, which represents the ARP hardware type for Ethernet, and
using dashes to separate each byte value instead of colons (for example, 01-80-00-27-c6-a1-16).
Note
The file name must use lowercase characters for the MAC address.
A client's IP address expressed in hexadecimal without any leading 0x (for example, 0A0000FD
represents the IP address 10.0.0.253).
To reduce the number of configuration files, you can group clients by IP address range, for example
0A0000E represents the IP address range 10.0.0.224 through 10.0.0.239.
The boot loader looks for a configuration file in the following order until it finds a matching file name:
14
Boot Loader Configuration for UEFI-Based PXE Clients
If several configuration files have identical content, you can use the ln command to link the files to a
master copy, for example:
# ln master-ol7 0A0000FC
# ln master-ol7 0A0000FD
# ln master-ol7 0A0000FE
For information about configuring and using Kickstart to perform automated installation, see Section 3.2,
Automated Installation Using Kickstart.
menuentry 'ol7' {
echo "Loading efi/vmlinuz"
linuxefi efi/vmlinuz inst.repo=http://10.0.0.11/OSimage/OL7 inst.ks.sendmac \
inst.ks=http://10.0.0.11/ksfiles/ol7_cfg.ks
echo "Loading efi/initrd.img"
initrdefi efi/initrd.img
echo "Booting installation kernel"
}
The linuxefi directive defines the name of the kernel executable and defines any parameters that
should be appended when loading the kernel, such as the location of the installation packages, and how
to access these packages. This example uses HTTP to install the packages from the specified URL. The
initrdefi directive defines the name of the ram-disk image.
The kernel and ram-disk image file paths are assumed to be relative to the subdirectory that contains the
boot loader, for example efi. If you place the vmlinuz and initrd.img files in a subdirectory such as
efi/OL7, ensure you have the correct relative paths.
By default, GRUB 2 does not provide any indication that is transferring the kernel and ram-disk images
files. The echo statements in the example above provide a simple indication of progress.
15
Planning an Installation
To support different types of client, you can create a configuration file named grub2.cfg-client-ID
where client-ID is one of the following:
A client's MAC address prefixed by 01-, which represents the ARP hardware type for Ethernet, and
using dashes to separate each byte value instead of colons (for example, 01-80-00-27-c6-a1-16).
Note
The file name must use lowercase characters for the MAC address.
A client's IP address expressed in hexadecimal without any leading 0x (for example, 0A0000FD
represents the IP address 10.0.0.253).
To reduce the number of configuration files, you can group clients by IP address range, for example
0A0000E represents the IP address range 10.0.0.224 through 10.0.0.239.
Place the configuration files in the same directory as the boot loader files, for example efi.
The boot loader looks for a configuration file in the following order until it finds a matching file name:
If several configuration files have identical content, you can use the ln command to link the files to a
master copy, for example:
# ln master-ol7 grub.cfg-0A0000FC
# ln master-ol7 grub.cfg-0A0000FD
# ln master-ol7 grub.cfg-0A0000FE
For more information about GRUB 2, enter the info grub command to access the GRUB 2 manual.
For information about configuring and using Kickstart to perform automated installation, see Section 3.2,
Automated Installation Using Kickstart.
16
Planning an Installation
The following are the main considerations when planning to install a system:
Storage
The storage devices on which you intend to install the operating system, such as a local hard disk. If
the storage devices are already partitioned, identify the partitions that can be used for the installation.
The installation program indicates how much disk space is required, and warns you if there is
insufficient space.
The layout of the storage devices on which the operating system's file systems will be installed,
including any provision for logical volume management or RAID configuration.
The amount of space required for each file system (/, /boot, /home, /var/tmp, and so on), the file
system type, and whether the block device underlying each file system should be encrypted.
For iSCSI or FCoE connections, the WWID or the port, target, and LUN to be used.
Network
The network interface to use for installation (if any), and its IP address, netmask, and gateway settings
if you do not use DHCP.
The fully qualified domain name of the system, or just the host name if you intend to use DHCP to
provide network settings.
Any other network interface to be configured during installation, and their IP address, netmask, and
gateway settings if you do not use DHCP.
Any specialized network interfaces to be configured during installation, such as VLANs and bonds.
Software
The software packages that should be installed on the system as determined by the system's intended
purpose, such as a web server.
The URLs of any additional repositories and the proxy settings to be used to install packages.
17
18
Chapter 2 Installing Oracle Linux Manually
Table of Contents
2.1 Starting the Installation ............................................................................................................... 19
2.2 Setting the System Time and Supporting Other Languages .......................................................... 21
2.3 Selecting the Software to Install .................................................................................................. 24
2.4 Configuring the System Storage and Network .............................................................................. 26
2.5 Completing the Installation .......................................................................................................... 30
This chapter describes how to perform a basic Oracle Linux installation using a CD, DVD, or a USB drive.
Uses the graphical installation program to install Oracle Linux provided that the system has sufficient
memory and the video card is supported. Otherwise, text-based installation is selected, see
Section 3.3, Text-Based Installations.
Tests the installation media and then uses the graphical installation program to install Oracle Linux
provided that the system has sufficient memory and the video card is supported. Otherwise, text-based
installation is selected.
19
Starting the Installation
Troubleshooting
Provides access to a separate menu which contains options for resolving issues with installing or
booting an Oracle Linux 7 system, see Section 6.1, Troubleshooting Menu Options.
Use the up and down arrow keys to navigate the boot menu. To install Oracle Linux 7, select one of the
options to install Oracle Linux and press Enter. The Welcome to Oracle Linux 7 screen is displayed.
Figure 2.2 shows the options on this screen.
In the left-hand box, use the mouse to select the language to use for the installation, or type the name of
the language in the search box. In the right-hand box, select a locale. The language you select becomes
the default language for the system. If you need to, you can change the default language after you have
installed the software.
Click Continue, the Installation Summary screen is displayed. Figure 2.3 shows the options on this screen.
20
Setting the System Time and Supporting Other Languages
The Installation Summary screen presents an overview of the options selected for the installation
and a menu for configuring those options. As a minimum, you must visit the options that are marked
with a warning icon. If you want to connect the system to a network, you should also visit the Network
Configuration option and ensure that network connections are enabled. You can change the installation
configuration options as much as you like, the installation does not begin until you click Begin Installation.
As you visit the configuration options, pay attention to any warning messages displayed at the bottom of
the screen.
21
Adding Keyboard Layouts
Pick a time zone by selecting a region and city from the drop-down lists, or by clicking a location on the
map. Choose a country and city that are in the same time zone as your system. You need to specify a time
zone even if you intend to use the Network Time Protocol (NTP) to set the time on the system.
Before you can enable NTP, ensure that the system is connected to a network by selecting the Network
& Hostname option on the Installation Summary screen (see Configuring the Host Name and Connecting
to a Network). To enable NTP, move the Network Time switch to the ON position and click the Settings
button to display a dialog where you can configure the NTP servers that the system should use.
To set the date and time manually, ensure the Network Time switch is in the OFF position, and then adjust
the date and time at the bottom of the screen if needed.
Click Done to save your configuration and return to the Installation Summary screen.
22
Adding Language Support
Click the + button to display a dialog where you can select the additional keyboard layouts you want to
install on the system. To check a keyboard layout:
Select the keyboard in the list and click the Keyboard button at the bottom of the screen to display a
picture of the layout.
Click the keyboard icon at the top of the screen to change the current keyboard, then click in the box on
the right, and type some text.
If you add multiple keyboard layouts, the first keyboard shown in the list of keyboards is the default
keyboard. Use the arrow buttons to change the order of the list. You should also click Options and
configure the keyboard shortcut for switching between layouts.
Click Done to save your configuration and return to the Installation Summary screen.
23
Selecting the Software to Install
Select a language in the left-hand box, or type in the search box, and then select one or more locales in
the right-hand box.
Click Done to save your configuration and return to the Installation Summary screen.
24
Selecting the Full Installation Image
This option is only available if the installation program detected a local device that contains the full
installation image. If you did not check the installation media when you started the installation, click
Verify to check the media.
ISO file
This option is only available if the installation program detected a local hard drive that can be mounted.
Select the device in the Drive list, and then click Choose an ISO to select an ISO image. Click Verify
to check the media.
On the network
Select the network protocol required to access a network installation server from the list and then enter
either :
If needed, click Proxy setup and configure the details for your organization's proxy server that acts
as an intermediary for Internet access.
For NFS and FTP, the domain name or IP address of the server and the path to the directory that
contains the installation image.
For NFS, the path can be the path to an ISO image. Enter any NFS mount options that are
required.
To use a network location, ensure that the system is connected to a network (see Configuring the Host
Name and Connecting to a Network) otherwise the installation program reports an error.
You can also use the + button to specify additional repositories containing software you want to install.
The Server-HighAvailability and Server-Resilient Storage repositories listed contains upstream high
availability packages and are not supported in Oracle Linux 7.
25
Selecting the Software to Install
Click Done to save your configuration and return to the Installation Summary screen.
The screen is in two parts, the Base Environment on the left and the Add-Ons for Selected Environment
on the right. In the Base Environment part, you select an environment that best matches what the system
will be used for. In the Add-Ons part, you select the software you want to add to the selected Base
Environment.
The Minimal Install base environment is the default environment. It contains only the minimum set of
packages required to run Oracle Linux and does not include many administration tools that you might
normally use, such as wget or unzip. This environment is the most secure environment to install and
requires the least system resources to run. After the software is installed, you can install any other
packages you require.
The Server with GUI base environment is the only environment that displays a graphical desktop when the
system boots. All other base environments boot into a command-line environment.
By default, the Server with GUI base environment installs the Gnome 3 desktop. If you want an alternative
desktop, select KDE as an add-on.
Click Done to save your configuration and return to the Installation Summary screen.
26
Choosing Where to Install the Software and Configuring Storage
On this screen, you select the local disks and other storage you want to use for the installation, and
configure the partitioning and file system types you want to use. The installation program does not make
any changes to any of the disks and storage until you click Begin Installation on the Installation Summary
screen.
First, choose the devices on which you want to install Oracle Linux:
In the Local Standard Disks section, select the local disks you want to use for the installation by clicking
on them. A tick icon is displayed next to the disks you have selected.
In the Specialist & Network Disks section, you can select hardware RAID, iSCSI or Fibre Channel over
Ethernet (FCoE) storage devices. Click Add Disk to display the options for adding and configuring these
device types.
Next, select how you want to partition the selected disks automatically or manually. By default, the
Automatically configure partitioning option is selected. Automatic disk partitioning creates the following
layout on the selected disks:
A partition in the remaining disk space configured as a Logical Volume Manager (LVM) physical volume
for an LVM volume group that contains:
A logical volume for an XFS file system for the root file system (/).
A logical volume for an XFS file system for the /home file system (if the selected disks are larger than
50 GB in total).
27
Choosing Where to Install the Software and Configuring Storage
With automatic partitioning, you might not have sufficient space to install the software if the disk is already
partitioned. The information at the bottom of the screen tells you how much disk space is needed for the
software you have selected. To free some disk space, select I would like to make additional space
available and click Done. The Reclaim Disk Space window is displayed, as shown in Figure 2.10. You are
also prompted to free disk space if you click Done and there is insufficient space.
Select the partitions you want to use, then click Delete, Shrink, or Delete all to free disk space, and then
click Reclaim Space.
If you want full control over how the disks are partitioned or the file system types used, you must partition
the disks manually by selecting I will configure partitioning. The options for partitioning are displayed
when you click Done. You can partition disks using standard partitions, btrfs, LVM logical volumes, or LVM
thin provisioning. For an example of how to partition disks manually, see Section 3.4, Installing a System
With a Btrfs Root File System
If you select Encrypt my data on the Installation Destination screen, you are prompted to enter a
passphrase for the encryption when you click Done. This option encrypts all the disk partitions, except the
partition that contains /boot, using Linux Unified Key Setup (LUKS). If a partition is encrypted, you cannot
access data on the partition without entering the passphrase. If you lose this passphrase, you cannot
recover the data on the disk. If you only want to encrypt particular partitions, you must partition the disks
manually.
Oracle Linux uses Grand Unified Bootloader version 2 (GRUB 2) as the boot loader. The boot loader
runs when the system starts and loads the kernel, without the need for boot media. By default, GRUB 2
is installed in either the master boot record (MBR) or the GUID partition table of the device that contains
the root (/) file system. Click Full disk summary and bootloader to change the location of GRUB 2 or
to prevent its installation. For UEFI-based systems, the GPT is always used. For BIOS-based systems
28
Configuring Kdump
(including UEFI-based systems in legacy BIOS mode), by default the MBR is used if the disk size is less
than 2 TB, otherwise the GPT is used.
Click Done to save your configuration and return to the Installation Summary screen.
Configuring Kdump
To configure Kdump, click the Kdump option on the Installation Summary screen, the Kdump window is
displayed. Figure 2.11 shows the options on this screen.
Figure 2.11 Kdump
In the event of a system crash, Kdump captures information that assists in determining the cause. By
default, Kdump is enabled and the amount of memory reserved for Kdump is calculated automatically.
Select Manual if you want to set the amount of reserved memory yourself.
Click Done to save your configuration and return to the Installation Summary screen.
29
Completing the Installation
To enable a network interface, select the interface in the list of interfaces and then move the switch to the
ON position. By default, the IP settings for a network interface are configured automatically using DHCP for
IPv4, and the Automatic method for IPv6. To edit the connection, click Configure to display the connection
settings window as shown in Figure 2.13.
To enable the connection whenever the network is available, select Automatically connect to this
network when it is available on the General tab. Use the settings on the other tabs to configure the
connection. For example to set a static IPv4 address, click IPv4 Settings and select Manual for the
Method, and then enter values for the IP address, network mask, gateway, and DNS parameters. When
you have finished configuring the connection, click Save.
On the Network & Hostname screen, enter the host name of the system as either as a single name or as a
fully-qualified domain name (FQDN), for example, host01.example.com. If you use the Dynamic Host
Configuration Protocol (DHCP) to provide network settings, enter a single name and allow DHCP to assign
the domain name.
You can also add special network devices such as an interface bond or team, or a VLAN (virtual local area
network) device. Click the + button to access the settings for configuring these devices.
Click Done to save your configuration and return to the Installation Summary screen.
30
Setting the Root Password
The screen contains a menu with two options for configuring users and a status bar that shows the
progress of the installation. You can use the menu options while the installation is in progress. You must
set the root password to finish the installation. Creating a user is optional, you can do it now or when the
installation is complete. It is best to create a user, as you should not log in to the system as the root user.
If you want users to authenticate using a mechanism such as LDAP or Kerberos, you need to configure
this when the installation is complete.
Enter the root password in the Root Password and Confirm fields. The screen provides a visual indication
about the strength of the password. Click Done to return to the Configuration screen. If you set a weak
password, you have to click Done twice.
Creating a User
Click User Creation to display the Create User screen. Figure 2.16 shows the options on this screen.
Enter the details of the local user account you want to create. Again there is a visual indication about the
strength of the password.
31
Rebooting and Initial Setup
Select Make this user administrator if you want the user to be able to administer the system. Selecting
this option adds the user to the wheel user group, which enables them to run administrative tools using
the sudo command.
If you want more control over how the user is configured, for example to specify the user's home directory
or user ID, click Advanced.
Once you have configured the user, click Done to return to the Configuration screen. If you set a weak
password, you have to click Done twice.
If you installed a base environment other than the Server with GUI environment, the system reboots as a
non-graphical system and displays a login prompt. Once you log in, you can review the license agreement
at /usr/share/oraclelinux-release/EULA.
If you installed the Server with GUI environment, the system reboots and the Initial Setup screen is
displayed. Figure 2.17 shows the options on this screen.
You must select the License Information option and accept the license agreement. The User Creation
option is only displayed if you did not create a user during installation. If you create a user here, the options
for creating a user are the same as during the installation.
Click Finish Configuration, the Set Up Software Updates window is displayed, as shown in Figure 2.18.
32
Rebooting and Initial Setup
If the system has an active network connection, you use the following screens to register your system with
the Unbreakable Linux Network (ULN), and to subscribe the system to software and Ksplice updates. Click
Finish. The graphical login screen is displayed.
33
34
Chapter 3 Options for Installation
Table of Contents
3.1 Installation Boot Options ............................................................................................................. 35
3.2 Automated Installation Using Kickstart ......................................................................................... 38
3.2.1 Creating a Kickstart File ................................................................................................... 38
3.2.2 Using a Kickstart File to Install a System .......................................................................... 41
3.3 Text-Based Installations .............................................................................................................. 41
3.4 Installing a System With a Btrfs Root File System ........................................................................ 42
This chapter describes some of the options you have for installing Oracle Linux 7.
Note
On BIOS systems, you can press the Esc key instead of the E key, a boot: prompt
is displayed, which does not contain any predefined boot options. You must enter
linux to load the predefined boot options before appending 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 systems) or Return (BIOS 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
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.
35
Installation Boot Options
inst.graphical
inst.text
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.
inst.repo=nfs:[options:]NFS_server:path
Specifies an NFS share as the location that contains everything needed to install the software.
ip=[interface:]dhcp|dhcp6|auto6|ibft
Specifies a network automatic configuration method. If interface is not specified, all interfaces are
configured. Use ibft 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.
36
Installation Boot Options
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.
inst.ks=cdrom[:device]/path
Specifies a Kickstart file on a CD or DVD drive.
inst.ks=ftp://user:password@FTP_server/path
inst.ks=hd:device:path
You can specify the device by its device name (sdb2), label (LABEL=label) or UUID (UUID=uuid).
inst.ks=[http:|https:]//HTTP_server/path
inst.ks=nfs:[options:]NFS_server:path
inst.vnc
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
inst.keymap=layout
inst.lang=language
37
Automated Installation Using Kickstart
loglevel=level
Specifies the logging level for installation: critical, debug, error, info, or warning. The default
level is info.
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.txt.
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 derived either from
the system BIOS or from a device's firmware, system path, or MAC address.
Once you have prepared a Kickstart configuration file, use the ksvalidator utility (included in the
pykickstart package) to check that the syntax of the file is correct.
# Root password
rootpw --iscrypted SHA512_password_hash
# System keyboard
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# SELinux configuration
selinux --enforcing
38
Creating a Kickstart File
# System timezone
timezone America/Los_Angeles
# Network information
network --bootproto=dhcp --device=em1 --onboot=yes --hostname=hostname
# Non-administrative user
user --name=user --homedir=/home/user --password=SHA512_password_hash --iscrypted
# Partition information
PXE cannot bring up the network interface unless you include a line such as the following:
network --bootproto=dhcp --device=em1 --onboot=yes
39
Creating a Kickstart File
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:
--multilib Sets the multilib policy in yum configuration to all 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
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.
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.
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.
40
Using a Kickstart File to Install a System
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
2. Selecting an installation option in the boot menu and then press either the E key (UEFI systems) or the
Tab key (BIOS systems) to access the boot prompt.
3. 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 the em1 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 Section 3.1, Installation Boot Options.
41
Installing a System With a Btrfs Root File System
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
Section 3.1, Installation Boot Options) or use a Kickstart file (see Section 3.2, Automated Installation
Using Kickstart). After installation, the system starts in text mode even if a graphical desktop is selected as
the base environment.
1. Begin the installation by booting the system from the installation media.
2. On the Installation Summary screen, select Installation Destination. The Installation Destination
screen is displayed.
3. Select the local disks and add any Specialized & Network disks you want to use for the installation.
The encryption is applied to the block devices that contain the btrfs subvolumes and file systems.
5. Select I will configure partitioning and click Done. The Manual Partitioning screen is displayed.
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.
To create the default mount points automatically, click Click here to create them automatically. By
default, automatic partitioning creates the following layout:
42
Installing a System With a Btrfs Root File System
A swap partition.
To create mount points manually, click the + button. As a minimum, create mount points for /, /boot,
/home, and swap. The swap and /boot partitions cannot be configured as btrfs file systems.
Select the / mount point and click Modify. The Configure Volume window is displayed, as shown in
Figure 3.3.
43
Installing a System With a Btrfs Root File System
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.
9. Click Save. The Configure Volume screen is closed. Click Update Settings to refresh the screen with
your configuration changes.
10. Click Done. If you enabled encryption, you are prompted to enter an encryption passphrase.
44
Chapter 4 Upgrading an Oracle Linux System
Table of Contents
4.1 Conditions for Performing an Inplace Upgrade ............................................................................. 45
4.2 Performing an Inplace Upgrade ................................................................................................... 45
Typically, you upgrade an Oracle Linux system by performing a fresh installation. However, starting with
Oracle Linux 7, there is limited support for inplace upgrades. This chapter describes the conditions and
method for performing an inplace upgrade.
The system must meet the minimum installation requirements for Oracle Linux 7, see Section 1.1,
System Requirements.
The Oracle Linux 6 system has been completely updated from the ol6_x86_64_latest channel or
ol6_latest repository.
Oracle Unbreakable Enterprise Kernel Release 3 (UEK R3) or Oracle Unbreakable Enterprise Kernel
Release 4 (UEK R4) must be installed on the system and must be the default boot kernel. Upgrading
from UEK R2 is not supported.
The Oracle Linux 6 system must have been installed using the Minimal set of software.
If the RedHat Compatible Kernel (RHCK) is installed, it is upgraded as part of the process, but it must not
be set as the default boot kernel.
If the system to be upgraded contains valuable data, make a backup or snapshot of the system so that you
can recover its previous state should the upgrade fail.
Before you upgrade, check the release notes for any known issues with upgrades. See the Oracle Linux 7
documentation library at http://docs.oracle.com/cd/E52668_01/index.html.
To perform an inplace upgrade you must install some additional packages and their dependencies. The
system should have access to the Unbreakable Linux Network (ULN), Oracle public yum, or a local yum
server.
Obtain the latest versions of the following packages from ULN (in the ol6_x86_64_addons channel),
or from Oracle Public Yum (in the ol6_addons repository):
45
Performing an Inplace Upgrade
preupgrade-assistant
preupgrade-assistant-el6toel7
preupgrade-assistant-el6toel7-data
preupgrade-assistant-ui
preupgrade-assistant-tools
redhat-upgrade-tool
You should also ensure that the openscap package, version 1.0.8-1.0.1 or greater, is installed on
the system. Depending on your yum configuration, this might be installed automatically when you install
the above packages.
3. If the system is registered with ULN, delete the system from ULN and disable yum plugins.
You can only delete a system if it is registered to your user name on ULN.
b. On the Systems tab, click the link for the system in the list of registered machines.
e. On the system, edit the yum configuration file /etc/yum.conf file and disable yum plugins by
setting plugins=0.
If the assessment reports any fail, needs_action, or needs_inspection issues, read the
remediation instructions for these issues and perform any required actions before proceeding with the
upgrade.
You might also need to perform some actions after performing the upgrade.
You can run the preupg command as often as you like to check the system's readiness for upgrading.
A backup of each assessment is stored in the /root/preupgrade-results directory. You might
want to back up this directory before performing the upgrade.
The /root/preupgrade directory (and its contents) must be present for the upgrade to proceed.
The --cleanup-post option ensures that there are no Oracle Linux 6 packages remaining on the
system after the upgrade. If you do not use this option, you should check the system after the upgrade
46
Performing an Inplace Upgrade
and manually remove any Oracle Linux 6 packages, for example by using yum remove `rpm -qa |
grep el6`.
After the reboot, the upgrade tool installs the required packages, reconfigures the system, and then
reboots. Depending on the number of packages, this may take some time.
After the upgrade completes, perform any post-upgrade actions identified by the upgrade assessment.
8. If the system was previously registered with ULN, check that yum plugins are enabled and reregister
the system with ULN.
a. On the system, edit the yum configuration file /etc/yum.conf file and enable yum plugins by
setting plugins=1.
Alternatively, if you use the GNOME graphical user desktop, select Applications, System Tools,
and then ULN Registration.
c. When prompted, enter your ULN user name, password, and customer support identifier (CSI).
47
48
Chapter 5 Post-installation Configuration
Table of Contents
5.1 Registering with the Unbreakable Linux Network .......................................................................... 49
5.2 Obtaining Errata and Updates from the Oracle Linux Yum Server ................................................. 49
5.3 Obtaining Packages from the Oracle Linux Installation Media ....................................................... 50
5.4 Applying Updates ....................................................................................................................... 50
5.5 Managing a System .................................................................................................................... 50
This chapter describes configuration changes that you might make to a system after installation.
To obtain Oracle Linux updates from ULN, you must have an Oracle Linux support subscription. For more
information about ULN, see http://linux.oracle.com.
During ULN registration, your server is automatically registered with the latest channels for the base
repository and the Unbreakable Enterprise Kernel Release 3.
ULN also provides channels for Oracle-specific software packages such as Oracle's ASMlib userspace
package and the Oracle Instant Client. To enable access to these packages, log in to ULN and subscribe
your system to the Oracle Software for Oracle Linux 7 channel.
If you have an Oracle Linux Premier Support account, you can opt to use Oracle Ksplice, which enables
you to keep your systems secure and highly available by automatically updating your systems with the
latest kernel security errata and other critical updates. If you choose to use Ksplice, you can subscribe your
systems to the Ksplice for Oracle Linux channel and install the Ksplice Uptrack software on them. After
registration is complete, you can use yum to install the uptrack package. The Uptrack client downloads
the access key from ULN and automatically configures itself so that your system can immediately begin to
use Ksplice Uptrack.
5.2 Obtaining Errata and Updates from the Oracle Linux Yum Server
Oracle also provides all errata and updates for Oracle Linux via the Oracle Linux Yum Server, which
includes updates to the base distribution, but does not include Oracle-specific software. You do not require
an Oracle Linux support subscription to use this service. For more information on how to obtain updates
from the Oracle Linux Yum Server, see http://yum.oracle.com.
By default, all new installations of Oracle Linux 7 are automatically configured to use the Oracle Linux Yum
Server. If you subsequently register the system with ULN, any configuration to use the Oracle Linux Yum
Server is automatically disabled.
49
Obtaining Packages from the Oracle Linux Installation Media
gpgcheck=1
enabled=1
[ol7_UEKR3]
name=Latest Unbreakable Enterprise Kernel Release 3 for Oracle Linux $releasever ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL7/UEKR3/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
1. Mount the full installation ISO image on a suitable mount point, for example /mnt:
# mount -t iso9660 -o loop full_image.iso /mnt
2. Create the file /etc/yum.repos.d/Media.repo that contains entries similar to the following:
[ol7_base_media]
name=Oracle Linux 7 Base Media
baseurl=file:///mnt
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
Adjust the value of the baseurl and gpgkey parameters to match the mount point of the ISO image
on your system.
This command upgrades your system to the latest available update of Oracle Linux 7.
You can use the following command to install or update a specific package:
# yum update package
For example, to install or update the Z-shell package (zsh), you would enter:
# yum update zsh
Use the localectl command to change the default system locale and keyboard layout, or you can
edit the settings in /etc/locale.conf, and then reboot the system. For more information, see the
localectl(1) and locale.conf(5) manual pages.
50
Managing a System
Use the timedatectl command to change the system date and time. For more information, see the
timedatectl(1) manual page.
System Services
Use the systemctl command to enable, start and stop system services. For more information, see
the systemctl(1) manual page.
System Firewall
To implement a simple, general-purpose firewall, you can use the Firewall Configuration GUI
(firewall-config) or the firewall-cmd command to create basic packet filtering rules. To create
a more complex firewall configuration, use the iptables and ip6tables utilities to configure the
rules for IPv4 and IPv6.
The following table lists some ports that you might need to open in the firewall to allow access to
various services.
Note
The ports used by NFSv2 and NFSv3 are determined by settings in /etc/
sysconfig/nfs for LOCKD_TCPPORT, LOCKD_UDPPORT, MOUNTD_PORT, and
STATD_PORT.
For detailed information on how to configure firewalls, see the Oracle Linux 7 Administration Guide in
the Oracle Linux 7 documentation library at http://docs.oracle.com/cd/E52668_01/index.html.
System State
Use the systemctl command to change the run state of the system. For more information, see the
systemectl(1) manual page.
51
Managing a System
To change the default system state and switch to the multi-user graphical environment (runlevel 5 in
previous Oracle Linux releases):
# systemctl set-default graphical.target
# systemctl isolate graphical.target
To change the default system state and switch to the multi-user command-line environment (runlevel 3
in previous Oracle Linux releases):
# systemctl set-default multi-user.target
# systemctl isolate multi-user.target
52
Chapter 6 Troubleshooting
Table of Contents
6.1 Troubleshooting Menu Options .................................................................................................... 53
6.2 Debug and Log Information ......................................................................................................... 53
This chapter describes some options for troubleshooting Oracle Linux 7 installations. You should
also check the release notes for your Oracle Linux release for known installation issues and also the
release notes for Unbreakable Enterprise Kernel Release for known hardware issues. Both release note
documents can be found in the Oracle Linux 7 documentation library at
http://docs.oracle.com/cd/E52668_01/index.html.
Use this option if the screen goes blank or appears distorted when you try to install Oracle Linux in
graphical mode.
Use this option to boot an installed system in a mode that enables you to edit partitions or configuration
files to fix a variety of boot problems.
Use this option to run the memtest86 utility, which verifies the integrity of the system's RAM.
Use this option to boot an installed system from the hard disk.
During an installation several log files are generated to capture the messages from the following sources:
Anaconda program
During the installation you can access the messages stored in this log by pressing Ctrl+Alt+F1 to
display the virtual console, then press Ctrl+b, and then press 3.
53
Debug and Log Information
Kickstart
Other programs
The /tmp/program.log file contains logs from all other programs used during the installation.
During the installation you can view the messages stored in this log by pressing Ctrl+Alt+F1 to display
the virtual console, then press Ctrl+b, and then press 5.
Package installation
The /tmp/packaging.log file contains package installation messages output by the yum and rpm
commands.
During the installation you can view the messages stored in this log by pressing Ctrl+Alt+F1 to display
the virtual console, then press Ctrl+b, and then press 4.
If the installation fails, the messages from these log files are combined into a single log file at /tmp/
anaconda-tb-name.
To access a shell prompt as the root user during the installation, press Ctrl+Alt+F1 to display the virtual
console, then press Ctrl+b, and then press 2. You can use this shell prompt to access the log files and
copy them to a local storage device such as a USB device, or to copy them to a network location using the
scp command.
54