Bug 2180524

Summary: livecd-iso-to-disk says "Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk" when trying to create a Fedora 38 bootable USB stick (apparently due to package format change for Fedora 38)
Product: [Fedora] Fedora Reporter: David Tonhofer <bughunt>
Component: livecd-toolsAssignee: Neal Gompa <ngompa13>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: 590814, alexus_m, bcl, bruno, cacho96, jan, jan.skowron, joern, kkfbg, metherid, mihai, ngompa13, rafacure, rag, udayreddy
Target Milestone: ---Keywords: Reopened
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: 2024-05-21 14:32:56 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:

Description David Tonhofer 2023-03-21 16:28:01 UTC
Description of problem:
=======================

On Fedora 36, I want to create a bootable USB for Fedora 37.

This immediately fails:

# livecd-iso-to-disk --format --reset-mbr Downloads/Fedora-Workstation-Live-x86_64-37-1.7.iso /dev/sdb

Source image is '/home/calvin/Downloads/Fedora-Workstation-Live-x86_64-37-1.7.iso'
Verifying image...
/home/calvin/Downloads/Fedora-Workstation-Live-x86_64-37-1.7.iso:   0f0a539212821d61fcedfda0b8409869
Fragment sums: b7843fb48cd5d5c9f8be2416df66448c25bd5d62d7877a937e6f8c8d6dfc
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk
Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk

The heroic bash script of thousands of lines reveals:

----
i=${CONFIG_SRC}/initrd*.img
cd /tmp
rm -rf usr
ikernel=$(lsinitrd $i --unpack -f usr/lib/modules/*/kernel -v 2>&1) <-- fail here
ikernel=${ikernel%/*}; ikernel=${ikernel##*/}
rm -rf usr
cd - >/dev/null 2>&1
----

According to the livecd project at github, there is issue 253:

https://github.com/livecd-tools/livecd-tools/issues/253

October 7, 2022: "Yes, the .iso image structure has changed with Fedora 37. A new version of livecd-iso-to-disk will be required. I'm testing that now."

However, a fix seems to not have been released yet.

(This may or may not have to do something with fedora-media-writer on windows failing to create a bootable USB stick for Fedora 37, a problem I encountered, but probably not)

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

livecd-iso-to-mediums-31.0-1.fc36.x86_64
livecd-tools-31.0-1.fc36.x86_64

How reproducible:
=================

Always

Expected results
================

A valid USB stick with Fedora 37.

The livecd-iso-to-disk on Fedora 36 should really work properly for creating Fedora 37 USB stick as the documentation says to use it:

https://docs.fedoraproject.org/en-US/quick-docs/creating-and-using-a-live-installation-image/index.html

Comment 1 Roy A. Gilmore 2023-04-23 00:24:01 UTC
This is still a problem on Fedora 38

livecd-tools-31.0-3.fc38.x86_64
livecd-iso-to-mediums-31.0-3.fc38.x86_64

--- 8< --- BEGIN --- 8< ---

[root@meili Workstation]# /usr/bin/livecd-iso-to-disk --format --efi Fedora-Workstation-Live-x86_64-38-1.6.iso /dev/sdb

Source image is '/home/shared/Fedora/38/Workstation/Fedora-Workstation-Live-x86_64-38-1.6.iso'
Verifying image...
/home/shared/Fedora/38/Workstation/Fedora-Workstation-Live-x86_64-38-1.6.iso:   65f6772bfece4ba799a9617066286559
Fragment sums: fee7abd6acd22ebedcb44e18a15a87e3faa8372ce551e99ae2a83e6c8bf3
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk
Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk

--- 8< --- END --- 8< ---

Doesn't anybody test the packages *before* they are released? Why isn't a *stock* Fedora 38 Workstation iso supported on Fedora 38?

Comment 2 Ben Cotton 2023-04-25 18:20:33 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
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
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 David Tonhofer 2023-05-05 13:25:34 UTC
After trying again on Fedora 36 to create an USB Stick with the Fedora 38 ISO image, the only way that worked for me was using "dd" as described in https://docs.fedoraproject.org/en-US/quick-docs/creating-and-using-a-live-installation-image/

Comment 4 Luis A. Florit 2023-05-15 14:28:52 UTC
It also fails in Fedora 38 with a Fedora 38 ISO image.  These two failed for me:

livecd-iso-to-disk Fedora-Workstation-Live-x86_64-38-1.6.iso /dev/sda1

