RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1462189 - ReaR cannot create ISO images larger than 4GB due to Red Hat change that removes mkisofs
Summary: ReaR cannot create ISO images larger than 4GB due to Red Hat change that remo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rear
Version: 7.3
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Pavel Cahyna
QA Contact: David Jež
URL:
Whiteboard:
Depends On: 1638857
Blocks: 1473612 1630904 1630910 1630919 1660473
TreeView+ depends on / blocked
 
Reported: 2017-06-16 12:04 UTC by afox@redhat.com
Modified: 2023-03-24 13:49 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1726043 (view as bug list)
Environment:
Last Closed: 2019-08-06 13:12:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1473640 0 urgent CLOSED Restore with multiple ISOs does not detect additional ISOs due to blkid output parsing mismatch 2023-03-24 13:50:14 UTC
Red Hat Bugzilla 1638865 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 1655898 0 medium CLOSED Include UDF support in rescue ISO when backup is stored on the ISO itself 2024-03-25 15:10:45 UTC
Red Hat Product Errata RHBA-2019:2273 0 None None None 2019-08-06 13:12:31 UTC

Internal Links: 1473640 1638865 1655898

Description afox@redhat.com 2017-06-16 12:04:22 UTC
Description of problem:
The version of ReaR that is shipped with RHEL7 does not include the mkisofs binary. Instead, we substitute genisoimage. 

As a result of this change, ISO images greater than 4GB cannot be created. 

See:
https://github.com/rear/rear/issues/581
for documentation of this issue on the ReaR github issue tracker.

The customer has attempted to use the workaround documented in the issue tracker. This does result in the creation of an ISO image greater than 4GB. 

However, when attempting to restore using this image, the following error is seen:

Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-lonrs07335.log
ERROR: Mount command 'mount /dev/disk/by-label/RELAXRECOVER /tmp/rear.KPTy08rH3CYH3Bq/outputfs' failed.
Aborting due to an error, check /var/log/rear/rear-lonrs07335.log for details
/etc/scripts/system-setup: line 72: 4753 Terminated     rear recover -v


Version-Release number of selected component (if applicable):
Relax-and-Recover 1.17.2

How reproducible:
Always. 

Steps to Reproduce:
1. Attempt to image a system where ISO size will be greater than 4GB. 


Actual results:
ISO image is not created. 

Expected results:
Working ISO image should be created. 

Additional info:
This represents a major problem for RBS as ReaR is at the core of all their disaster recovery. Their latest shipping RHEL build results in an ISO image size of greater than 4GB, so currently they cannot ship this build until ReaR is fixed.

Comment 2 Jakub Mazanek 2017-06-29 19:25:14 UTC
This is not a rear issue. It is a behaviour of genisoimage package. Nothing I can do.

Jakub

Comment 3 Julio Entrena Perez 2017-07-03 09:34:02 UTC
Re-assigning to cdrkit (genisoimage) as per comment 2.

Comment 4 Vaclav Dolezal 2017-07-18 11:24:04 UTC
genisoimage has switch -allow-limited-size which creates hybrid UDF/ISO9660 filesystem where size info is correct only on UDF metadata and big files are truncated on ISO9660 metadata. Resulting filesystem has to be mounted as UDF but it can represent files greater than 4GiB.

Can it be used by ReaR?

Comment 5 Julio Entrena Perez 2017-07-18 14:01:20 UTC
# rear -v mkbackup
Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-rhel7a34.log
Creating disk layout
Creating root filesystem layout
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Encrypting disabled
Creating tar archive '/tmp/rear.zh4FTegowf9b0il/tmp/isofs/backup//backup.tar.gz'
Archived 4753 MiB [avg 5921 KiB/sec]OK
Archived 4753 MiB in 823 seconds [avg 5914 KiB/sec]
Making ISO image
ERROR: Could not create ISO image (with /bin/mkisofs)
Aborting due to an error, check /var/log/rear/rear-rhel7a34.log for details
Terminated

