Bug 1494792 - livecd-iso-to-disk claims the double of the space that needs
Summary: livecd-iso-to-disk claims the double of the space that needs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-23 05:06 UTC by Sergio Basto
Modified: 2017-11-14 08:50 UTC (History)
7 users (show)

Fixed In Version: livecd-tools-25.0-1.fc26 livecd-tools-25.0-1.fc27 livecd-tools-25.0-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-30 16:18:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sergio Basto 2017-09-23 05:06:29 UTC
Description of problem:

ls -lh Fedora-LXDE-Live-i386-26-1.5.iso 
1023M 

livecd-iso-to-disk --reset-mbr --force  ~sergio/Fedora-LXDE-Live-i386-26-1.5.iso /dev/sdb1  

The live image + overlay, home, & swap space, if requested,
  will NOT fit in the space available on the target device.

  + Size of live image:       1998  MiB
  = Total requested space:    1998  MiB
  - Space available:          1896
    ==============================
    Space needed:              102  MiB

  To fit the installation on this device,
  free space on the target, or decrease the
  requested size total by:     102  MiB


Version-Release number of selected component (if applicable):
livecd-tools-24.4-1.fc25.x86_64

How reproducible:


Steps to Reproduce:
1. download Fedora-LXDE-Live-i386-26-1.5.iso
2. run livecd-iso-to-disk --reset-mbr --force  ~sergio/Fedora-LXDE-Live-i386-26-1.5.iso /dev/sdb1   
3.

Actual results:
request 2 Gbytes 

Expected results:
request the size of the iso 1 Gbyte

Additional info:

Comment 1 Neal Gompa 2017-09-23 12:27:20 UTC
Frederick,

This seems like something up your alley. What do you think of this issue?

