All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs/system/s390x: Add a chapter about s390x boot devices
@ 2020-08-06 15:05 Thomas Huth
  2020-08-10 10:18 ` Cornelia Huck
  2020-08-11 14:35 ` Cornelia Huck
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Huth @ 2020-08-06 15:05 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x; +Cc: qemu-devel

Booting on s390x is a little bit different compared to other architectures.
Let's add some information for people who are not yet used to this.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
 docs/system/target-s390x.rst      |  1 +
 2 files changed, 83 insertions(+)
 create mode 100644 docs/system/s390x/bootdevices.rst

diff --git a/docs/system/s390x/bootdevices.rst b/docs/system/s390x/bootdevices.rst
new file mode 100644
index 0000000000..68f0ffd450
--- /dev/null
+++ b/docs/system/s390x/bootdevices.rst
@@ -0,0 +1,82 @@
+Boot devices on s390x
+=====================
+
+Booting with bootindex parameter
+--------------------------------
+
+For classical mainframe guests (i.e. LPAR or z/VM installations), you always
+have to exactly specify the disk where you want to boot from (or "IPL" from,
+in s390x-speak -- IPL means "Initial Program Load"). Especially, there can
+also be only one boot device according to the architecture specification, thus
+specifying multiple boot devices is not possible (yet).
+
+So for booting an s390x guest in QEMU, you should always mark the
+device where you want to boot from with the ``bootindex`` property, for
+example::
+
+ qemu-system-s390x -drive if=none,id=dr1,file=guest.qcow2 \
+                   -device virtio-blk,drive=dr1,bootindex=1
+
+For booting from a CD-ROM ISO image (which needs to include El-Torito boot
+informatin for being bootable), it is recommended to specify a ``scsi-cd``
+device, for example like this::
+
+ qemu-system-s390x -blockdev file,node-name=c1,filename=... \
+                   -device virtio-scsi \
+                   -device scsi-cd,drive=c1,bootindex=1
+
+Note that you really have to use the ``bootindex`` property to select the
+boot device. The old-fashioned ``-boot order=...`` command of QEMU (and
+also ``-boot once=...``) is not supported on s390x.
+
+
+Booting without bootindex parameter
+-----------------------------------
+
+The QEMU guest firmware (the so-called s390-ccw bios) has also some rudimentary
+support for scanning through the available block devices. So in case you did
+not specify a boot device with the ``bootindex`` property, there is still a
+chance that it finds a bootable device on its own and starts a guest operating
+system from it. However, this scanning algorithm is still very rough and may
+be incomplete, so that it might fail to detect a bootable device in many cases.
+It is really recommended to always specify the boot device with the
+``bootindex`` property instead.
+
+This also means that you should avoid the classical short-cut commands like
+``-hda``, ``-cdrom`` or ``-drive if=virtio``, since it is not possible to
+specify the ``bootindex`` with these commands. Note that the convenience
+``-cdrom`` option even does not give you a real (virtio-scsi) CD-ROM device on
+s390x. Due to technical limitations in the QEMU code base, you will get a
+virtio-blk device with this parameter instead, which might not be the right
+device type for installing a Linux distribution via ISO image. It is
+recommended to specify a CD-ROM device via ``-device scsi-cd`` (as mentioned
+above) instead.
+
+
+Booting from a network device
+-----------------------------
+
+Beside the normal guest firmware (which is loaded from the file ``s390-ccw.img``
+in the data directory of QEMU, or via the ``-bios`` option), QEMU ships with
+a small TFTP network bootloader firmware for virtio-net-ccw devices, too. This
+firmware is loaded from a file called ``s390-netboot.img`` in the QEMU data
+directory. In case you want to load it from a different filename instead,
+you can specify it via the ``-global s390-ipl.netboot_fw=filename``
+command line option.
+
+The ``bootindex`` property is especially important for booting via the network.
+If you don't specify the the ``bootindex`` property here, the network bootloader
+firmware code won't get loaded into the guest memory so that the network boot
+will fail. For a successful network boot, try something like this::
+
+ qemu-system-s390x -netdev user,id=n1,tftp=...,bootfile=... \
+                   -device virtio-net-ccw,netdev=n1,bootindex=1
+
+The network bootloader firmware also has basic support for pxelinux.cfg-style
+configuration files. See the `PXELINUX Configuration page
+<https://wiki.syslinux.org/wiki/index.php?title=PXELINUX#Configuration>`__
+for details how to set up the configuration file on your TFTP server.
+The supported configuration file entries are ``DEFAULT``, ``LABEL``,
+``KERNEL``, ``INITRD`` and ``APPEND`` (see the `Syslinux Config file syntax
+<https://wiki.syslinux.org/wiki/index.php?title=Config>`__ for more
+information).
diff --git a/docs/system/target-s390x.rst b/docs/system/target-s390x.rst
index 644e404ef9..c636f64113 100644
--- a/docs/system/target-s390x.rst
+++ b/docs/system/target-s390x.rst
@@ -31,4 +31,5 @@ Architectural features
 ======================
 
 .. toctree::
