Features/S390xNetworkBoot: Difference between revisions

From QEMU
No edit summary
Line 3: Line 3:
== Overview ==
== Overview ==


The network boot feature enhances the s390x ipl device and the s390-ccw bios with support for booting via a virtio-net boot device. A new address is added to the ccw ipl block providing the address of a s390-netboot.img which performs the actual load over the network. This code has been included into QEMU since 2.9.
The network boot feature enhances the s390x ipl device and the s390-ccw bios with support for booting via a virtio-net boot device. A new address is added to the ccw ipl block providing the address of a s390-netboot.img (effectively a network boot ROM) which performs the actual load over the network. This code has been included into QEMU since 2.9.


Starting with 2.10 QEMU includes a pre-built s390-netboot.img based on the SLOF firmware, enabling network booting from a DHCP/TFTP server. As s390 network bootable images are not very common, this document gives a brief overview on how to build one.
Starting with 2.10 QEMU includes a pre-built network boot ROM based on the SLOF firmware, enabling network booting from a DHCP/TFTP server. As s390 network bootable operating system images are not very common at this point in time, this document also gives a brief overview on how to build one.


== Booting from a network interface ==
== Booting from a network interface ==

Revision as of 13:38, 12 September 2017

This is a short overview about using network boot for s390x.

Overview

The network boot feature enhances the s390x ipl device and the s390-ccw bios with support for booting via a virtio-net boot device. A new address is added to the ccw ipl block providing the address of a s390-netboot.img (effectively a network boot ROM) which performs the actual load over the network. This code has been included into QEMU since 2.9.

Starting with 2.10 QEMU includes a pre-built network boot ROM based on the SLOF firmware, enabling network booting from a DHCP/TFTP server. As s390 network bootable operating system images are not very common at this point in time, this document also gives a brief overview on how to build one.

Booting from a network interface

The network boot can't be triggered using the traditional -boot n command line option, but requires to specify the bootindex attribute on the network device. E.g.,

  qemu-system-s390x ... -device virtio-net-ccw,netdev=hostnet0,id=net0,mac=52:54:00:2d:b5:b5,devno=fe.0.0001,bootindex=1

or, with libvirt

  ...
  <interface type='network'>
    <mac address='52:54:00:2d:b5:b5'/>
    <source network='default'/>
    <model type='virtio'/>
    <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
    <boot order='1'>
  </interface>
  ...

Building a s390 network bootable binary

A s390 network bootable image can be built by bundling some shell scripts, busybox and the kexec binary bundled into an initial ramdisk and append that to a kernel image. An existing s390 system can be used as source.

One way to do that is to take a kernel and an installer initial ramdisk from a distribution's DVD/ISO and concatenate them. Some fixups are necessary int the new binary, which can be done by using the script in [1]. Booting this image would then start the installation process as if booted from the DVD.

Another possible way is to build a binary that behaves similar to the PXELINUX boot loader. In this case an initial ramdisk with an init process triggering the PXELINUX-like processing has to be built as described in [2]. The site also contains a script assisting in the creation of such an initial ramdisk.