From Fedora Project Wiki

Associated release criterion
This test case is associated with the Basic_Release_Criteria#Initialization_requirements 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 test verifies that a Fedora ISO image can be written to a USB stick with Fedora Media Writer, and successfully boots and installs.

Data loss
Any data on the USB stick used for this test is likely to be destroyed. Please do not use a stick whose contents you need to keep.

Setup

  1. Ensure you have a USB stick larger than the image file, and whose contents you can afford to lose (the contents of the stick will be destroyed as a part of the test).
  2. Install Fedora Media Writer (FMW):
    • On Fedora, install the mediawriter RPM package:
      sudo dnf install mediawriter
    • To test the Flathub version, install it the Flathub package on any Linux distribution.
      flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
      flatpak install flathub org.fedoraproject.MediaWriter
    • On Windows, visit the project download page, download the latest release and install it.
    • On macOS, visit the project download page and download the dmg file.

Image metadata alteration (optional)

If you want to test FMW's downloading capabilities on a pre-release image (e.g. a Beta or nightly image), you need to alter its image metadata. Please note this is necessary only when you want to test the FMW download process, otherwise you can simply download such image manually and provide it through a file open dialog. The metadata can be altered this way:

  1. Download releases.json
  2. Edit the file, add a new entry to the list (after the initial bracket) with a link to desired Fedora pre-release ISO and be sure to set proper version, for example:
    [{"link": "https://.../Fedora-Workstation-Live-44-1.1.x86_64.iso", "subvariant": "Workstation", "version": "44", "arch": "x86_64", "variant": "Workstation", "sha256": "HASH", "size": "SIZE"},
    ...lines omitted...
    ]
    

    Please note that the image filename must contain important identifiers, like Workstation/Server/Everything, Live/DVD/netinst, etc. Replace HASH with the hash computed by sha256sum FILE.iso, and SIZE with size printed by ls -l FILE.iso.

  3. Run the FMW from command line pointing to your custom download list: $ mediawriter --releasesUrl file:///path/to/edited/releases.json
  4. You should see your specified image in the list.

How to test

  1. Start Fedora Media Writer.
  2. Let it download an image of your preference (try a random spin/version/architecture) or provide it with a custom ISO image file using a file dialog.
    • Check: The image should download without error.
  3. Write it to your flash drive.
    • Check: Writing should finish without error.
    • Check: The previous contents of the USB stick should be wiped, you should no longer see any previous data.
  4. Now check that the image was written correctly. You have several options:
    • a) On Fedora, install isomd5sum package (sudo dnf install isomd5sum) and verify consistency of the written image using checkisomd5:
      $ sudo checkisomd5 -v /dev/sdX
      ...
      Checking: 100.0%
      The media check is complete, the result is: PASS.
      It is OK to use this media.

      where sdX is the device of the flash drive, to be retrieved using e.g. gnome-disks or from lsblk output. The result must be PASS.

    • b) On Fedora, compare the flash drive device with the downloaded ISO image, e.g.:
      $ sudo cmp /dev/sdX Fedora-Workstation-Live-44-1.1.x86_64.iso 
      cmp: EOF on ‘Fedora-Workstation-Live-44-1.1.x86_64.iso’ after byte 2740275200, in line 10568132
      

      where sdX is again to be replaced (see above) together with the image name. The command must end with EOF (end of file) on the ISO file. That means that the whole ISO file was compared to the flash drive, and no differences were found. Any other line that doesn't contain EOF and mentions differences (see the differ word) would mean an error, e.g.:

      $ sudo cmp /dev/sdX Fedora-Workstation-Live-44-1.1.x86_64.iso 
      /dev/sdX Fedora-Workstation-Live-44-1.1.x86_64.iso differ: byte 459, line 2
    • c) Boot the system from the USB stick and select Test this media & start ... in the boot menu. Make sure the verification process passes (the progress is printed, no error is shown, the boot process is not halted and continues after verification).
  5. Test flash drive restoration in FMW:
    1. Start Fedora Media Writer again in the original system that you created the flash drive in.
    2. Insert the flash drive you used now.
    3. A "Restore <flash drive name>" option should appear in FMW.
    4. Restore the partition layout from FMW.
    5. Check that the flash drive now contains a single regular partition spanning the whole drive (using exfat or some similar filesystem popular for data transfer) that is empty and usable.

Expected Results

  1. Fedora Media Writer should behave as expected
  2. If you see a media verification error at 4.8%, it is a known common issue, please repeat the test case again.