+   s390x/bootdevices
    s390x/protvirt
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/system/s390x: Add a chapter about s390x boot devices
  2020-08-06 15:05 [PATCH] docs/system/s390x: Add a chapter about s390x boot devices Thomas Huth
@ 2020-08-10 10:18 ` Cornelia Huck
  2020-08-10 10:20   ` Philippe Mathieu-Daudé
  2020-08-11 14:35 ` Cornelia Huck
  1 sibling, 1 reply; 6+ messages in thread
From: Cornelia Huck @ 2020-08-10 10:18 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-s390x, qemu-devel

On Thu,  6 Aug 2020 17:05:07 +0200
Thomas Huth <thuth@redhat.com> wrote:

> Booting on s390x is a little bit different compared to other architectures.
> Let's add some information for people who are not yet used to this.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
>  docs/system/target-s390x.rst      |  1 +
>  2 files changed, 83 insertions(+)
>  create mode 100644 docs/system/s390x/bootdevices.rst
> 
> diff --git a/docs/system/s390x/bootdevices.rst b/docs/system/s390x/bootdevices.rst
> new file mode 100644
> index 0000000000..68f0ffd450
> --- /dev/null
> +++ b/docs/system/s390x/bootdevices.rst
> @@ -0,0 +1,82 @@
> +Boot devices on s390x
> +=====================
> +
> +Booting with bootindex parameter
> +--------------------------------
> +
> +For classical mainframe guests (i.e. LPAR or z/VM installations), you always
> +have to exactly specify the disk where you want to boot from (or "IPL" from,

s/exactly/explictly/ ?

> +in s390x-speak -- IPL means "Initial Program Load"). Especially, there can

s/Especially/In particular/ ?

> +also be only one boot device according to the architecture specification, thus
> +specifying multiple boot devices is not possible (yet).
> +
> +So for booting an s390x guest in QEMU, you should always mark the
> +device where you want to boot from with the ``bootindex`` property, for
> +example::
> +
> + qemu-system-s390x -drive if=none,id=dr1,file=guest.qcow2 \
> +                   -device virtio-blk,drive=dr1,bootindex=1
> +
> +For booting from a CD-ROM ISO image (which needs to include El-Torito boot
> +informatin for being bootable), it is recommended to specify a ``scsi-cd``

s/informatin for being/information in order to be/

> +device, for example like this::
> +
> + qemu-system-s390x -blockdev file,node-name=c1,filename=... \
> +                   -device virtio-scsi \
> +                   -device scsi-cd,drive=c1,bootindex=1
> +
> +Note that you really have to use the ``bootindex`` property to select the
> +boot device. The old-fashioned ``-boot order=...`` command of QEMU (and
> +also ``-boot once=...``) is not supported on s390x.

(...)

This looks good to me, and is certainly helpful. I can fix the nits
myself and apply it.

There's also some documentation regarding DASD IPL in the devel guide;
but as that is mostly helpful for people actually working with the
code, I don't think that it makes sense to cross-reference it.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/system/s390x: Add a chapter about s390x boot devices
  2020-08-10 10:18 ` Cornelia Huck