# cat /var/log/rear/rear-rhel7a34.log
2017-07-18 13:40:12 Relax-and-Recover 1.17.2 / Git
2017-07-18 13:40:12 Command line options: /usr/sbin/rear -v mkbackup
[...]
2017-07-18 13:55:50 Including output/ISO/Linux-i386/81_prepare_multiple_iso.sh
2017-07-18 13:55:50 Including output/ISO/Linux-i386/82_create_iso_image.sh
2017-07-18 13:55:50 Starting '/bin/mkisofs'
2017-07-18 13:55:50 Making ISO image
genisoimage 1.1.11 (Linux)
Scanning .
Scanning ./backup
File ./backup/backup.tar.gz is larger than 4GiB-1.
-allow-limited-size was not specified. There is no way do represent this file size. Aborting.
2017-07-18 13:55:50 ERROR: Could not create ISO image (with /bin/mkisofs)
=== Stack trace ===
Trace 0: /usr/sbin/rear:252 main
Trace 1: /usr/share/rear/lib/mkbackup-workflow.sh:22 WORKFLOW_mkbackup
Trace 2: /usr/share/rear/lib/framework-functions.sh:70 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:31 Source
Trace 4: /usr/share/rear/output/ISO/Linux-i386/82_create_iso_image.sh:17 source
Trace 5: /usr/share/rear/lib/_input-output-functions.sh:132 StopIfError
Message: Could not create ISO image (with /bin/mkisofs)

# man genisoimage
[...]
       -allow-limited-size
              When processing files larger than 2GiB which cannot be easily represented in ISO9660, add them with a shrunk visible file size  to  ISO9660
              and  with  the  correct visible file size to the UDF system. The result is an inconsistent filesystem and users need to make sure that they
              really use UDF rather than ISO9660 driver to read a such disk. Implies enabling -udf.