livecd-iso-to-disk --home-size-mb 1024 Fedora-Workstation-Live-x86_64-38-1.6.iso /dev/sda1

Comment 5 Luis A. Florit 2023-05-15 14:41:05 UTC
The error is caused by the command

    lsinitrd /initrd*.img --unpack -f usr/lib/modules/*/kernel -v 2>&1

Namely, the variable CONFIG_SRC failed to be set. And the reason is simply that neither $SRCMNT/isolinux/ nor $SRCMNT/syslinux/ exist at that step in the livecd-iso-to-disk script. Actually, those forlders do not exist in $SRCMNT, at all.

Comment 6 Ludek Smid 2023-05-25 18:06:53 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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

Comment 7 udayb 2023-06-11 05:58:26 UTC
Not even a response here from the maintainers or anyone connected to the maintainers. I still see this issue with the Fedora 38 live image. No wonder people are moving away to Ubuntu. After nearly 20 years of using Fedora, I have decided to move away to Ubuntu on the last system on which I had been using Fedora.

Comment 8 udayb 2023-06-11 07:55:24 UTC
For future reference, the thing that actually worked for me, as also reported upthread, was:

$ dd if=<iso_file> of=/dev/sde status=progress bs=8M oflag=direct

Comment 9 Jan Kratochvil 2023-07-03 02:57:01 UTC
livecd-iso-to-disk --format --reset-mbr --overlay-size-mb 8000 --home-size-mb 2000 --unencrypted-home --livedir Fedora-MATE_Compiz-Live-x86_64-38-1.6 /root/Fedora-MATE_Compiz-Live-x86_64-38-1.6.iso /dev/sdX

Source image is '/root/arch-copy/Fedora-MATE_Compiz-Live-x86_64-38-1.6.iso'
Verifying image...
/root/arch-copy/Fedora-MATE_Compiz-Live-x86_64-38-1.6.iso:   ee14906a9f894a6c8a32a74d545e7dc1
Fragment sums: 9dc63337d2cbac425e4453254e62376bf181bf368a48481a5a9d19e92f81
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk
Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk

Comment 10 JanS 2023-07-27 08:11:13 UTC
There is an another active bug reported for the same issue: Bug 2152842 (livecd-iso-to-disk always ends with error)

It has 5 people subscribed to it and is against Fedora 37, while this one has 8 people on it, and is against Fedora 38 (previously against 36). Both are the same issue and both are unresolved. They are marked as NEW, while should already be confirmed. 

There are also discussions/issues on Github - one: https://github.com/livecd-tools/livecd-tools/issues/253 started Oct 2022, and another issue from Feb 2023: https://github.com/livecd-tools/livecd-tools/issues/262 where some kind of preliminary patch is suggested by a user.

It seams like the livecd-tools package has no active maintainers unfortunately as this looks like a relatively simple bug, but there are no responses from the maintainers to this issue for months...
livecd-tools is a package in the official Fedora repository, and Fedora itself have changed the ISO format.

livecd-iso-to-disk was always my first and preferred method of creating Live images, as I am using USB sticks with Live images for system maintenance/fix/rescue/partitioning work. You NEED to have an "overlay" to install additional administrative tools in the Live system! And livecd-iso-to-disk is the only way I know of doing this. All tutorials on the Fedora website talk about "dd" or Fedora Media Writer, but these only create barebone Live image with no overlay, thus pretty useless (no system tools like gparted, etc)

Additionally, as you cannot buy an USB sticks smaller than 32GB nowadays, it is extremely wasteful to use "dd", and thus, do not allow  putting additional files onto the stick.

Please fix this issue. It seems as a simple path issue (no syslinux and no isolinux directories in the Fedora 38 ISOs). I tried fixing it myself, but I do not have sufficient understanding of boot inner-workings to guess what file in the new Fedora ISOs are which and where should be inserted into the script. I will try the patch mentioned in the github comment...

Thanks!

Comment 11 rafacure 2023-11-09 20:17:54 UTC
In Fedora 39 too: Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk

Comment 12 James Kemp 2023-11-10 10:46:51 UTC
Received the same error message on Fedora Linux 39 Silverblue.

Please fix this package. There are those of us that need persistent storage on these USB devices.

Comment 13 Aoife Moloney 2024-05-07 16:01:45 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
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
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 14 Aoife Moloney 2024-05-21 14:32:56 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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

Comment 15 joern 2024-07-01 07:39:51 UTC
(In reply to Aoife Moloney from comment #14)
> Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.
> 
> Fedora Linux 38 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 Linux
> please feel free to reopen this bug against that version. Note that the
> version
> field may be hidden. Click the "Show advanced fields" button if you do not
> see
> the version field.

I can reproduce this bug on Fedora 39, trying to create a Fedora 40 stick.

Comment 16 David Tonhofer 2024-07-09 16:15:03 UTC
Oh this is still in a quantum superposition of forever-closed/forever-open? 

"dd" seems still to be the best bet as reported upthread:
 
https://docs.fedoraproject.org/en-US/quick-docs/creating-and-using-a-live-installation-image/

I once did a flowchart on the possibilities of creating an USB stick as my levels of annoyance were skyrocketing. For those interested:

https://discussion.fedoraproject.org/t/report-on-trying-to-create-a-bootable-usb-stick-with-fedora-38-kde-on-fedora-36/82135

Comment 17 Luis A. Florit 2024-07-09 19:29:21 UTC
(In reply to David Tonhofer from comment #16)
> Oh this is still in a quantum superposition of forever-closed/forever-open? 
> 
> "dd" seems still to be the best bet as reported upthread:
>  
> https://docs.fedoraproject.org/en-US/quick-docs/creating-and-using-a-live-
> installation-image/
> 
> I once did a flowchart on the possibilities of creating an USB stick as my
> levels of annoyance were skyrocketing. For those interested:
> 
> https://discussion.fedoraproject.org/t/report-on-trying-to-create-a-bootable-
> usb-stick-with-fedora-38-kde-on-fedora-36/82135

I gave up completely sending bug reports to Fedora. Waste of time.

About this bug, I just installed Ventoy: https://www.ventoy.net/en/index.html
Then you just through your ISO file in a folder and it works.
Not only you have a bootable disk, but one with as many OSs as you want.

Comment 18 Jan Kratochvil 2024-07-09 23:19:11 UTC
The problem is writable+persistent bootable Fedora, the livecd-iso-to-disk parameters --overlay-size-mb and --home-size-mb .
I tried livemedia-creator but:
(1) livemedia-creator always errors out for me. (I tried just my normal Fedora, I haven't tried it on a clean new Fedora installation in a VM.)
(2) I do not see for livemedia-creator how to write the output directly to the flashdrive, it wants a directory where to write a file.
(3) I do not see for livemedia-creator the writable+persistent feature --overlay-size-mb and --home-size-mb .

for (1) - but that should be filed for lorax = livemedia-creator:
rm -rf out;ksflatten -c fedora-live-mate_compiz.ks -o out.ks;livemedia-creator --ks out.ks --no-virt --resultdir out --make-disk --releasever 40
/usr/lib/python3.12/site-packages/pykickstart/commands/partition.py:448: KickstartParseWarning: A partition with the mountpoint / has already been defined.
  warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint, KickstartParseWarning)
2024-07-06 18:37:47,950: livemedia-creator v40.7-1
2024-07-06 18:37:47,950: selinux is Disabled
/usr/lib/python3.12/site-packages/pykickstart/commands/partition.py:448: KickstartParseWarning: A partition with the mountpoint / has already been defined.
  warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint, KickstartParseWarning)
2024-07-06 18:37:47,993: disk_img = /tmp/fedora-kickstarts/out/lmc-disk-xtjs43ll.img
2024-07-06 18:37:47,993: Using disk size of 8194MiB
2024-07-06 18:37:47,993: Running anaconda.
2024-07-06 18:37:48,501: Starting installer, one moment...
2024-07-06 18:37:49,004: terminal size detection failed, using default width
2024-07-06 18:37:49,004: 18:37:48 Enforcing the non-interactive text mode for dir and image installations.
2024-07-06 18:37:49,004: anaconda 40.22.3-1.fc40 for Linux 40 (pre-release) started.
2024-07-06 18:37:50,938: Processing logs from ('127.0.0.1', 54364)
2024-07-06 18:37:51,004: 
2024-07-06 18:37:51,004: Some warnings occurred during reading the kickstart file:
2024-07-06 18:37:51,004: A partition with the mountpoint / has already been defined.
2024-07-06 18:37:52,005: Starting automated install.Saving storage configuration...
2024-07-06 18:37:52,005: Checking storage configuration...
2024-07-06 18:37:52,505: 
2024-07-06 18:39:31,038: Shutting down log processing
2024-07-06 18:39:31,066: [Errno 21] Is a directory: '/tmp/test_astro_blog'