Network installation of SuSE 15 (sle15) on POWER LPAR

I already wrote about network deployment of SuSE 11 and 12 for the POWER platform. Installing SLE15 is slightly different from previous versions due to the use of GRUB instead of "yaboot". Maybe you can still get yaboot to work with SLE15, but let's look at the new network boot method offered by SuSE.

Building PXE

I will build PXE on SLE15 itself, although you can use any other PXE for this. I just will use this opportunity to check what is required in SLE15 to build the PXE from the ground.

Registering your system and install software

I used only the first installation disk for the initial installation and therefore I have the minial OS installed. This system is almost unusable without the addition of software. I will register this system to install missing packages online.

# SUSEConnect -r REGISTRATIONCODE -e your@email # --debug
 ..
Successfully registered system.

Now you need to select additional modules for the subscription. To view available extensions and modules:

# SUSEConnect --list-extensions

You should add Legacy Module 15 x86_64, Server Applications Module and SUSE Package Hub 15 x86_64 repository for this installation:

# SUSEConnect -p sle-module-legacy/15/x86_64 -p sle-module-server-applications/15/x86_64 -p PackageHub/15/x86_64

Finally lets install missing software that will be used during this HOWTO:

# zypper in rsyslog YaST man vim iputils net-tools-deprecated rsync \
xinetd tftp yast2-tftp-server apache2 dhcp-server syslinux autoyast2 

The first line includes tools that hard to live without, and the second line are required services.

Copy installation media

This PXE server will service the installation for both architectures. Thus I downloaded two CDs for both architectures: the installer and the packages. Instead of copying the contents of the CD, I will mount the CD directly in the right place. I have to mount four CDs. But which CD contains which image? Let's check:

# lsblk -f /dev/sr?
NAME FSTYPE  LABEL                            UUID                   MOUNTPOINT
sr0  iso9660 SLE-15-Installer-DVD-x86_646.001 2018-06-20-13-49-39-18
sr1  iso9660 SLE-15-Installer-DVD-ppc64le.001 2018-06-20-13-53-22-12
sr2  iso9660 SLE-15-Packages-ppc64le-Media1   2018-06-20-16-59-47-97
sr3  iso9660 SLE-15-Packages-x86_64-Media1    2018-06-20-17-36-23-02

Lets fix /etc/fstab using this LABEL information as:

 ..
LABEL="SLE-15-Installer-DVD-x86_646.001" /srv/www/htdocs/SLE15.x86_64           auto    defaults        0 0
LABEL="SLE-15-Packages-x86_64-Media1"    /srv/www/htdocs/SLE15.x86_64.Packages  auto    defaults        0 0
LABEL="SLE-15-Installer-DVD-ppc64le.001" /srv/www/htdocs/SLE15.ppc64le          auto	defaults	0 0
LABEL="SLE-15-Packages-ppc64le-Media1"   /srv/www/htdocs/SLE15.ppc64le.Packages auto	defaults	0 0

And, mount it:

sle15:~ # mkdir -p /srv/www/htdocs/SLE15.{x86_64,ppc64le}{,.Packages}
sle15:~ # mount -a

Configure TFTP

Edit the /etc/sysconfig/tftp file. Here you can set another location for the TFTP root (/srv/tftpboot by default). I have no problem with the default location, the only thing I changed here is an increase verbosity level of log for debugging boot process.

 ..
TFTP_OPTIONS="-v "
 ..

Enable tftp service and start it:

# systemctl enable tftp.socket
# systemctl enable xinetd.service
# systemctl start xinetd.service

Check that you can retrieve file and see log of that:

sle15:~ # cd /tmp
sle15:/tmp # echo hello > /srv/tftpboot/aaa
sle15:/tmp # tftp localhost
tftp> get aaa
tftp> quit
sle15:/tmp # cat aaa
hello
sle15:/tmp # tail /var/log/messages
2018-11-09T12:16:49.699356+02:00 sle15 systemd[1]: Started Tftp Server.
2018-11-09T12:16:49.704655+02:00 sle15 in.tftpd[1758]: RRQ from 127.0.0.1 filename aaa
sle15:/tmp # rm -f /srv/tftpboot/aaa

Once TFTP works, populate the TFTP directory:

# rsync -av /srv/www/htdocs/SLE15.ppc64le/boot /srv/tftpboot/	# <- for Power
# rsync -av /srv/www/htdocs/SLE15.x86_64/boot /srv/tftpboot/	# <- for x86 (BIOS and EFI)
# rsync -av /srv/www/htdocs/SLE15.x86_64/EFI /srv/tftpboot/	# <- for x86 EFI loader.

Configure apache2

The default configuration suits well and probably does not require changes. The only change I made helps me view the content through the browser. The installer itself does not list directories, but searches for specific files and, therefore, this change is not required.

The change is in /etc/apache2/default-server.conf. Replace Options None to Options Indexes.

Then enable and restart http service:

# systemctl enable apache2.service
# systemctl start apache2.service

DHCP configuration

Here is my /etc/dhcpd.conf

# cat /etc/dhcpd.conf
allow booting;
allow bootp;
ddns-update-style none;
default-lease-time 14400;
deny unknown-clients;