(as an aside, apparently watchbugs didn't make it over...)

Comment 2 Frederick Grose 2017-09-24 04:16:26 UTC
This bug is fixed by this pull request,
https://github.com/livecd-tools/livecd-tools/pull/76

Comment 3 Sergio Basto 2017-09-24 21:32:30 UTC
I tested git master [1]
livecd-iso-to-disk --reset-mbr --msdos --force ~sergio/Fedora-LXDE-Live-i386-26-1.5.iso /dev/sdb1
Verifying image...
/home/sergio/Fedora-LXDE-Live-i386-26-1.5.iso:   bda0a4c6564d7f108acea71c476440f0
Fragment sums: e88eaaaf351d817ac8b91e5bb86dfa3d7a53deba4d21a989f13f75f7331b
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.

Copying LiveOS image to target device...
squashfs.img
    970,399,744 100%    4.51MB/s    0:03:25 (xfr#1, to-chk=0/1)

Syncing filesystem writes to disc.
    Please wait, this may take a while...
sed: no input files
Cleaning up to exit...

It fixed the overestimation but we got one new message [2]. How I debug it ? is harmless or not ? 

[2]
sed: no input files

[1]
fedpkg clone livecd-tools
cd livecd-tools
wget https://github.com/livecd-tools/livecd-tools/compare/livecd-tools-24.4...master.diff
vi livecd-tools.spec 
rpmdev-bumpspec  -c "Fixes overestimation of image size, RHBZ #1494792" livecd-tools.spec 
fedpkg srpm && mock -r fedora-25-x86_64 --no-clean --rebuild livecd-tools-24.4-4.fc28.src.rpm

Comment 4 Sergio Basto 2017-09-25 03:12:30 UTC
Since I already spend many time with create one usb boot, I'm using git master version ( https://github.com/livecd-tools/livecd-tools/commit/c7c2e79c3c32b8893607b42096a365e1b72ebfb2 ) 

After do: 

    livecd-iso-to-disk --format --msdos --reset-mbr --noverify /home/sergio/Fedora-LXDE-Live-i386-26-1.5.iso /dev/sdb1

qemu testing [1] says pen is not bootable 

I did :
    syslinux -d syslinux/ -i /dev/sdb1 ( now I think I could not use -i ...)

and now qemu testing [1] says: 

syslinux no configuration file found
boot:

so I did:
    mount /dev/sdb1 
    cd /run/media/sergio/LIVE/syslinux
    mv isolinux.bin syslinux.bin
    mv isolinux.cfg syslinux.cfg

and now qemu testing [1] is OK ! , I have my usb pen bootable for i686 with  Fedora 26 and still have 1G free to write files that might need . 

Thanks, 

[1]
qemu-system-i386 -drive format=raw,file=/dev/sdb

Comment 5 Frederick Grose 2017-09-25 03:27:49 UTC
(In reply to Sergio Monteiro Basto from comment #3)

I debug by setting xtrace option for Bash on line 1 of livecd-iso-to-disk,
#!/bin/bash -x

This newly discovered bug is due to new code that improperly assumed the presence of EFI components in the image.

Thanks for reporting this oversight in testing!

This bug is fixed by this pull request:
https://github.com/livecd-tools/livecd-tools/pull/77

Comment 6 Sergio Basto 2017-10-20 15:41:56 UTC
I update livecd with https://github.com/livecd-tools/livecd-tools/compare/livecd-tools-24.4...master.diff 

and tested it with [1] :

test worked [2] :

but before when I not clean [3] : 


[1]
 livecd-iso-to-disk  --noverify /home/sergio/Fedora-Workstation-Live-x86_64-26-1.5.iso /dev/sdb1

Copying LiveOS image to target device...
squashfs.img
  1,482,072,064 100%    3.82MB/s    0:06:10 (xfr#1, to-chk=0/1)

Syncing filesystem writes to disc.
    Please wait, this may take a while...
Setting up /EFI/BOOT
Updating boot config file.
Installing boot loader
Target device is now set up with a Live image!

[2]
qemu-system-x86_64 -drive format=raw,file=/dev/sdb

[3]

# livecd-iso-to-disk  --noverify /home/sergio/Fedora-Workstation-Live-x86_64-26-1.5.iso /dev/sdb1

    ATTENTION:

        >> There may be other LiveOS images on this device. <<

    Do you want a Multi Live Image installation?

        If so, press Enter to continue.

        If not, press the [space bar], and other images
                will be ignored.

    To abort the installation, press Ctrl C.
    

The 'LiveOS' directory is already set up with a LiveOS image.

                   Press Ctrl C if you wish to abort.
                Deleting the old OS in 09  seconds.

Copying LiveOS image to target device...
squashfs.img
  1,482,072,064 100%    3.90MB/s    0:06:02 (xfr#1, to-chk=0/1)

Syncing filesystem writes to disc.
    Please wait, this may take a while...
mv: missing destination file operand after '/run/tgttmp.Hpyu60/EFI_previous'
Try 'mv --help' for more information.
Cleaning up to exit...

Comment 7 Frederick Grose 2017-10-21 16:57:47 UTC
(In reply to Sergio Monteiro Basto from comment #6)

I wasn't able to reproduce your error exactly, but I found a bug and improved the auto multi installation.

livecd-iso-to-disk will run as a standalone file if SYSLINUX is installed on the host.  For example, to test the new version, you may use this file:
https://raw.githubusercontent.com/FGrose/livecd-tools/077dc43b876dd8bc9bd9ce64598406f9a4bc4eaa/tools/livecd-iso-to-disk.sh

The new version is in this pull request:
https://github.com/livecd-tools/livecd-tools/pull/78

Comment 8 Fedora Update System 2017-10-21 18:49:16 UTC
livecd-tools-25.0-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-86b225030b

Comment 9 Fedora Update System 2017-10-21 18:49:59 UTC
livecd-tools-25.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-56598fe991

Comment 10 Fedora Update System 2017-10-21 18:50:51 UTC
livecd-tools-25.0-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4c20585902

Comment 11 Fedora Update System 2017-10-22 02:26:06 UTC
livecd-tools-25.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-56598fe991

Comment 12 Fedora Update System 2017-10-22 03:25:24 UTC
livecd-tools-25.0-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4c20585902

Comment 13 Fedora Update System 2017-10-23 00:50:53 UTC
livecd-tools-25.0-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-86b225030b

Comment 14 Fedora Update System 2017-10-30 16:18:36 UTC
livecd-tools-25.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2017-11-11 03:00:26 UTC
livecd-tools-25.0-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-11-14 08:50:19 UTC
livecd-tools-25.0-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.