Installing Linux on IBM Z into an LPAR

May 31st, 2019 Installing Linux on IBM Z into an LPAR

Andy Hartman
Senior Consultant


IBM Z provides several different ways to run Linux. For most workloads over the past several years, this has usually meant installing Linux under z/VM and running it as a guest, which takes advantage of z/VM’s great virtualization capabilities. This works well with traditional applications, such as databases or application servers. However, with new technologies and application development techniques, installing Linux directly into an LPAR has advantages as well. Utilizing KVM as a hypervisor, or utilizing Docker or other types of containers, makes installing Linux directly into an LPAR a viable option.

Installing Linux Directly into an LPAR

Installing Linux directly into an LPAR is possible on all three supported Linux distributions for IBM Z. SuSE, Red Hat and Ubuntu all support this type of installation and provide detailed instructions on their websites. The installation process is straight forward and is very similar to what you would see if you were doing a manual installation under z/VM for instance, once the initial setup is complete. You will be utilizing the HMC (Hardware Management Console) and the Operating Systems Messages for the initial part of the installation, as well as either the HMC’s CD/DVDROM drive or an FTP server, or a SCSI attached the DVD drive. If you have access to an FTP server from the HMC, this is probably going to be your best option. This gives you the ability to easily modify parameter files, for example, that could eliminate the need to enter information at the Operating System Messages console. It can also make it easy to insert an answer file into the directory tree to allow for an automated installation. This can also be done by entering parameters into the Operating System Messages console, but it could get cumbersome if you were building several LPARs from scratch. You can also expand the ISO image you get from the vendor and modify the parameter files; and then create a new physical DVD from this modified ISO image.

If you are using an FTP server for the installation, make sure that you have all the appropriate firewall rules set and all the appropriate ports open on the FTP server, including the PASV ports that are used. On the newest versions of the HMC, you can use normal FTP, as well as secure FTP, to perform the installation if you have secure ftp available on your FTP server. If you modify or add files to the FTP server for the installation, make sure they have the correct file permissions assigned to them, such as being readable by anyone, especially if you are using an anonymous sign in for your FTP server.

3 Ways to Install Linux

When using a local FTP server, you can have three different types of installations: 1. Manual – which means you answer all the prompts: 2. Semi-automated – which means you give it a parameter file that sets up networking, etc., but still requires answering questions about the actual installation of software, etc.; and 3. Fully-automated. Which installation type to use is determined by the parameters you provide in the parameter file for each distribution. I have provided a link to examples of these parameter files, and you can see slight differences in them, depending on whether it is a manual, semi-automated or fully-automated installation. This is documented at each vendors website.

There are options for using automated installation tools, such as Kickstart for Red Hat, AutoYast for SuSE and Preseed for Ubuntu. These can be used to answer all the installation questions you would see during a manual install, as well as allow you to simply start the installation and let it finish automatically. I gave a presentation and demo on how to install Linux on IBM Z under z/VM using these tools earlier this year. Click here to access that video. The concepts are the same. The setup of the initial parameters is basically the same, as are the files for the automated part of the installation.

I’ve provided a set of examples that I used for each of the three distributions, which I deployed on our z14 ZR1 in Mainline’s Business Partner Innovation Center (BPIC). These examples where built from scratch, from automated tools, and some were taken from the vendor’s documentation and modified to fit my needs.

You can use SSH or VNC to complete a manual or semi-automated installation on SuSE or Red Hat, and SSH can be used for Ubuntu. SSH and/or VNC are used to administer your Linux system once it has been installed. With some additional configuration changes, you can also use the Integrated ASCII Console, on the HMC, to administer your new Linux LPAR.

With any of the distributions, when you use partial or fully automated installs always use the cio_ignore parameter and only allow those devices that are needed for this specific installation. When installing directly into an LPAR the Linux installer has access to all the devices in that LPAR. If you have many DASD devices or network devices, it may be worthwhile to add this parameter to a manual installation parameter file as well.

The installation process follows these steps:

Using the HMC console, select Systems Management and then select the LPAR you wish to use for the installation. Under Recovery, select Load From Removable Media or Server, select FTP Server. Under Daily, select Operating System Messages. This brings up a separate tab allowing you to interact with the LPAR you are installing Linux into. From this point on, follow the examples provided, as a guide to the information you will need to provide for the Host Name, Username, Password, Protocol and File Path. Once you select OK, after you have provided the information for the FTP server and path, you will see a couple of confirmation messages, and then the installation process will begin. Messages will begin to appear on the Operating System Messages window when the installation begins. The Operating System Messages window can be opened before or after you begin your install.

