[arch-projects] [mkinitcpio] lz4 support

Dave Reisner d at falconindy.com
Fri Dec 20 21:42:32 EST 2013


On Fri, Dec 20, 2013 at 09:38:57PM -0500, Jason St. John wrote:
> On Fri, Dec 20, 2013 at 1:20 AM, Dave Reisner <d at falconindy.com> wrote:
> > On Fri, Dec 20, 2013 at 02:58:36AM +0000, Chris Rule wrote:
> >> Hi, sorry in advance if I haven't reported this correctly. I was hesitant to
> >> file a bug report until I was sure it is a bug, and what the bug was in.
> >>
> >> I just tested lz4 compression with mkinitcpio after noticing it in the
> >> conf.pacnew.
> >>
> >> When I rebooted I got the following error after grub and my computer froze:
> >> [0.<cut>] Initramfs unpacking failed: junk in compressed archive
> >
> > ...
> >
> >> [0.<cut>] Kernel panic - not syncing: VFS: Unable to mount root fs on
> >
> > <snip>
> >
> >> 1) I first found the messages to the linux kernel mailing list adding support
> >> for lz4 to the kernel, describing it for arm and x86 so I initially assumed lz4
> >> compressed images weren't supported with x86_64.
> >
> > x86_64 is still x86.
> >
> >> 2) I then read the thread (https://code.google.com/p/lz4/issues/detail?id=83)
> >> linked from the lz4 commit in the mkinitcpio git repository (https://
> >> projects.archlinux.org/mkinitcpio.git/commit/?id=
> >> b5927393d103af9b8b2da80e8636b8aa52f80755), although I'm not sure I understood
> >> everything in that thread I wonder if it may be a bug in lsinitcpio.
> >
> > lsinitcpio is irrelevant for booting (it's just an analysis/debugging
> > tool). Anyways, it's just calling the lz4 binary, same as mkinitcpio.
> >
> >> 3) grub has "insmod gzio" in grub.cfg for all arch menu entries and looking at
> >> gzio on the grub git it states it is for gzip decompression. I also found
> >> lzopio.mod in /usr/lib/grub/i386-pc and /usr/lib/grub/x86_64-efi, though I
> >> can't find any description for it I wonder if grub needs another module for
> >> decompressing the lz4 ramdisk.
> >
> > Your bootloader is NOT responsible for decompressing the initramfs. The
> > first line of your kernel output shows the *kernel* failing to unpack
> > the initramfs.
> >
> >> Has a lz4 compressed ramdisk worked for anyone else and if it has can you help
> >> me rule out any of these options or does anyone think I missed something?
> >
> > Nope, but this isn't likely to be a bug in mkinitcpio (unless I'm
> > missing some magical flag, such as --check=crc32 being needed for xz).
> > I'd talk to lz4 upstream if you want this resolved.
> >
> > d
> 
> I had the same problem as Chris with a VirtualBox VM running Arch. I
> was able to replicate the same kernel panic on two other,
> non-virtualized Arch machines I use.
> 
> All three Arch systems are running 3.12.5-1-ARCH (the standard Arch
> kernel from [core]) with mkinitcpio-16, and the kernel panic occurs
> after switching from lzop to lz4.
> 
> Dave, do you have anything in COMPRESSION_OPTIONS in your
> /etc/mkinitcpio.conf (assuming you are using lz4)?
> 
> I have reported this on the lz4 issue tracker here:
> https://code.google.com/p/lz4/issues/detail?id=102
> 
> Jason

I don't compress my initramfs. Also:

https://bbs.archlinux.org/viewtopic.php?pid=1362280#p1362280


More information about the arch-projects mailing list