subnet 192.168.0.0 netmask 255.255.255.0 {
        option domain-name "localdomain";
        #option domain-name-servers 192.168.0.1;
        option routers          192.168.0.1;
        #option ntp-servers      192.168.0.1;
        option subnet-mask      255.255.255.0;
        next-server     192.168.0.1;
        pool {
                range dynamic-bootp 192.168.0.25 192.168.0.26 ;
                host intel-EFI {
                        hardware ethernet 52:54:00:e7:1d:ab;
                        fixed-address   192.168.0.13;
			filename        "/EFI/BOOT/bootx64.efi";
                }
                host intel {
                        hardware ethernet 52:54:00:e7:1d:ad;
                        fixed-address   192.168.0.12;
                        filename        "/boot/x86_64/pxelinux.0";
                }
                host ppc {
                        hardware ethernet 52:54:00:53:36:51;
                        fixed-address   192.168.0.11;
                        filename        "/boot/ppc64le/grub2-ieee1275/core.elf";
                }
        }
}

Important NOTE!

Fix /etc/sysconfig/dhcpd to bind DHCP to the correct network interface, otherwise the service will not start without a clear explanation why:

 ..
DHCPD_INTERFACE="eth1"
 ..

Then enable and start DHCP server:

# systemctl enable dhcpd.service

Deploing SLE15 on POWER LPAR

During the initial boot, the GRUB bootloader is loaded from the network via TFTP. The GRUB continues to boot according to its configuration file /boot/ppc64le/grub2-ieee1275/grub.cfg, that sits on server in the TFTP root : /srv/tftpboot. We need to customize this file, indicating the location of our installation sources:

# cat /srv/tftpboot/boot/ppc64le/grub2-ieee1275/grub.cfg
with_gfx=0

gfxmode=auto
locale_dir=$prefix/locale
lang=en_US

set default='Installation'

insmod gettext

if sleep --interruptible 0 ; then
  timeout=20
fi

menuentry 'Installation' --class opensuse --class gnu-linux --class gnu --class os {
  echo 'Loading kernel ...'
  linux /boot/ppc64le/linux install=http://192.168.0.1/SLE15.ppc64le autoyast=http://192.168.0.1/autoyast.sle15.ppc64le.xml
# linux /boot/ppc64le/linux install=http://192.168.0.1/SLE15.ppc64le vnc=1 vncpassword=P@ssw0rd
  echo 'Loading initial ramdisk ...'
  initrd /boot/ppc64le/initrd
}

menuentry 'Rescue System' $arch --class opensuse --class gnu-linux --class gnu {
  echo 'Loading kernel ...'
  linux /boot/ppc64le/linux rescue=1 install=http://192.168.0.1/SLE15.ppc64le
  echo 'Loading initial ramdisk ...'
  initrd /boot/ppc64le/initrd
}

menuentry 'Upgrade' $arch --class opensuse --class gnu-linux --class gnu {
  echo 'Loading kernel ...'
  linux /boot/ppc64le/linux upgrade=1 install=http://192.168.0.1/SLE15.ppc64le
  echo 'Loading initial ramdisk ...'
  initrd /boot/ppc64le/initrd
}

menuentry 'local' {
  exit
}

submenu 'Other options...' {
 menuentry 'Reboot' {
 reboot
 }

 menuentry 'Exit to Open Firmware' {
 exit
 }
}

My changes to the source file are in bold. Green options are required to start the installation using the VNC GUI. The red parameter will start unattended installation using autoyast feature.

Autoyast

Nice documentation could be found here

And this is mine working example, that install SuSE fro SAP application. You must correct at least the IP address of the installation server before you can use it.

Deploying SLE15 on Intel

I have no server with EFI boot to test it. I think this is about to edit /srv/tftpboot/EFI/BOOT/grub.cfg with similar parameters as for grub.cfg for POWER.

When deploying Intel via classic PXE loader you have to use pxelinux loader. Copy it to TFTP root:

# cp -v /usr/share/syslinux/pxelinux.0 /srv/tftpboot/boot/x86_64/
# cp -v /usr/share/syslinux/vesamenu.c32 /srv/tftpboot/boot/x86_64/
# mkdir /srv/tftpboot/boot/x86_64/pxelinux.cfg

And create it's menu configuration file:

# cat > /srv/tftpboot/boot/x86_64/pxelinux.cfg/default << EOFcat
default vesamenu.c32
timeout 600

LABEL local
  MENU LABEL Boot from local drive
  MENU DEFAULT
  localboot -2

LABEL linux
  MENU LABEL Interactive Install
  kernel loader/linux
  append initrd=loader/initrd splash=none showopts install=http://192.168.0.1/SLE15.x86_64
  IPAPPEND 2

LABEL autoyast
  MENU LABEL Install SuSE for SAP using autoyast
  kernel loader/linux
  append initrd=loader/initrd install=http://192.168.0.1/SLE15.x86_64 autoyast=http://192.168.0.1/autoyast.sle15.x86_64.xml
  IPAPPEND 2

LABEL upgrade
  MENU LABEL Upgrade
  kernel loader/linux
  append initrd=loader/initrd splash=none upgrade=1 showopts install=http://192.168.0.1/SLE15.x86_64
  IPAPPEND 2

LABEL rescue
  MENU LABEL boot Rescue disk
  kernel loader/linux
  append initrd=loader/initrd splash=none rescue=1 showopts install=http://192.168.0.1/SLE15.x86_64
  IPAPPEND 2
EOFcat

The autoyast file used here is a full copy of autoyast used for POWER, with URL fixed to pointing on x86_64 sources.


Updated on Mon Nov 19 20:50:20 IST 2018 More documentations here