@ 2020-08-10 10:20   ` Philippe Mathieu-Daudé
  2020-08-10 10:29     ` Cornelia Huck
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-08-10 10:20 UTC (permalink / raw)
  To: Cornelia Huck, Thomas Huth; +Cc: qemu-s390x, qemu-devel

On 8/10/20 12:18 PM, Cornelia Huck wrote:
> On Thu,  6 Aug 2020 17:05:07 +0200
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> Booting on s390x is a little bit different compared to other architectures.
>> Let's add some information for people who are not yet used to this.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
>>  docs/system/target-s390x.rst      |  1 +
>>  2 files changed, 83 insertions(+)
>>  create mode 100644 docs/system/s390x/bootdevices.rst
>>
>> diff --git a/docs/system/s390x/bootdevices.rst b/docs/system/s390x/bootdevices.rst
>> new file mode 100644
>> index 0000000000..68f0ffd450
>> --- /dev/null
>> +++ b/docs/system/s390x/bootdevices.rst
>> @@ -0,0 +1,82 @@
>> +Boot devices on s390x
>> +=====================
>> +
>> +Booting with bootindex parameter
>> +--------------------------------
>> +
>> +For classical mainframe guests (i.e. LPAR or z/VM installations), you always
>> +have to exactly specify the disk where you want to boot from (or "IPL" from,
> 
> s/exactly/explictly/ ?

Or "to explicit the disk ..."?

> 
>> +in s390x-speak -- IPL means "Initial Program Load"). Especially, there can
> 
> s/Especially/In particular/ ?
> 
>> +also be only one boot device according to the architecture specification, thus
>> +specifying multiple boot devices is not possible (yet).
>> +
>> +So for booting an s390x guest in QEMU, you should always mark the
>> +device where you want to boot from with the ``bootindex`` property, for
>> +example::
>> +
>> + qemu-system-s390x -drive if=none,id=dr1,file=guest.qcow2 \
>> +                   -device virtio-blk,drive=dr1,bootindex=1
>> +
>> +For booting from a CD-ROM ISO image (which needs to include El-Torito boot
>> +informatin for being bootable), it is recommended to specify a ``scsi-cd``
> 
> s/informatin for being/information in order to be/
> 
>> +device, for example like this::
>> +
>> + qemu-system-s390x -blockdev file,node-name=c1,filename=... \
>> +                   -device virtio-scsi \
>> +                   -device scsi-cd,drive=c1,bootindex=1
>> +
>> +Note that you really have to use the ``bootindex`` property to select the
>> +boot device. The old-fashioned ``-boot order=...`` command of QEMU (and
>> +also ``-boot once=...``) is not supported on s390x.
> 
> (...)
> 
> This looks good to me, and is certainly helpful. I can fix the nits
> myself and apply it.
> 
> There's also some documentation regarding DASD IPL in the devel guide;
> but as that is mostly helpful for people actually working with the
> code, I don't think that it makes sense to cross-reference it.
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/system/s390x: Add a chapter about s390x boot devices
  2020-08-10 10:20   ` Philippe Mathieu-Daudé
@ 2020-08-10 10:29     ` Cornelia Huck
  2020-08-10 10:38       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Cornelia Huck @ 2020-08-10 10:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Thomas Huth, qemu-s390x, qemu-devel

On Mon, 10 Aug 2020 12:20:53 +0200
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> On 8/10/20 12:18 PM, Cornelia Huck wrote:
> > On Thu,  6 Aug 2020 17:05:07 +0200
> > Thomas Huth <thuth@redhat.com> wrote:
> >   
> >> Booting on s390x is a little bit different compared to other architectures.
> >> Let's add some information for people who are not yet used to this.
> >>
> >> Signed-off-by: Thomas Huth <thuth@redhat.com>
> >> ---
> >>  docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
> >>  docs/system/target-s390x.rst      |  1 +
> >>  2 files changed, 83 insertions(+)
> >>  create mode 100644 docs/system/s390x/bootdevices.rst
> >>
> >> diff --git a/docs/system/s390x/bootdevices.rst b/docs/system/s390x/bootdevices.rst
> >> new file mode 100644
> >> index 0000000000..68f0ffd450
> >> --- /dev/null
> >> +++ b/docs/system/s390x/bootdevices.rst
> >> @@ -0,0 +1,82 @@
> >> +Boot devices on s390x
> >> +=====================
> >> +
> >> +Booting with bootindex parameter
> >> +--------------------------------
> >> +
> >> +For classical mainframe guests (i.e. LPAR or z/VM installations), you always
> >> +have to exactly specify the disk where you want to boot from (or "IPL" from,  
> > 
> > s/exactly/explictly/ ?  
> 
> Or "to explicit the disk ..."?

Hm, not sure what that means?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/system/s390x: Add a chapter about s390x boot devices
  2020-08-10 10:29     ` Cornelia Huck
@ 2020-08-10 10:38       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-08-10 10:38 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: Thomas Huth, qemu-s390x, qemu-devel

On 8/10/20 12:29 PM, Cornelia Huck wrote:
> On Mon, 10 Aug 2020 12:20:53 +0200
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> 
>> On 8/10/20 12:18 PM, Cornelia Huck wrote:
>>> On Thu,  6 Aug 2020 17:05:07 +0200
>>> Thomas Huth <thuth@redhat.com> wrote:
>>>   
>>>> Booting on s390x is a little bit different compared to other architectures.
>>>> Let's add some information for people who are not yet used to this.
>>>>
>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>> ---
>>>>  docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
>>>>  docs/system/target-s390x.rst      |  1 +
>>>>  2 files changed, 83 insertions(+)
>>>>  create mode 100644 docs/system/s390x/bootdevices.rst
>>>>
>>>> diff --git a/docs/system/s390x/bootdevices.rst b/docs/system/s390x/bootdevices.rst
>>>> new file mode 100644
>>>> index 0000000000..68f0ffd450
>>>> --- /dev/null
>>>> +++ b/docs/system/s390x/bootdevices.rst
>>>> @@ -0,0 +1,82 @@
>>>> +Boot devices on s390x
>>>> +=====================
>>>> +
>>>> +Booting with bootindex parameter
>>>> +--------------------------------
>>>> +
>>>> +For classical mainframe guests (i.e. LPAR or z/VM installations), you always
>>>> +have to exactly specify the disk where you want to boot from (or "IPL" from,  
>>>
>>> s/exactly/explictly/ ?  
>>
>> Or "to explicit the disk ..."?
> 
> Hm, not sure what that means?

Sorry I thought it was a verb, but the verb is explicitize.

"to explicitly specify" sounds good (typo fixed).



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] docs/system/s390x: Add a chapter about s390x boot devices
  2020-08-06 15:05 [PATCH] docs/system/s390x: Add a chapter about s390x boot devices Thomas Huth
  2020-08-10 10:18 ` Cornelia Huck
@ 2020-08-11 14:35 ` Cornelia Huck
  1 sibling, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2020-08-11 14:35 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-s390x, qemu-devel

On Thu,  6 Aug 2020 17:05:07 +0200
Thomas Huth <thuth@redhat.com> wrote:

> Booting on s390x is a little bit different compared to other architectures.
> Let's add some information for people who are not yet used to this.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  docs/system/s390x/bootdevices.rst | 82 +++++++++++++++++++++++++++++++
>  docs/system/target-s390x.rst      |  1 +
>  2 files changed, 83 insertions(+)
>  create mode 100644 docs/system/s390x/bootdevices.rst

Thanks, queued with wording nits fixed.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-11 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 15:05 [PATCH] docs/system/s390x: Add a chapter about s390x boot devices Thomas Huth
2020-08-10 10:18 ` Cornelia Huck
2020-08-10 10:20   ` Philippe Mathieu-Daudé
2020-08-10 10:29     ` Cornelia Huck
2020-08-10 10:38       ` Philippe Mathieu-Daudé
2020-08-11 14:35 ` Cornelia Huck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.