Some notes on specific distributions and things to watch out for:

If you run the Red Hat Kickstart Automated Installation, with an option to halt at the end of a successful installation, you will see the following messages in the Operating System Messages Console when the process is complete. At this point, it is safe to IPL your new Linux system from the DASD you just installed.

[ 143.950489] anaconda[2581]: Running post-installation scripts

[ 143.950909] anaconda[2581]: .

[ 143.951010] anaconda[2581]: Use of this product is subject to the license agreement found at /usr/share/redhat-release/EULA”

For SuSE manual or semi-automated installations, make sure you do not have any autoyast.xml files in the installation directory. If one exists, the installation process will try to use it by default. If you utilize VNC during the installation process, but choose a text-only mode to run your new Linux server after installation, you will get a warning, during installation, which can be ignored.

When performing manual installations for any of the three supported Linux distributions, I prefer to use VNC for Red Hat, as the other methods have some restrictions. SSH or VNC can be used for SuSE, but SSH must only be used for Ubuntu, which will give you the full range of options during installation.

If you use parameter files to semi-automate a manual install, or you are using them to completely automate the installation process, make sure you don’t have any unprintable characters or extraneous spaces in the parameter file. I combined my parameter lines into one continuous line for all three distributions, and this work well for LPAR installations. There are limits on how long these parameter lines and files can be. It’s around 10 or 11 lines per file, and a total of 800 to 860 characters per file, depending on the distribution.

For Red Hat and SuSE, the second stage of the install process can use an NFS, FTP or HTTP server. The first stage is limited to using an FTP server or the HMC’s DVD drive, or using a SCSI attached DVD drive. For a Red Hat installation, you can enter all the parameters by hand through the Operating System Messages Console, or you can modify the genericdvd.prm file in the /images directory. You will need a valid network setup for Red Hat, or it will hang during the install just after finding the DASD/FCP devices.

For SuSE, you can enter all the parameters into the Operating System Messages Console for a manual installation. You can modify the parmfile, in the /boot/s390x directory of the SuSE installation directory, to semi- automate or automate the installation process.

For Ubuntu, if you perform an installation that uses the server as the FTP server, the HMC must be able to access the internet to perform. If you set up an installation that utilizes your own FTP server, then you will need to be able to reach the internet from the new Linux’s IP address during the install. Ubuntu uses the server by default, as an installation source. If it cannot, then you will need to set up an installation repository that the HMC can access within your network. Check the Ubuntu documentation at Ubuntu for more details. If you want to use the FTP server from the HMC Console, then use the following string in the file path section of the Load From Removable Media Screen on the HMC console – do not put a / before this string – This will install 18.04 – bionic release.


For Ubuntu, you may have to replace with the actual IP address (, depending on how your HMC network and/or your new Linux systems’ network is setup with DNS. Use nslookup or another utility to verify the IP address of

There is a good step-by-step guide at for installing Ubuntu directly into an LPAR. It’s based on Ubuntu 16.04, but any release can be used with these instructions… just change the xenial in the file path to bionic – 18.04 or cosmic – 19.04, etc.

For Ubuntu, when you use a local FTP server, you can enter all the parameters into the Operating System Messages Console for a manual installation. You can modify the parmfile.ubuntu in the boot directory of the Ubuntu installation directory to semi-automate or automate the installation process.

Installing Linux on IBM Z directly into an LPAR has many uses, especially for using KVM as a hypervisor and for running large Docker hosts. The installation process is easy and can be done in a matter of minutes, depending on how many software packages you are installing and how many disks you are formatting. The process can be as manual or as automated as you require. I hope that this short blog will help you get started with installing Linux on System Z directly into an LPAR. You can find the examples for the parameter files and examples of what needs to be provided on the Load from Removable Media or Server Screen on the HMC here.

More Information
As a Platinum IBM business partner, Mainline has extensive experience with IBM mainframe systems, and we can help you with z/VM, Linux on IBM Z and LinuxOne. To set up an in-depth discussion about how to get started using these technologies, please contact your Mainline Account Executive directly or click here to contact us with any questions.

Related Blogs:

» Capacity Planning for IBM z/VM on IBM z Systems

» Security Capabilities for z/VM and Linux Running on IBM Z

» IBM Z Leverages IFLs and Secure Service Container (SSC) for Analytics Platform

Submit a Comment

Your email address will not be published. Required fields are marked *