Share with friends and colleagues on social media

SLES 11 is still heavily in use today. Until now, there wasn’t an easy upgrade path for getting your servers to the latest and greatest without completely reinstalling them. But with the release of SLE15, it’s now of the one of the supported upgrade paths.

Check out the complete upgrade guide here.

I recently had a request from a customer to mass-upgrade (a lot) of virtual machines running SLES 11 SP4 to SLES 15. But since the supported upgrade path in this case must be done offline, that would mean a lot of manual labor interacting with the installer. AutoYaST to the rescue!

We already have this guide that deals specifically with automatic upgrades using AutoYaST. But things are a bit… different with SLE15. The repositories now follow a highly modular layout. That means that you no longer can rely on upgrading with just the main DVD media anymore.

SLE 15 has a base “Installer” media, that’s used to install all SUSE products. Even SLES, SLED, or SLES for SAP are now “modules” that can be added during the installation process. In fact, they are regular add-on products, and we can deal with that in AutoYaST.

So, in order to create an upgrade media, we will need to follow these steps.

First, we copy the contents of the Installer media ISO to a temporary directory:


# mount -o loop SLE-15-Installer-x86_64.iso /mnt
# cd tmp
# mkdir iso
# cp -dpRv /mnt .
# umount /mnt

Then, we need to copy the contents of the Packages media ISO to a sub-directory “packages” inside the temporary directory we created earlier:


# mount -o loop SLE-15-Packages-x86_64-GM-DVD1.iso /mnt
# cd tmp/iso
# mkdir packages
# cd packages
# cp -dpRv /mnt .
# umount /mnt

Then, we need a proper AutoYaST profile. This one was built specifically for SLES:
unattended-upgrade-sle15

Note that all URLs inside the AutoYaST profile use the “relurl://” scheme, so it should work from anywhere, including HTTP.

The autoinst.xml file must go to the root directory of the ISO.

I also altered isolinux.cfg, which is the configuration file for the startup menu on the ISO, so it automatically starts the upgrade process without manual interaction. This file goes into the boot/x86_64/loader directory.

Finally, we can create the upgrade ISO:


# cd ~/tmp/iso
# cp ~/autoinst.xml .
# cp ~/isolinux.cfg boot/x86_64/loader/

(optional for EFI support)
# mkdir -p /tmp/efi
# mount -o loop boot/x86_64/efi /tmp/efi
# cp ~/grub.cfg /tmp/efi/EFI/BOOT/
# umount /tmp/efi

# cd ..
# mkisofs -o sle15upgrade.iso -udf -f -r -gui -graft-points -b boot/x86_64/loader/isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -eltorito-platform 0xEF -eltorito-boot boot/x86_64/efi -no-emul-boot -V SLE15UPGRADE iso

Note that our mkisofs line has TWO boot entries. One points to the regular ISOLINUX binary, but the second one points to the “efi” image on the media. This is necessary in order to properly boot our media on UEFI-compliant machines.

IMPORTANT: the EFI support requires a newer mkisofs than the one available under SLE12! The “-eltorito-platform” parameter is responsible for defining the ID for a “partition” inside the ISO to be recognized as a valid EFI partition. Please use openSUSE Leap 15, SLE15 or other distribution with an updated mkisofs utility.

The resulting ISO may be a bit big (7.9GB), but it should cover 99% of the cases.


Share with friends and colleagues on social media
Tags: ,
Category: Server, SUSE Linux Enterprise Server
This entry was posted Wednesday, 8 August, 2018 at 9:19 pm
You can follow any responses to this entry via RSS.

Comments

  • Martin Weiss says:

    Did you also customize the EFI boot with the isolinux.cfg or how does the automatic start of the upgrade work on EFI systems?

    • Erico Mendonca says:

      Good catch. Even though I’m creating the ISO with the EFI boot as well, I did not change the grub.cfg with the correct parameters. I’ll change it and amend the article.

      Thanks!

  • Erico Mendonca says:

    Replying to myself: added the grub.cfg file for the autoupgrade. If you have problems, contact me.

  • Matthias M says:

    two problems:
    – there is no boot/loader/x86_64/ in /tmp/iso only boot/x86_64/loader
    – mkisofs (genisoimage) from cdrkit-cdrtools-compat version 1.1.11-24.15 in SLES12SP3 doesn’t support -eltorito-platform and some other options. ironically mkisofs from SLES15 does ….

    • Erico Mendonca says:

      Thanks. I fixed the wrong path. About mkisofs, indeed the version that ships with SLE12 does not support the -eltorito-platform parameter. It’s required for EFI support.
      I’ll try to compile the newest cdrtools package on OBS and submit it to Backports:SLE-12.

  • Matthias M says:

    Awesome – Thanks! 🙂

  • Erico Mendonca says:

    Unfortunately I cannot submit the cdrtools package to Backports:SLE-12, as it breaks one of the rules mandated by the Backports Packaging Policy (https://en.opensuse.org/openSUSE:Backports_Packaging_Policy): “no provides, obsoletes or conflicts”. It conflicts with the cdrkit-compat package. However, if you’d still want to use it, you may fetch it from my OBS directory: https://build.opensuse.org/package/show/home:emendonca/cdrtools

  • Leave a Reply

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