lsinitramfs not aware of COMPRESS in initramfs.conf

Bug #1072015 reported by Bela Lubkin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Add "COMPRESS=xz" to /etc/initramfs-tools/initramfs.conf; now /boot/initramfs* will be xz-compressed cpio files. Then `lsinitramfs` fails:

$ lsinitramfs /boot/initrd.img-3.2.0-32-generic
/boot/initrd.img-3.2.0-32-generic

gzip: /boot/initrd.img-3.2.0-32-generic: not in gzip format
cpio: premature end of archive

Patch to follow.

Tags: patch
Revision history for this message
Bela Lubkin (filbo) wrote :

Attaching patch (1 line of fix, 20 lines from mkinitramfs to pick up the config var)

Revision history for this message
Bela Lubkin (filbo) wrote :

In the patch, "--long confdir,help,long" should be "--long confdir:,help,long" (add missing ':')

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch (1 line of fix, 20 lines from mkinitramfs to pick up the config var)" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
James Hunt (jamesodhunt) wrote :

@Bela: Thank you very much for this patch and helping to make Ubuntu better.

Please could you resubmit the patch with the specified change you mention in #2? Also, for parity for mkinitramfs, lsinitramfs should support the '-c' option so that the value of COMPRESS can be specified on the command-line. Note that an update to lsinitramfs.8 is also preferred to document the newly-added options.

Comment (unrelated to your changes): Ideally, mkinitramfs and lsinitramfs would be the same script which changes its behaviour based on its name to avoid any possibility of the two getting out of sync as has been demonstrated by the COMPRESS issue.

Revision history for this message
Ben Hutchings (benh-debian) wrote :

Fixed in Debian version 0.120 and Ubuntu version 0.120ubuntu1.

Changed in initramfs-tools (Ubuntu):
status: New → Fix Released
Revision history for this message
Ben Hutchings (benh-debian) wrote :

Actually this was fixed rather earlier in Debian, in version 0.100.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.