Features/S390xNetworkBoot: Difference between revisions

From QEMU
(Created page with "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 boo...")
 
(fix up formatting with newer mediawiki)
 
(7 intermediate revisions by 2 users not shown)
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 is targeted for 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.


== Building s390-netboot.img ==
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,bootindex=1
 
or, with libvirt
 
  ...
  <interface type='network'>
    <source network='default'/>
    <model type='virtio'/>
    <boot order='1'>
  </interface>
  ...
 
== Building a s390 network bootable binary ==
 
A s390 operating system image usable for network booting can be built from an initial ramdisk and a kernel image. These can be taken from any existing s390 system.
 
One way to build an image is to take a kernel and an installer initial ramdisk from a distribution's DVD/ISO and concatenate them. Some fixups are necessary in the new binary. Both, concatenation and fixups can be done by using the script in [https://github.com/ibm-s390-tools/s390-tools/blob/master/netboot/mk-s390image]. Booting the resulting 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 [https://github.com/ibm-s390-tools/s390-tools/tree/master/netboot]. The site also contains a script assisting in the creation of such an initial ramdisk.

Latest revision as of 17:48, 15 April 2020

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,bootindex=1

or, with libvirt

  ...
  <interface type='network'>
    <source network='default'/>
    <model type='virtio'/>
    <boot order='1'>
  </interface>
  ...

Building a s390 network bootable binary

A s390 operating system image usable for network booting can be built from an initial ramdisk and a kernel image. These can be taken from any existing s390 system.

One way to build an image is to take a kernel and an installer initial ramdisk from a distribution's DVD/ISO and concatenate them. Some fixups are necessary in the new binary. Both, concatenation and fixups can be done by using the script in [1]. Booting the resulting 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.