Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dracut-initramfs-restore.sh): hide unpack errors #1925

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

aafeijoo-suse
Copy link
Member

With the current "try and fail" approach, the system log contains errors until
the correct initrd compression is reached.

E.g. extra error log produced by a zstd compressed initrd, until the right option is reached:

Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6670]: gzip: stdin: not in gzip format
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6671]: cpio: premature end of archive
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6669]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6675]: bzcat: (stdin) is not a bzip2 file.
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6674]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6676]: cpio: premature end of archive
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6680]: xzcat: (stdin): File format not recognized
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6681]: cpio: premature end of archive
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6679]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6686]: /usr/lib/dracut/dracut-initramfs-restore: line 57: lz4: command not found
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6685]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6687]: cpio: premature end of archive
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6689]: /usr/lib/dracut/dracut-initramfs-restore: line 58: lzop: command not found
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6688]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite
Aug 17 09:42:18 localhost.localdomain dracut-initramfs-restore[6690]: cpio: premature end of archive

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

With the current "try and fail" approach, the system log contains errors until
the correct initrd compression is reached.
@LaszloGombos
Copy link
Collaborator

LGTM

Copy link
Collaborator

@johannbg johannbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johannbg johannbg merged commit 4f20ae2 into dracutdevs:master Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants