From nobody Sun Nov 16 05:54:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598531054; cv=none; d=zohomail.com; s=zohoarc; b=Ae1ojQ7r0qXfvzN2Tn2zEVVjqwgIpLHYAqMPwWhuOyZxswCD7L0mUDY8VC0xZk/DkBoLv7e2PyTQK0sSIli4iP4wwj0wW+RwkDRlhoa1AJm+3/MQCMoFghRXUOAQr7WyytUkhAW0gvxmkvzQUEOk/o7jKc0hpxdq9zfQ3hwRA4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598531054; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4tA5BHPp7uHExLPVtXVQXblK5KKQzqh4fZgO8rO88uk=; b=diwlVTCUhlDhv/l07R3CmvcLmOBPE1adNdB7bt1x86rzhP/3WW9z7ojQZhgWIjN0v8ET2nkISvo28noXghpc5CPX5hLy9KmgTqoV8IavfO2ImQ593HQVrwpzqGLtoFbSZlJgmE73bBUVytplfYzqlKAIA++fv3wURWx5uyq9048= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598531054024728.9009595181842; Thu, 27 Aug 2020 05:24:14 -0700 (PDT) Received: from localhost ([::1]:46292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBGwu-0000IX-Ne for importer@patchew.org; Thu, 27 Aug 2020 08:24:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBGu5-00059J-RW for qemu-devel@nongnu.org; Thu, 27 Aug 2020 08:21:17 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:29234 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kBGu2-0003Z8-7t for qemu-devel@nongnu.org; Thu, 27 Aug 2020 08:21:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-496-8MuZllREObSXvvsoPQiHOQ-1; Thu, 27 Aug 2020 08:21:07 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C97F10ABDCA; Thu, 27 Aug 2020 12:21:06 +0000 (UTC) Received: from localhost (ovpn-113-237.ams2.redhat.com [10.36.113.237]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E5B297A1E4; Thu, 27 Aug 2020 12:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598530872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4tA5BHPp7uHExLPVtXVQXblK5KKQzqh4fZgO8rO88uk=; b=eQe4kFCpFZqWJxUwHtIKTpB7WkkDb4RzwH2fdvkAV5pb8Mwia40f/wT/Uc1FkK3eMRGFYk BAN07roJwbjp2MPvxUZcSqXOePu20nbsVwPdqeWT3iYxYYxpzNdYsooPaNcxomcu4j78Ph DBYco4ivTkfLPwmdzl5YQOBawPDV7XY= X-MC-Unique: 8MuZllREObSXvvsoPQiHOQ-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 2/3] docs/system/s390x: Add a chapter about s390x boot devices Date: Thu, 27 Aug 2020 14:20:56 +0200 Message-Id: <20200827122057.232662-3-cohuck@redhat.com> In-Reply-To: <20200827122057.232662-1-cohuck@redhat.com> References: <20200827122057.232662-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 07:16:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.959, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-s390x@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Thomas Huth 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 Message-Id: <20200806150507.12073-1-thuth@redhat.com> [CH: minor wording tweaks] Signed-off-by: Cornelia Huck --- 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/bootdevi= ces.rst new file mode 100644 index 000000000000..9e591cb9dc36 --- /dev/null +++ b/docs/system/s390x/bootdevices.rst @@ -0,0 +1,82 @@ +Boot devices on s390x +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Booting with bootindex parameter +-------------------------------- + +For classical mainframe guests (i.e. LPAR or z/VM installations), you alwa= ys +have to explicitly specify the disk where you want to boot from (or "IPL" = from, +in s390x-speak -- IPL means "Initial Program Load"). In particular, 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=3Dnone,id=3Ddr1,file=3Dguest.qcow2 \ + -device virtio-blk,drive=3Ddr1,bootindex=3D1 + +For booting from a CD-ROM ISO image (which needs to include El-Torito boot +information in order to be bootable), it is recommended to specify a ``scs= i-cd`` +device, for example like this:: + + qemu-system-s390x -blockdev file,node-name=3Dc1,filename=3D... \ + -device virtio-scsi \ + -device scsi-cd,drive=3Dc1,bootindex=3D1 + +Note that you really have to use the ``bootindex`` property to select the +boot device. The old-fashioned ``-boot order=3D...`` command of QEMU (and +also ``-boot once=3D...``) is not supported on s390x. + + +Booting without bootindex parameter +----------------------------------- + +The QEMU guest firmware (the so-called s390-ccw bios) has also some rudime= ntary +support for scanning through the available block devices. So in case you d= id +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 opera= ting +system from it. However, this scanning algorithm is still very rough and m= ay +be incomplete, so that it might fail to detect a bootable device in many c= ases. +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=3Dvirtio``, 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 devic= e 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 mention= ed +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 wi= th +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=3Dfilename`` +command line option. + +The ``bootindex`` property is especially important for booting via the net= work. +If you don't specify the the ``bootindex`` property here, the network boot= loader +firmware code won't get loaded into the guest memory so that the network b= oot +will fail. For a successful network boot, try something like this:: + + qemu-system-s390x -netdev user,id=3Dn1,tftp=3D...,bootfile=3D... \ + -device virtio-net-ccw,netdev=3Dn1,bootindex=3D1 + +The network bootloader firmware also has basic support for pxelinux.cfg-st= yle +configuration files. See the `PXELINUX Configuration page +`= __ +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 +`__ for more +information). diff --git a/docs/system/target-s390x.rst b/docs/system/target-s390x.rst index 644e404ef9fd..c636f64113d7 100644 --- a/docs/system/target-s390x.rst +++ b/docs/system/target-s390x.rst @@ -31,4 +31,5 @@ Architectural features =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 .. toctree:: + s390x/bootdevices s390x/protvirt --=20 2.25.4