Bug 1418315

Summary: Live system cannot use swap image(created with '--swap-size-mb' option)
Product: [Fedora] Fedora Reporter: David Timber <dxdt>
Component: livecd-toolsAssignee: Neal Gompa <ngompa13>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 24CC: adam.stokes, bcl, bruno, dhuff, Jasper.Hartline, katzj, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 19:37:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The journal of livesys.service unit none

Description David Timber 2017-02-01 14:18:15 UTC
Created attachment 1246670 [details]
The journal of livesys.service unit

Description of problem:
A live system cannot use the swap image of the live USB image, the same medium the system boots to, because the file system containing the image is mounted read-only. Either the live USB should be mounted rw, or '--swap-size-mb' option must be removed.


Version-Release number of selected component (if applicable):


How reproducible:
As long as the swap file(swap.img) is located under the live directory.


Steps to Reproduce:
1. Create a live USB with the following command:
sudo livecd-iso-to-disk --format --msdos --reset-mbr --extra-kernel-args 3 --livedir __live --swap-size-mb 1024 --label "DANK_MEMES" Fedora-Workstation-Live-x86_64-24-1.2.iso /dev/sdc

2. Power down the system.

3. Make sure there's no swap partition that a linux system can use.
To ensure this, I disabled the SATA controller of my machine from BIOS menu.

4. Boot to the live USB.


Actual results:
Live system fails to swapon to the swap image:
Feb 01 08:45:53 localhost livesys[1125]: swapon: /run/initramfs/live/__live/swap.img: swapon failed: Read-only file system


Expected results:
Live system is able to swapon to the swap image.


Additional info:
Attached is the journal I dumped on the live system with the command "journalctl -u livesys.service.txt"

Comment 1 David Timber 2017-02-06 02:19:30 UTC
Adding "rw" to kernel cmdline solves this problem. Maybe the script should add that cmdline arg if '--swap-size-mb' option is used.

Comment 2 Fedora End Of Life 2017-07-26 00:13:39 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2017-08-08 19:37:05 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.