Contents


Enabling parallel Linux operating system deployment over a network on IBM PowerVM

Using grub2-mknetdir to generate a custom netboot folder

Comments

You can install Linux on IBM® PowerVM® logical partitions (LPARs) that are created on the IBM Power Systems™ servers by using the following methods:

  • Virtual DVD
  • DVD
  • Network

This article explains how you can perform parallel network Linux® operating system installation on PowerVM logical partitions by using the Grand Unified Bootloader (GRUB) command, grub2-mknetdir.

Each Linux distribution provides an ISO image for installation. This ISO image contains the core.elf file that is located under a specific directory structure. This file and other files under the directory are necessary for starting the installation through the network.

Each Linux distribution follows a unique directory structure that provides the required files for the initial network-based boot.

Table 1. Directory structure for different Linux distributions
Distributioncore.elf file path from TFTP root
Red Hat Enterprise Linux Server 7.x /boot/grub/powerpc-ieee1275/core.elf
SUSE Linux Enterprise Server 12.x /boot/ppc64le/grub2-ieee1275/core.elf
Ubuntu 16.04.xx LTS /install/netboot/ubuntu-installer/ppc64el/powerpc-ieee1275

In an end-to-end continuous integration (CI) environment, where the Linux operating system installation process is automated, there are limitations on parallel installation of different Linux operating system versions from the same Linux distribution by using a single Trivial File Transfer Protocol (TFTP) server. The restriction is due to the presence of the core.elf file in the same directory for both operating system versions. For example, both SUSE Linux Enterprise Server 12, Service Pack 1 and SUSE Linux Enterprise Server 12, Service Pack 2 have the core.elf file under the boot/ppc64le/grub2-ieee1275/ directory.

DHCP Server configuration for network boot

To perform a network-based installation of Linux on a PowerVM logical partition, you need a TFTP server and a Dynamic Host Configuration Protocol (DHCP) server. A TFTP server provides the required files to kickstart the Linux installation. The DHCP server is used to configure the network and to provide the TFTP server details to the Linux client. The TFTP and DHCP servers can reside either on the same system or on different systems.

Prerequisites

Copy the netboot folder and files from inflated Linux install ISO image to a specific directory on the TFTP server. A DHCP server configuration file is updated to point to the netboot files that are located on the TFTP server. The core.elf file is referenced in the DHCP server stanza.

Refer to the following sample DHCP server configuration stanza for SUSE Linux Enterprise Server 12 release.

Note: The line that contains the file name points to the default location of the core.elf file and other related files that are required for netboot.

subnet 192.168.192.0 netmask 255.255.255.0 {
   allow bootp;
   option routers 192.168.192.1;
   option domain-name-servers 192.168.1.200;
   option domain-name "mydomain.com";
   group {
       next-server 192.168.192.217;
               filename "boot/ppc64le/grub2-ieee1275/core.elf";
           host tuleta4u-lp1.mydomain.com {
               hardware ethernet aa:bb:cc:50:d8:02;
               fixed-address 192.168.192.210;
               option host-name "tuleta4u-lp1";
           option tftp-server-name "192.168.192.217";
       }
   }
}

How to enable parallel Linux operating system installation on PowerVM

To enable parallel installation, we have to make sure that the GRUB command picks up the core.elf file and the supported files from the custom location. Perform the following steps to create a custom folder for enabling parallel Linux installation:

  1. Set up the directory structure with files that are required for a network boot by using the GRUB command, grub2-mknetdir. GRUB is the default boot loader that is available with newer Linux distributions such as RHEL 7.x, SLES 12.x, and Ubuntu LTS Little Endian for IBM Power Architecture®.

    For SLES 12 Service Pack 1, generate the necessary files by running following command:

    # grub2-mknetdir --net-directory=/var/lib/tftpboot --subdir=sles12sp1/boot/ppc64le/grub2-ieee1275
    Netboot directory for powerpc-ieee1275 created. Configure your DHCP server to point to
    /var/lib/tftpboot/sles12sp1/boot/ppc64le/grub2-ieee1275/powerpc-ieee1275/core.elf
    #
  2. Repeat the previous step for SLES 12 Service Pack 2 release.
    # grub2-mknetdir --net-directory=/var/lib/tftpboot --subdir=sles12sp2/boot/ppc64le/grub2-ieee1275
    Netboot directory for powerpc-ieee1275 created. Configure your DHCP server to point to
    /var/lib/tftpboot/sles12sp2/boot/ppc64le/grub2-ieee1275/powerpc-ieee1275/core.elf
    #

    You can see the updated netboot directory structure in the hexdump of the core.elf file.

    Contents of the core.elf file from SLES 12 SP1:

    0026f10: 0101 0000 04a0 0000 0018 0000 0101 0000  ................
    0026f20: 0000 0000 0003 0000 0030 2f73 6c65 7331  .........0/sles1
    0026f30: 3273 7031 2f62 6f6f 742f 7070 6336 346c  2sp1/boot/ppc64l
    0026f40: 652f 6772 7562 322d 6965 6565 3132 3735  e/grub2-ieee1275
    0026f50: 0000 0000

    Contents of the core.elf file from SLES 12 SP2:

    0026f10: 0101 0000 04a0 0000 0018 0000 0101 0000  ................
    0026f20: 0000 0000 0003 0000 0030 2f73 6c65 7331  .........0/sles1
    0026f30: 3273 7032 2f62 6f6f 742f 7070 6336 346c  2sp2/boot/ppc64l
    0026f40: 652f 6772 7562 322d 6965 6565 3132 3735  e/grub2-ieee1275
    0026f50: 0000 0000                                ....
  3. Update the DHCP server configuration file to point to the new directory layout.

    Refer to the following updated DHCP server configuration file:

    subnet 192.168.192.0 netmask 255.255.255.0 {
       allow bootp;
       option routers 192.168.192.1;
       option domain-name-servers 192.168.1.200;
       option domain-name "mydomain.com"";
       group {
           next-server 192.168.192.217;
                   filename "sles12sp2/boot/ppc64le/grub2-ieee1275/powerpc-ieee1275/core.elf";
               host tuleta4u-lp2.mydomain.com {
                   hardware ethernet aa:bb:cc:50:d6:02;
                   fixed-address 192.168.192.210;
                   option host-name "tuleta4u-lp2";
               option tftp-server-name "192.168.192.217";
           }
       }
    }
    
    subnet 192.168.192.0 netmask 255.255.255.0 {
       allow bootp;
       option routers 192.168.192.1;
       option domain-name-servers 192.168.1.200;
       option domain-name "mydomain.com";
       group {
           next-server 192.168.192.217;
                   filename "sles12sp1/boot/ppc64le/grub2-ieee1275/ powerpc-ieee1275/core.elf";
               host tuleta4u-lp1.mydomain.com {
                   hardware ethernet aa:bb:cc:50:d8:02;
                   fixed-address 192.168.192.211;
                   option host-name "tuleta4u-lp1";
               option tftp-server-name "192.168.192.217";
           }
       }
    }

Conclusion

This article highlights the setup that you require for parallel network installation of different versions of the Linux operating system distributions that are running as guest on IBM PowerVM logical partitions.

References


Downloadable resources


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Linux
ArticleID=1050129
ArticleTitle=Enabling parallel Linux operating system deployment over a network on IBM PowerVM
publish-date=09212017