From Fedora Project Wiki

(update sample config and log output)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template:Associated_release_criterion|Beta|direct-kernel-boot}}
{{QA/Test_Case
{{QA/Test_Case
|description=This test confirms that you are able to install a system when booting the installer using '''only''' a kernel and initial ramdisk image.
|description=This is to verify that it is possible to boot [[Anaconda]] and install the system by direct kernel+initrd boot. That can be achieved either by using [http://en.wikipedia.org/wiki/Preboot_Execution_Environment PXE boot] or by booting the kernel directly in a virtual machine.
{{admon/note|Pxeboot Images Required|This test case requires having pxeboot images made available for a system. For further information on PXE, please see [http://en.wikipedia.org/wiki/Preboot_Execution_Environment http://en.wikipedia.org/wiki/Preboot_Execution_Environment]}}  
|setup=
<ol>
<li>You will need {{filename|vmlinuz}} and {{filename|initrd.img}} files. Those are located in the {{filename|(arch)/os/images/pxeboot}} directory of the tree for the Fedora compose you wish to test.</li>
<li>You will need a remote location containing Anaconda's {{filename|LiveOS/}} directory (containing the installer) and optionally also a package repository. Development composes are usually available at [http://dl.fedoraproject.org/pub/alt/stage/ dl.fedoraproject.org/pub/alt/stage/] (doesn't contain package repository). If you have a local mirror, you can make it accessible over any protocol supported by [[Anaconda_Boot_Options#repo|inst.repo]] boot option.</li>
<li>''Option 1:'' Set up a PXE server.
<ul>
  <li>This is not an easy task and requires some administrator knowledge. You can read the [https://docs.fedoraproject.org/en-US/fedora/f{{FedoraVersionNumber}}/install-guide/advanced/Network_based_Installations/ appropriate section in the Installation guide for Fedora {{FedoraVersionNumber}}].</li>
<li>The custom pxelinux config file can look like this:
{{#tag:pre|default vesamenu.c32
prompt 1
timeout 600
 
label linux
menu label ^Install Fedora
menu default
kernel fedora/vmlinuz
append initrd=fedora/initrd.img inst.repo=https://dl.fedoraproject.org/pub/alt/stage/{{FedoraVersionNumber|next}}_Beta-1.1/Server/x86_64/os/}}</li>
</ul>
</li>
<li>''Option 2:'' Boot kernel directly in a virtual machine.
<ul>
<li>Prepare a virtual machine that can boot kernel+initrd pair directly, e.g. using {{package|virt-manager}} (virt-manager has a ''Direct kernel boot'' field where you can specify the kernel, initrd and any boot options).<br/>
[[image:virt-manager-pxeboot.png|300px]]</li>
</ul>
</li>
</ol>
|actions=
|actions=
# Boot test system off the network using the kernel ({{filename|images/pxeboot/vmlinuz}}) and initial ramdisk image ({{filename|images/pxeboot/initrd.img}})
# Boot the system via PXE, or using a virtual machine with appropriate [[Anaconda_Boot_Options#repo|inst.repo]] boot argument (it has to point to the same compose you used for retrieving {{filename|vmlinuz}} and {{filename|initrd.img}}).
# When prompted, entry a language and keymap preference
# Proceed with installation.
# Choose an installation method (HTTP, NFS, hard drive etc...) and provide the requested information so anaconda can locate the installation repository. If selecting a network-based installation method, you may also be prompted to choose a network device and enter network parameters.
|results=
|results=
# Graphical boot menu is displayed for users to select install options. If no option is selected, the installer should load after a reasonable timeout
<ol>
# Installer boots into [http://fedoraproject.org/wiki/Anaconda/Stage loader] and prompts for language, keymap
<li>The system boots (using PXE or direct kernel boot in a virtual machine) and it downloads anaconda installer from the specified remote location.</li>
# Installer transitions to [http://fedoraproject.org/wiki/Anaconda/Stage anaconda] without error
<li>The installer starts correctly.</li>
# The installer utilizes the package repository at the provided installation source
<li>If the remote location contains a DNF repository, that repository is used for installation. This can be checked by examining the {{filename|/tmp/packaging.log}} file. Example output:
{{#tag:pre|
09:35:25,625 INF packaging: added repo: 'anaconda' - https://dl.fedoraproject.org/pub/alt/stage/31_Beta-1.1/Server/x86_64/os
09:35:25,647 DBG dnf: repo: downloading from remote: anaconda
09:35:27,161 INF packaging: enabled repo: '' - ['https://dl.fedoraproject.org/pub/alt/stage/31_Beta-1.1/Server/x86_64/os'] and got repomd
09:35:27,163 DBG dnf: repo: using cache for: anaconda
09:35:27,163 DBG packaging: repo anaconda: _sync_metadata success from ['https://dl.fedoraproject.org/pub/alt/stage/31_Beta-1.1/Server/x86_64/os']
09:35:27,165 DBG dnf: repo: using cache for: anaconda
05:35:50,985 DBG dnf: anaconda: using metadata from Tue 20 Aug 2019 02:34:29 AM EDT.
}}</li>
<li>The installation completes and the new system initiates boot properly</li>
</ol>
}}
}}


[[Category:Installer Boot Methods]]
[[Category:Installer Boot Methods]]
[[Category:Package_anaconda_test_cases]]
[[Category:Package_anaconda_test_cases]]

Latest revision as of 17:37, 20 August 2019

Note.png
Associated release criterion
This test case is associated with the Fedora_40_Beta_Release_Criteria#direct-kernel-boot release criterion. If you are doing release validation testing, a failure of this test case may be a breach of that release criterion. If so, please file a bug and nominate it as blocking the appropriate milestone, using the blocker bug nomination page.


Description

This is to verify that it is possible to boot Anaconda and install the system by direct kernel+initrd boot. That can be achieved either by using PXE boot or by booting the kernel directly in a virtual machine.

Setup

  1. You will need vmlinuz and initrd.img files. Those are located in the (arch)/os/images/pxeboot directory of the tree for the Fedora compose you wish to test.
  2. You will need a remote location containing Anaconda's LiveOS/ directory (containing the installer) and optionally also a package repository. Development composes are usually available at dl.fedoraproject.org/pub/alt/stage/ (doesn't contain package repository). If you have a local mirror, you can make it accessible over any protocol supported by inst.repo boot option.
  3. Option 1: Set up a PXE server.
    • This is not an easy task and requires some administrator knowledge. You can read the appropriate section in the Installation guide for Fedora 39.
    • The custom pxelinux config file can look like this:
      default vesamenu.c32
      prompt 1
      timeout 600
      
      label linux
      menu label ^Install Fedora
      menu default
      kernel fedora/vmlinuz
      append initrd=fedora/initrd.img inst.repo=https://dl.fedoraproject.org/pub/alt/stage/40_Beta-1.1/Server/x86_64/os/
  4. Option 2: Boot kernel directly in a virtual machine.
    • Prepare a virtual machine that can boot kernel+initrd pair directly, e.g. using Package-x-generic-16.pngvirt-manager (virt-manager has a Direct kernel boot field where you can specify the kernel, initrd and any boot options).
      Virt-manager-pxeboot.png

How to test

  1. Boot the system via PXE, or using a virtual machine with appropriate inst.repo boot argument (it has to point to the same compose you used for retrieving vmlinuz and initrd.img).
  2. Proceed with installation.

Expected Results

  1. The system boots (using PXE or direct kernel boot in a virtual machine) and it downloads anaconda installer from the specified remote location.
  2. The installer starts correctly.
  3. If the remote location contains a DNF repository, that repository is used for installation. This can be checked by examining the /tmp/packaging.log file. Example output:
    09:35:25,625 INF packaging: added repo: 'anaconda' - https://dl.fedoraproject.org/pub/alt/stage/31_Beta-1.1/Server/x86_64/os
    09:35:25,647 DBG dnf: repo: downloading from remote: anaconda
    09:35:27,161 INF packaging: enabled repo: '' - ['https://dl.fedoraproject.org/pub/alt/stage/31_Beta-1.1/Server/x86_64/os'] and got repomd
    09:35:27,163 DBG dnf: repo: using cache for: anaconda
    09:35:27,163 DBG packaging: repo anaconda: _sync_metadata success from ['https://dl.fedoraproject.org/pub/alt/stage/31_Beta-1.1/Server/x86_64/os']
    09:35:27,165 DBG dnf: repo: using cache for: anaconda
    05:35:50,985 DBG dnf: anaconda: using metadata from Tue 20 Aug 2019 02:34:29 AM EDT.
    
  4. The installation completes and the new system initiates boot properly