(In reply to Vaclav Dolezal from comment #4)
> Resulting filesystem has to be mounted as UDF
> but it can represent files greater than 4GiB.
> 
> Can it be used by ReaR?

Comment 7 Frantisek Kluknavsky 2017-07-28 08:13:16 UTC
Hi,

please, how exactly is mkisofs invoked by rear? (Is it written somewhere in that /var/log/rear/rear-rhel7a34.log?)

Comment 8 Julio Entrena Perez 2017-07-28 09:14:02 UTC
/usr/share/rear/output/ISO/Linux-i386/82_create_iso_image.sh :

     13 $ISO_MKISOFS_BIN $v -o "$ISO_DIR/$ISO_PREFIX.iso" -b isolinux/isolinux.bin -c isolinux/boot.cat \
     14     -no-emul-boot -boot-load-size 4 -boot-info-table \
     15     -R -J -volid "$ISO_VOLID" $EFIBOOT -v -iso-level 3 .  >&8
     16     ##-R -J -volid "$ISO_VOLID" $EFIBOOT  "${ISO_FILES[@]}"  >&8

Btw, in RHEl mkisofs is actually genisoimage:

# which mkisofs
/usr/bin/mkisofs

# ls -l /usr/bin/mkisofs 
lrwxrwxrwx. 1 root root 25 Jul 18 12:51 /usr/bin/mkisofs -> /etc/alternatives/mkisofs

# ls -l /etc/alternatives/mkisofs
lrwxrwxrwx. 1 root root 20 Jul 18 12:51 /etc/alternatives/mkisofs -> /usr/bin/genisoimage

Comment 10 Frantisek Kluknavsky 2017-07-29 20:05:18 UTC
Trying to include a large file into the initrd results in a small iso that does not contain that file.
900_create_initramfs.sh contains:

find . ! -name "*~"  |\
        tee /dev/fd/8  |\
        cpio -H newc --create --quiet  |\
        gzip > "$TMP_DIR/initrd.cgz"

That does not check for errors much. It leaves an error message in the log and continues with an incomplete archive:
"cpio: usr/share/rear/dummy.bin: field width not sufficient for storing file size"
Libarchive man page says: "SVR4/newc ... The SVR4 format uses eight-digit hexadecimal values for all header fields. This limits file size to 4GB, and also limits the mtime and other fields to 32 bits."

As Vaclav says, -allow-limited-size creates an udf filesystem. I was not able to boot it. Booting it as iso9660 leads to kernel panic. Please give me a hint if you can boot from it properly as udf. Reading it as udf on a working machine works well.

Xorrisofs (insteat of genisoimage) seems to create a correct 6GB large iso9660 image. But I am not able to boot it either. Virtual machine with 16GB of ram reports "not enough memory" in the middle of loading initrd. Again, please give me a hint if you know possible reasons.

Comment 11 Julio Entrena Perez 2017-07-31 11:16:13 UTC
(In reply to Frantisek Kluknavsky from comment #10)
 
> Xorrisofs (insteat of genisoimage) seems to create a correct 6GB large
> iso9660 image. But I am not able to boot it either. 

Thanks for the suggestion on Xorrisofs, I can confirm that with rear-2.00-2.el7 (included in RHEL 7.4) and xorriso 1.3.6 I can successfully produce a single, larger than 4GB ISO image:

# rear -v mkbackup
Relax-and-Recover 2.00 / Git
Using log file: /var/log/rear/rear-rhel7a34.log
Using backup archive '/tmp/rear.GG8Nc1BZhpqCqhZ/tmp/isofs/backup/backup.tar.gz'
Creating disk layout
Creating root filesystem layout
Copying logfile /var/log/rear/rear-rhel7a34.log into initramfs as '/tmp/rear-rhel7a34-partial-2017-07-31T10:07:34+0000.log'
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Creating tar archive '/tmp/rear.GG8Nc1BZhpqCqhZ/tmp/isofs/backup/backup.tar.gz'
Archived 5715 MiB [avg 5600 KiB/sec] OK
Archived 5715 MiB in 1046 seconds [avg 5594 KiB/sec]
Making ISO image
Wrote ISO image: /var/lib/rear/output/rear-rhel7a34.iso (5.8G)
Copying resulting files to file location
Saving /var/log/rear/rear-rhel7a34.log as rear-rhel7a34.log to file location

# ls -lh /var/lib/rear/output
total 5.8G
-rw-------. 1 root root 5.8G Jul 31 10:40 rear-rhel7a34.iso


I can also confirm that I can successfully boot and restore from the produced ISO image.

Comment 16 Terry Bowling 2017-08-29 20:13:10 UTC
Looking at a RHEL 7.4 system, I see /usr/bin/mkisofs is provided by the genisoimage package.  I am not sure if this is a new addition or not.

Could we please verify that ReAR is able to use the mkisofs provided and resolves the core issue? 

[root@rhel7 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.4 (Maipo)

[root@rhel7 ~]# yum list genisoimage
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Installed Packages
genisoimage.x86_64                           1.1.11-23.el7                            @rhel-7-server-eus-rpms

[root@rhel7 ~]# rpm -ql genisoimage |grep  mkiso
/usr/bin/mkisofs

Comment 17 Julio Entrena Perez 2017-08-30 08:15:12 UTC
ReaR is using genisoimage via the /usr/bin/mkisofs alias.
genisoimage can not create ISO images that contain files larger than 4GB.
Workaround is to use ReaR option ISO_MAX_SIZE= to limit the size of the built-in backup tarball to avoid the problem.
Solution would be to replace genisoimage by xorriso, which is already included in Fedora and able to create ISO images with files > 4GB.

Comment 24 Pavel Cahyna 2019-03-06 11:01:06 UTC
As a solution, until xorriso is added to RHEL, one can install xorriso from EPEL. No changes in ReaR should be needed to use it, as noted above, ReaR prefers xorrisofs even if both xorriso and genisoimage or mkisofs are installed.

Comment 29 errata-xmlrpc 2019-08-06 13:12:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2273


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